Kotlin Compiler build fail in Raspberrypi2 - raspberry-pi2

I tried to build kotlin compiler in Raspberrypi2 on Ubuntu Mate 15.10
When I execute ant -f update_dependencies.xml and during building, error occured below.
override-version:
[echo] Requested URL https://teamcity.jetbrains.com/guestAuth/app/rest/builds/?locator=buildType:IntelliJMarkdownParser_Build,status:SUCCESS,tag:forKotlin,count:1
[echo] Build Number: 3174 - Kotlin 1.0.0-beta-5160 Build Id: 662124
[get] Getting: https://teamcity.jetbrains.com/guestAuth/app/rest/builds/id:662124/artifacts/content/markdown_jar/markdown.jar
[get] To: /home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-4584/dependencies/markdown.jar
[get] Not modified - so not downloaded
[exec] Exception in thread "main" java.lang.reflect.InvocationTargetException
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:497)
[exec] at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:73)
[exec] at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:35)
[exec] Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path, /tmp/libjansi-32-2155791272664213050.so: /tmp/libjansi-32-2155791272664213050.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)]
[exec] at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
[exec] at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
[exec] at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:37)
[exec] at org.jetbrains.kotlin.cli.common.messages.PlainTextMessageRenderer.<clinit>(PlainTextMessageRenderer.java:35)
[exec] at org.jetbrains.kotlin.cli.common.messages.MessageRenderer.<clinit>(MessageRenderer.java:29)
[exec] at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:57)
[exec] at org.jetbrains.kotlin.cli.common.CLICompiler.doMainNoExit(CLICompiler.java:240)
[exec] at org.jetbrains.kotlin.cli.common.CLICompiler.doMain(CLICompiler.java:231)
[exec] at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:246)
[exec] at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
[exec] ... 6 more
I installed libjansi-java and libjansi-native-java but it doesn't work.
Is any idea solve this problem?
I updated soruce code to build-1.0.0-beta-5569 and added <arg value="-Dkotlin.colors.enabled=false"/> like belows:
--- a/update_dependencies.xml
+++ b/update_dependencies.xml
## -368,6 +368,7 ##
<macrodef name="build-protobuf-java-lite">
<sequential>
<exec executable="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin/${kotlinc.executable.path}" failonerror="true">
+ <arg value="-Dkotlin.colors.enabled=false"/>
<arg value="-script"/>
<arg value="generators/infrastructure/build-protobuf-lite.kts"/>
<arg value="${basedir}/ideaSDK/lib/protobuf-2.5.0.jar"/>
## -419,6 +420,7 ##
<delete dir="${markdown.dir}" failonerror="false"/>
<unzip src="dependencies/download/markdown-sources.zip" dest="dependencies"/>
<exec executable="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin/${kotlinc.executable.path}" failonerror="true">
+ <arg value="-Dkotlin.colors.enabled=false"/>
<arg value="${markdown.dir}/src"/>
<arg value="-d"/>
<arg value="${markdown.dir}/out"/>
## -874,6 +876,7 ##
<echo message="URL: ${override.version.url} Version: ${override.version.build.number}"/>
<exec executable="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin/${kotlinc.executable.path}" failonerror="false">
+ <arg value="-Dkotlin.colors.enbled=false"/>
<arg value="-cp"/>
<arg value="dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-compiler.jar"/>
<arg value="-script"/>
After finsiehd update_dependencies.xml, I executed ant -f build.xml and got following errors:
runner:
[echo] Cleaning /home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/dist/classes/runner
[mkdir] Created dir: /home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/dist/classes/runner
[kotlinc] Compiling [/home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/compiler/cli/cli-runner/src] => [/home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/dist/classes/runner]
BUILD FAILED
/home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/build.xml:441: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.jetbrains.kotlin.ant.KotlinCompilerBaseTask.execute(KotlinCompilerBaseTask.kt:92)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path, /tmp/libjansi-32-7100610475620258495.so: /tmp/libjansi-32-7100610475620258495.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)]
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:37)
at org.jetbrains.kotlin.cli.common.messages.PlainTextMessageRenderer.<clinit>(PlainTextMessageRenderer.java:35)
at org.jetbrains.kotlin.cli.common.messages.MessageRenderer.<clinit>(MessageRenderer.java:29)
at org.jetbrains.kotlin.cli.common.CLICompiler.execFullPathsInMessages(CLICompiler.java:69)
... 22 more
Total time: 1 minute 3 seconds
I fixed build.xml like this:
diff --git a/build.xml b/build.xml
index 38f751c..7bcfeb1 100644
--- a/build.xml
+++ b/build.xml
## -299,6 +299,7 ##
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true"
maxmemory="${max.heap.size.for.forked.jvm}">
+ <sysproperty key="kotlin.colors.enabled" value="true"/>
<classpath>
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
</classpath>
## -468,6 +469,7 ##
failonerror="true"
fork="true"
maxmemory="${max.heap.size.for.forked.jvm}">
+ <sysproperty key="kotlin.colors.enabled" value="true"/>
<assertions>
<enable/>
</assertions>
## -732,6 +734,7 ##
<pathconvert property="src.line" refid="src.dirset" pathsep=" "/>
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true" maxmemory="${max.heap.size.for.forked.jvm}">
+ <sysproperty key="kotlin.colors.enabled" value="true"/>
<classpath>
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
</classpath>
## -771,6 +774,7 ##
<sequential>
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true" maxmemory="${max.heap.size.for.forked.jvm}">
+ <sysproperty key="kotlin.colors.enabled" value="true"/>
<classpath>
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
</classpath>
and then, I execute ant build.
ant -f build.xml -Dkotlin.colors.enabled=false.
I'm not good at ant. So, I can not sure that this is correct syntax. but build was started and I got same error.
BUILD FAILED
/home/kyungkoo/Downloads/kotlin-build-1.0.0-beta-5569/build.xml:442: java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path, /tmp/libjansi-32-7323034426853998701.so: /tmp/libjansi-32-7323034426853998701.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)]
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:37)
at org.jetbrains.kotlin.cli.common.messages.PlainTextMessageRenderer.<clinit>(PlainTextMessageRenderer.java:35)

Looks like jansi native libraries are missing for Raspberry Pi. I'm not sure if they should be available, but you can safely disable them while building Kotlin because Kotlin compiler only uses jansi to output colored diagnostic messages to the terminal. To disable the use of colors (and hence jansi), try applying this patch in the root of the Kotlin project:
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/PlainTextMessageRenderer.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/PlainTextMessageRenderer.java
index e83309d..d4755e6 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/PlainTextMessageRenderer.java
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/messages/PlainTextMessageRenderer.java
## -32,9 +32,7 ## import static org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.*
public abstract class PlainTextMessageRenderer implements MessageRenderer {
// AnsiConsole doesn't check isatty() for stderr (see https://github.com/fusesource/jansi/pull/35).
// TODO: investigate why ANSI escape codes on Windows only work in REPL for some reason
- private static final boolean COLOR_ENABLED =
- !SystemInfo.isWindows &&
- CLibrary.isatty(CLibrary.STDERR_FILENO) != 0;
+ private static final boolean COLOR_ENABLED = false;
private static final String LINE_SEPARATOR = LineSeparator.getSystemLineSeparator().getSeparatorString();

I was just trying to get Kotlin to work on my Raspberry Pi as well. I followed the link above - https://youtrack.jetbrains.com/issue/KT-10605 - from IRus. From that I saw that it does check a property to disable color, fortunately.
So, at least for now until the change is propagated, you can do the following:
kotlinc -Dkotlin.colors.enabled=false
which will then skip the part that tries to load a non-ARM shared library. At least it works for me to get the REPL running.
Another way I found is to set the env variable JAVA_TOOL_OPTIONS like so:
export JAVA_TOOL_OPTIONS="-Dkotlin.colors.enabled=false"
this will be picked up by the java vm and then you do not need it on every command line (though it does spit out an annoying 'Picked up message' every time.

The command line Kotlin compiler developed by jetbrains can be installed as a snap package in all currently supported versions of Ubuntu. To install it, open the terminal and type:
sudo snap install kotlin --classic
Available tools:
kotlinc
kotlinc-jvm
kotlinc-js
kotlin-dce-js

Related

Kotlin VSCode extension unable to find the 'mvn' command

But in a terminal I can see a Maven version:
11:58 $ mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /home/stephane/.asdf/installs/maven/3.8.4
Java version: 15.0.2, vendor: AdoptOpenJDK, runtime: /home/stephane/.asdf/installs/java/adoptopenjdk-15.0.2+7
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-91-generic", arch: "amd64", family: "unix"
I'm using the asdf tool:
12:07 $ cat .tool-versions
java adoptopenjdk-15.0.2+7
nodejs 12.13.1
tflint 0.28.1
terraform-validator 3.1.3
packer 1.7.2
terraform 0.15.3
adr-tools 3.0.0
pre-commit 1.21.0
maven 3.8.4
When loading the project the bottom Output pane for the Kotlin console shows the content:
Dec 18, 2021 12:06:26 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.IllegalArgumentException: Unable to find the 'mvn' command
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Unable to find the 'mvn' command
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: Unable to find the 'mvn' command
at org.javacs.kt.classpath.MavenClassPathResolverKt$mvnCommand$2.invoke(MavenClassPathResolver.kt:129)
at org.javacs.kt.classpath.MavenClassPathResolverKt$mvnCommand$2.invoke(MavenClassPathResolver.kt:128)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.javacs.kt.classpath.MavenClassPathResolverKt.getMvnCommand(MavenClassPathResolver.kt:128)
at org.javacs.kt.classpath.MavenClassPathResolverKt.generateMavenDependencyList(MavenClassPathResolver.kt:106)
at org.javacs.kt.classpath.MavenClassPathResolverKt.access$generateMavenDependencyList(MavenClassPathResolver.kt:1)
at org.javacs.kt.classpath.MavenClassPathResolver.getClasspathWithSources(MavenClassPathResolver.kt:37)
at org.javacs.kt.classpath.UnionClassPathResolver.<init>(ClassPathResolver.kt:57)
at org.javacs.kt.classpath.ClassPathResolverKt.plus(ClassPathResolver.kt:45)
at org.javacs.kt.classpath.ClassPathResolverKt.getJoined(ClassPathResolver.kt:40)
at org.javacs.kt.classpath.DefaultClassPathResolverKt.defaultClassPathResolver(DefaultClassPathResolver.kt:11)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:37)
at org.javacs.kt.CompilerClassPath.refresh$default(CompilerClassPath.kt:31)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:98)
at org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:117)
at org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:71)
at org.javacs.kt.util.AsyncExecutor.compute$lambda-2(AsyncExecutor.kt:19)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 3 more
[Error - 11:51:28 AM] Starting client failed
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Unable to find the 'mvn' command
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1702)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: Unable to find the 'mvn' command
at org.javacs.kt.classpath.MavenClassPathResolverKt$mvnCommand$2.invoke(MavenClassPathResolver.kt:129)
at org.javacs.kt.classpath.MavenClassPathResolverKt$mvnCommand$2.invoke(MavenClassPathResolver.kt:128)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.javacs.kt.classpath.MavenClassPathResolverKt.getMvnCommand(MavenClassPathResolver.kt:128)
at org.javacs.kt.classpath.MavenClassPathResolverKt.generateMavenDependencyList(MavenClassPathResolver.kt:106)
at org.javacs.kt.classpath.MavenClassPathResolverKt.access$generateMavenDependencyList(MavenClassPathResolver.kt:1)
at org.javacs.kt.classpath.MavenClassPathResolver.getClasspathWithSources(MavenClassPathResolver.kt:37)
at org.javacs.kt.classpath.UnionClassPathResolver.<init>(ClassPathResolver.kt:57)
at org.javacs.kt.classpath.ClassPathResolverKt.plus(ClassPathResolver.kt:45)
at org.javacs.kt.classpath.ClassPathResolverKt.getJoined(ClassPathResolver.kt:40)
at org.javacs.kt.classpath.DefaultClassPathResolverKt.defaultClassPathResolver(DefaultClassPathResolver.kt:11)
at org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:37)
at org.javacs.kt.CompilerClassPath.refresh$default(CompilerClassPath.kt:31)
at org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:98)
at org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:117)
at org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:71)
at org.javacs.kt.util.AsyncExecutor.compute$lambda-2(AsyncExecutor.kt:19)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 3 more
The extension log shows:
[2021-12-18 11:51:28.974] [exthost] [error] Activating extension fwcd.kotlin failed due to an error:
[2021-12-18 11:51:28.975] [exthost] [error] Error: Internal error.
at /home/stephane/.vscode/extensions/fwcd.kotlin-0.2.23/dist/extension.js:2:815204
at /home/stephane/.vscode/extensions/fwcd.kotlin-0.2.23/dist/extension.js:2:815498
at Immediate.<anonymous> (/home/stephane/.vscode/extensions/fwcd.kotlin-0.2.23/dist/extension.js:2:815863)
at processImmediate (internal/timers.js:461:21)
It is a Gradle main project with a build.xml file in the project root directory, with Gradle sub projects and Maven sub projects.
There are many build.xml pom.xml gradlew gradlew.bat files in the sub projects.
Releases:
VSCode 1.63.2
Extensions:
Language Support for Java v1.2.0
Kotlin v0.2.23

failed to create bar error in ibm command console

i am getting below error when trying to create a bar using this command
Command: D:\ApacheAnt\apache-ant-1.9.7-bin\apache-ant-1.9.7\bin\ant -f build.xml
Error: D:\Ant Build and Deployment Scripts\AntBuild\Scripts>D:\ApacheAnt\apache-ant-1.9.7-bin\apache-ant-1.9.7\bin\ant -f build.xml
Buildfile: D:\Ant Build and Deployment Scripts\AntBuild\Scripts\build.xml
runScript:
buildWorkspace:
[echo] The applications [MF_HTB_B1_HTTPSOAPINPUT] will be checkout from SVN
under the URL [https://punitp134088l.ad.infosys.com/svn/ESB_Rep/branches/ESB_Fr
ameWork/ESB_FRAMEWORK/CODE_BASE/HTTP%20Based%20Framework/MF_HTB_B1]
[mkdir] Created dir: D:\Ant Build and Deployment Scripts\AntBuild\BuildPacka
ge\tempWorkspace\MF_HTB_B1_HTTPSOAPINPUT
svnCheckout:
[echo] Checking-out MF_HTB_B1_HTTPSOAPINPUT from SVN
[svn] <Checkout> started ...
[svn] Command completed abnormally.
[svn] <Checkout> finished.
[echo] Checkout completed
buildBarfiles:
[echo] Compile and Create Bar files for [MF_HTB_B1_HTTPSOAPINPUT] applicati
ons
[mkdir] Created dir: D:\Ant Build and Deployment Scripts\AntBuild\BuildPacka
ge\BarFiles
[echo] D:\Ant Build and Deployment Scripts\AntBuild\Scripts
[echo] Compiling Application [MF_HTB_B1_HTTPSOAPINPUT] for any errors
[exec] Result: 1
[delete] Deleting: D:\Ant Build and Deployment Scripts\AntBuild\BuildPackage\
Logs\MF_HTB_B1_HTTPSOAPINPUT.log
[echo] Failed to create MF_HTB_B1_HTTPSOAPINPUT.bar, Please check ..\BuildP
ackage\Logs\BuildPackage.log for logs
applyBarOverride:
[echo] Executing [mqsiapplybaroverride] for Application [MF_HTB_B1_HTTPSOAP
INPUT]
BUILD FAILED
D:\Ant Build and Deployment Scripts\AntBuild\Scripts\build.xml:42: The following
error occurred while executing this line:
D:\Ant Build and Deployment Scripts\AntBuild\Scripts\build.xml:175: The followin
g error occurred while executing this line:
D:\Ant Build and Deployment Scripts\AntBuild\Scripts\build.xml:182: Execute fail
ed: java.io.IOException: Cannot run program "mqsiapplybaroverride" (in directory
"D:\Ant Build and Deployment Scripts\AntBuild\Scripts"): CreateProcess error=2,
The system cannot find the file specified
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1059)
at java.lang.Runtime.exec(Runtime.java:629)
at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Jav
a13CommandLauncher.java:58)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:426)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:440)
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:629)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:670)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:496)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:396)
at net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate
.java:228)
at net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:253)
at net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:213)
at net.sf.antcontrib.logic.For.execute(For.java:166)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
CheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:854)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th
e file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:397)
at java.lang.ProcessImpl.start(ProcessImpl.java:148)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1040)
... 62 more
Total time: 10 seconds
i am running a command to execute ant script. Command: D:\ApacheAnt\apache-ant-1.9.7-bin\apache-ant-1.9.7\bin\ant -f build.xml this is for creating a bar file using apache ant s/w. Build.xml ant script is used to create a BuildPackage.zip file and include the bar files, deployment scripts and environment specific property files into it. but not able to create the bar. Getting above error.
Please assist.
Assuming you are trying to create a .jar file using ant script, try to use JDK as installed JRE in eclipse(if you have), and to set the JAVA-HOME variable to JDK path.

Mobile First Server installation error

Problem:
Encountered this error when trying to install MobileFirst Server 7.1:
CRIMA1217E: Problem occurred during the execution of the /opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml file.
This is the /opt/IBM/MobileFirst_Platform_Server/failed-install.log:
Detected Java version: 1.7 in:
/opt/IBM/InstallationManager/eclipse/jre_7.0.9010.20151006_1234/jre
Detected OS: Linux parsing buildfile
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml
with URI =
file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml
Project base dir set to:
/opt/IBM/MobileFirst_Platform_Server/WorklightServer parsing buildfile
jar:file:/opt/IBM/InstallationManager/eclipse/plugins/org.apache.ant_1.8.3.v201301120609/lib/ant.jar!/org/apache/tools/ant/antlib.xml
with URI =
jar:file:/opt/IBM/InstallationManager/eclipse/plugins/org.apache.ant_1.8.3.v201301120609/lib/ant.jar!/org/apache/tools/ant/antlib.xml
from a zip file [macrodef] creating macro ant-loop [macrodef]
creating macro copy-confidential-file [macrodef] creating macro
create-user-read-protected-dir [macrodef] creating macro
protect-allfiles-in-destination-dir [macrodef] creating macro
ant-escape [macrodef] creating macro argpart-escape [macrodef]
creating macro arg-escape Build sequence for target(s)
`ant-loop-callee' is [ant-loop-callee] Complete build sequence is
[ant-loop-callee, swallow-update-properties, init0, init1, init2,
init3, init, show-properties, unconfigure-shortcuts,
unconfigure-appcenter-appserver, uninstall-cleanup, uninstall,
cleanup-properties-file-for-appserver=was85liberty, cleanup, main,
ant-loop-inside-installation-manager.part2.if-install,
configure-shortcuts, safe-uninstall,
ant-loop-inside-installation-manager.part1,
ant-loop-inside-installation-manager.part2.if-not-install,
ant-loop-inside-installation-manager.part3.if-install-failed,
ant-loop-inside-installation-manager.part3.if-not-install-failed,
ant-loop-inside-installation-manager,
cleanup-properties-file-for-appserver=tomcat, ant-loop-standalone,
configure-config-tool, safe-foo, restore-embedded-server-location,
delete-update-properties, configure-appcenter-database,
configure-appcenter-appserver, fix-permissions-in-scripts, install,
safe-install, protect-one-file,
cleanup-properties-file-for-appserver=was, ]
ant-loop-callee: parsing buildfile
jar:file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/uninstall/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml
with URI =
jar:file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/uninstall/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml
from a zip file parsing buildfile
jar:file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/uninstall/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml
with URI =
jar:file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/uninstall/ant-contrib-1.0b3.jar!/net/sf/antcontrib/antlib.xml
from a zip file Project base dir set to:
/opt/IBM/MobileFirst_Platform_Server/WorklightServer [antcall]
calling target(s) [install] in build file
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml
parsing buildfile
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml
with URI =
file:/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml
Project base dir set to:
/opt/IBM/MobileFirst_Platform_Server/WorklightServer [macrodef]
creating macro ant-loop [macrodef] creating macro
copy-confidential-file [macrodef] creating macro
create-user-read-protected-dir [macrodef] creating macro
protect-allfiles-in-destination-dir [macrodef] creating macro
ant-escape [macrodef] creating macro argpart-escape Override ignored
for property "argpart-escape.doublequote.escaped" [macrodef] creating
macro arg-escape Build sequence for target(s) install' is
[restore-embedded-server-location, delete-update-properties, init0,
init1, show-properties, init2, init3, init,
configure-appcenter-database, configure-appcenter-appserver,
fix-permissions-in-scripts, configure-config-tool,
configure-shortcuts, cleanup, install] Complete build sequence is
[restore-embedded-server-location, delete-update-properties, init0,
init1, show-properties, init2, init3, init,
configure-appcenter-database, configure-appcenter-appserver,
fix-permissions-in-scripts, configure-config-tool,
configure-shortcuts, cleanup, install, swallow-update-properties,
unconfigure-shortcuts, unconfigure-appcenter-appserver,
uninstall-cleanup, uninstall,
cleanup-properties-file-for-appserver=was85liberty, main,
ant-loop-inside-installation-manager.part2.if-install, safe-uninstall,
ant-loop-inside-installation-manager.part1,
ant-loop-inside-installation-manager.part2.if-not-install,
ant-loop-inside-installation-manager.part3.if-install-failed,
ant-loop-inside-installation-manager.part3.if-not-install-failed,
ant-loop-inside-installation-manager,
cleanup-properties-file-for-appserver=tomcat, ant-loop-standalone,
safe-foo, safe-install, protect-one-file, ant-loop-callee,
cleanup-properties-file-for-appserver=was, ] [antcall] Entering
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml...
Build sequence for target(s)install' is
[restore-embedded-server-location, delete-update-properties, init0,
init1, show-properties, init2, init3, init,
configure-appcenter-database, configure-appcenter-appserver,
fix-permissions-in-scripts, configure-config-tool,
configure-shortcuts, cleanup, install] Complete build sequence is
[restore-embedded-server-location, delete-update-properties, init0,
init1, show-properties, init2, init3, init,
configure-appcenter-database, configure-appcenter-appserver,
fix-permissions-in-scripts, configure-config-tool,
configure-shortcuts, cleanup, install, swallow-update-properties,
unconfigure-shortcuts, unconfigure-appcenter-appserver,
uninstall-cleanup, uninstall,
cleanup-properties-file-for-appserver=was85liberty, main,
ant-loop-inside-installation-manager.part2.if-install, safe-uninstall,
ant-loop-inside-installation-manager.part1,
ant-loop-inside-installation-manager.part2.if-not-install,
ant-loop-inside-installation-manager.part3.if-install-failed,
ant-loop-inside-installation-manager.part3.if-not-install-failed,
ant-loop-inside-installation-manager,
cleanup-properties-file-for-appserver=tomcat, ant-loop-standalone,
safe-foo, safe-install, protect-one-file, ant-loop-callee,
cleanup-properties-file-for-appserver=was, ]
restore-embedded-server-location: [available] Unable to find file
server_rename.properties
delete-update-properties: [available] Unable to find file
update.properties
init0: [available] Found directory: /opt/IBM/WebSphere/Liberty
[available] Unable to find dir
/opt/IBM/WebSphere/Liberty/features/com.ibm.ws.cim_7.0.0.0 [available]
Unable to find dir /opt/IBM/WebSphere/Liberty/wlp [available] Found
directory: /opt/IBM/WebSphere/Liberty/bin [available] Found file:
/opt/IBM/WebSphere/Liberty/bin/server
init1:
[java] Executing '/opt/IBM/InstallationManager/eclipse/jre_7.0.9010.20151006_1234/jre/bin/java'
with arguments:
[java] '-classpath'
[java] '/opt/IBM/MobileFirst_Platform_Server/WorklightServer/worklight-ant-deployer.jar'
[java] 'com.ibm.worklight.config.helper.AntEscape'
[java] '={xyzzy}RF5WR3YIPKO7FELG71'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] Output redirected to property: appcenter-database.user.password.escaped
[java] Error redirected to property: AntEscape.appcenter-database.user.password.err [available] Unable to
find dir /opt/IBM/WebSphere/Liberty/wlp
[chmod] Executing 'chmod' with arguments:
[chmod] 'a+x'
[chmod] '/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/tools/android-sdk/bin.linux-x86/aapt'
[chmod] '/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/tools/android-sdk/bin.macosx-x86/aapt'
[chmod] '/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/tools/android-sdk/bin.windows-x86/aapt.exe'
[chmod]
[chmod] The ' characters around the executable and arguments are
[chmod] not part of the command.
[chmod] Applied chmod to 3 files and 0 directories.
show-properties:
[echo] Ant called by IM:
[echo] ${ant.version}=Apache Ant(TM) version 1.8.3 compiled on February 26 2012
[echo] ${java.home}=/opt/IBM/InstallationManager/eclipse/jre_7.0.9010.20151006_1234/jre
[echo] ${java.fullversion}=JRE 1.7.0 IBM J9 2.6 Linux amd64-64 Compressed References 20150701_255667 (JIT enabled, AOT enabled)
[echo] J9VM - R26_Java726_SR9_20150701_0050_B255667
[echo] JIT - tr.r11_20150626_95120.01
[echo] GC - R26_Java726_SR9_20150701_0050_B255667_CMPRSS
[echo] J9CL - 20150701_255667
[echo] ${output.file.name}=/var/ibm/InstallationManager/logs/mobilefirst-platform-server-install-20160117_1539a.log
[echo]
[echo] Variables set by im-custom-panels (list last updated on 2013-10-11):
[echo] ${update.minimal}=false
[echo] ${update.from.version}=
[echo] ${im.package.group}=IBM MobileFirst Platform Server
[echo] ${windows.common.configurationtool.shortcut.file}=
[echo] ${windows.user.configurationtool.shortcut.file}=
[echo] ${appserver.selection_}=was
[echo] ${appserver.selection}=was85liberty
[echo] ${appserver.was.installdir}=/opt/IBM/WebSphere/Liberty/
[echo] ${appserver.was.profile}=Liberty
[echo] ${appserver.was.cell}=
[echo] ${appserver.was.node}=
[echo] ${appserver.was.scope}=
[echo] ${appserver.was.serverInstance}=
[echo] ${appserver.was.nd.cluster}=
[echo] ${appserver.was.nd.node}=
[echo] ${appserver.was.nd.server}=
[echo] ${appserver.was.admin.name}=
[echo] ${appserver.was.admin.password}=
[echo] ${appserver.was.appcenteradmin.password}=
[echo] ${appserver.was.serial}=
[echo] ${appserver.was85liberty.installdir}=/opt/IBM/WebSphere/Liberty/
[echo] ${appserver.was85liberty.serverInstance_}=mfp
[echo] ${appserver.was85liberty.backup.file}=
[echo] ${appserver.was85liberty.backup.restore}=
[echo] ${appserver.tomcat.installdir}=
[echo] ${database.selection}=oracle
[echo] ${database.preinstalled}=true
[echo] ${database.derby.datadir}=
[echo] ${database.db2.host}=
[echo] ${database.db2.port}=
[echo] ${database.db2.driver}=
[echo] ${database.db2.appcenter.user.name}=
[echo] ${database.db2.appcenter.user.password}=
[echo] ${database.db2.appcenter.dbname}=
[echo] ${database.db2.appcenter.schema}=
[echo] ${database.mysql.host}=
[echo] ${database.mysql.port}=
[echo] ${database.mysql.driver}=
[echo] ${database.mysql.appcenter.user.name}=
[echo] ${database.mysql.appcenter.user.password}=
[echo] ${database.mysql.appcenter.dbname}=
[echo] ${database.oracle.driver}=/home/ubuntu/wkMacDownloads/JDBC11G/ojdbc6.jar
[echo] ${database.oracle.appcenter.user.name_}=WLADMIN
[echo] ${database.oracle.appcenter.user.name.jdbc_}=WLADMIN
[echo] ${database.oracle.appcenter.user.password}={xyzzy}RF5WR3YIPKO7FELG71
[echo] ${database.oracle.appcenter.jdbc.url}=jdbc:oracle:thin:#mposvsit.ci6bzozvzhi4.ap-southeast-1.rds.amazonaws.com:1525:MPOS
[echo] ${writable.data.user}=ubuntu
[echo] ${writable.data.group}=
[echo]
[echo] Sleeping, take your time...
[sleep] sleeping for 10000 milliseconds
init2: [available] Unable to find file
/opt/IBM/WebSphere/Liberty/etc/server.env
init3:
[java] Executing '/opt/IBM/InstallationManager/eclipse/jre_7.0.9010.20151006_1234/jre/bin/java'
with arguments:
[java] '-classpath'
[java] '/opt/IBM/MobileFirst_Platform_Server/WorklightServer/worklight-ant-deployer.jar'
[java] 'com.ibm.worklight.config.helper.appserver.WASLibertyFindPort'
[java] '/opt/IBM/WebSphere/Liberty//usr/servers/mfp'
[java]
[java] The ' characters around the executable and arguments are
[java] not part of the command.
[java] Output redirected to /opt/IBM/MobileFirst_Platform_Server/WorklightServer/WASLibertyFindPort.out
[java] Error redirected to property: WASLibertyFindPort.err [available] Found file: WASLibertyFindPort.out
[echo] WASLibertyFindPort => appserver.was85liberty.protocol = http
[echo] WASLibertyFindPort => appserver.was85liberty.port = 9080 [delete] Deleting:
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/WASLibertyFindPort.out
init:
configure-appcenter-database: [configuredatabaseIMWrapper] Logging
output of task to file
/root/.mobilefirst_platform_server/configuration-logs/configureDatabase_ApplicationCenter_2016_01_17_15_39_22.log
[configuredatabaseIMWrapper] Checking connectivity to
ApplicationCenter database with user/schema 'WLADMIN'...
[configuredatabaseIMWrapper] Connection to ApplicationCenter database
with user/schema 'WLADMIN' succeeded. [configuredatabaseIMWrapper]
Getting the version of ApplicationCenter database ...
[configuredatabaseIMWrapper] Test if the table APPCNTR_VERSION exists
and if yes, get the version. [configuredatabaseIMWrapper] Table
APPCNTR_VERSION exists, reading its value... [antcall] Exiting
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml.
BUILD FAILED
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml:332:
The following error occurred while executing this line:
/opt/IBM/MobileFirst_Platform_Server/WorklightServer/post-install.xml:2096:
The SQL query SELECT APPCNTR_VERSION FROM APPCNTR_VERSION returned no
rows, but expected 1 row. at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask$1.call(ConfigureDatabaseTask.java:1863)
at
com.ibm.worklight.config.util.database.DatabaseUtil.withConnection(DatabaseUtil.java:420)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask.getSQLQueryResult(ConfigureDatabaseTask.java:1852)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask.getDatabaseVersionApplicationCenter(ConfigureDatabaseTask.java:1045)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask.getDatabaseVersion(ConfigureDatabaseTask.java:855)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask.checkDatabasesConnectivity(ConfigureDatabaseTask.java:781)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseTask.execute(ConfigureDatabaseTask.java:289)
at
com.ibm.worklight.config.ant.database.ConfigureDatabaseIMWrapper.execute(ConfigureDatabaseIMWrapper.java:159)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620) at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348) at
org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197) at
sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620) at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620) at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348) at
org.apache.tools.ant.Target.execute(Target.java:392) at
org.apache.tools.ant.Target.performTasks(Target.java:413) at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at
org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620) at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348) at
org.apache.tools.ant.Target.execute(Target.java:392) at
org.apache.tools.ant.Target.performTasks(Target.java:413) at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at
org.apache.tools.ant.Main.runBuild(Main.java:811) at
org.apache.tools.ant.Main.startAnt(Main.java:217) at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 20 seconds
What I've tried:
According to this post, I've tried to change the /etc/hosts file ip to the host IP accordingly (got this ip from ifconfig):
Updated
IBM Installation Manager is able to detect the 2 server instances with the name "mfp" and "analytics":
ANT script property:
According to log, it sounds like some kind of bug, during AppCenter database tables check (database exists, successful connection verified) -
"The SQL query SELECT APPCNTR_VERSION FROM APPCNTR_VERSION returned no rows, but expected 1". Instead of exiting it needs to actually create those tables. Ideally you should open a PMR to IBM support with this.
But you can try to overcome this issue in 2 ways.
By trying to execute SQL script manually within your DB and then re-run installer. Most probably it will go through fluently afterwards. For oracle file called create-appcenter-oracle.sql and it is located somewhere under /opt/IBM/MobileFirst_Platform_Server/ApplicationCenter
By setting up Application Center manually (executing sql script on database, installing/moving war files and configuring server) and then deselect checkbox to install appcenter during installation with Installation Manager.
Follow instructions on Knowledge center for your DB
http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.installconfig.doc/admin/c_manually_configuring_databases_for_ac.html
You can also get some insights from here (prior to lab 8.3) https://mfp.help/appcenter-on-bluemix/
Hopefully installer will afterwards go fine for MFP Server and Analytics database, otherwize you will need to setup those sings also manually using ant scripts.
Basically, it is possible to install Application Center either manually or using Ant tasks.
So you may try choosing not installing Application Center in Installation Manager by checking radio button "No" when prompting to do so. This way, Installation Manager will certainly completes the installation successfully in your target directory "/opt/IBM/MobileFirst_Platform_Server".
Afterwards, you may create the Application Center database using the script create-appcenter-oracle.sql that should have been installed in
"/opt/IBM/MobileFirst_Platform_Server/ApplicationCenter/configuration-samples"
https://www-01.ibm.com/support/knowledgecenter/SSHSCD_7.1.0/com.ibm.worklight.installconfig.doc/admin/t_setting_up_your_oracle_database_manually_for_ac.html?lang=en
After the Application Center database is created, the next step is to deploy Application Center to your Liberty profile using Ant task for example
https://www-01.ibm.com/support/knowledgecenter/SSHSCD_7.1.0/com.ibm.worklight.installconfig.doc/appcenter/t_ac_deploy_cons_serv_ant_tasks.html?lang=en

Apache Mahout Maven Build Failure MRLegacy

Facing this error while configuring Apache Mahout.
I am using the following:
Java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Maven Version:
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:28+0530)
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: /usr/java/jdk1.8.0_31/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-504.3.3.el6.x86_64", arch: "amd64", family: "unix"
Here is the error I am facing:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (job) on project mahout-mrlegacy: Failed to create assembly: Error creating assembly archive job: error in opening zip file -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4:single (job) on project mahout-mrlegacy: Failed to create assembly: Error creating assembly archive job: error in opening zip file
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error creating assembly archive job: error in opening zip file
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:495)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error creating assembly archive job: error in opening zip file
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:190)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:436)
... 21 more
Caused by: org.codehaus.plexus.archiver.ArchiverException: error in opening zip file
at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:472)
at org.apache.maven.plugin.assembly.filter.ComponentsXmlArchiverFileFilter.finalizeArchiveCreation(ComponentsXmlArchiverFileFilter.java:166)
at org.codehaus.plexus.archiver.AbstractArchiver.runArchiveFinalizers(AbstractArchiver.java:884)
at org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:908)
at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:512)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:186)
... 22 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:220)
at java.util.zip.ZipFile.<init>(ZipFile.java:150)
at java.util.zip.ZipFile.<init>(ZipFile.java:164)
at org.codehaus.plexus.components.io.resources.PlexusIoZipFileResourceCollection.getEntries(PlexusIoZipFileResourceCollection.java:53)
at org.codehaus.plexus.components.io.resources.AbstractPlexusIoArchiveResourceCollection.getResources(AbstractPlexusIoArchiveResourceCollection.java:76)
at org.codehaus.plexus.components.io.resources.proxy.PlexusIoProxyResourceCollection.getResources(PlexusIoProxyResourceCollection.java:89)
at org.codehaus.plexus.archiver.AbstractArchiver$1.hasNext(AbstractArchiver.java:468)
... 27 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :mahout-mrlegacy
Any help will be deeply appreciated.
I found the solution the problem:
I updated the version of Apache Maven which I was using to "Apache Maven 3.2.5" and also had to remove to ".m2" directory.
After than ran "mvn -DskipTests clean install" and things got resolved.
Hope this helps anyone who gets stuck on the same issue.

error occurs while generating apk file using android-maven-plugin

`I am using android eclipse,i develop a project and add the dependencies GOOGLE play services,
app compact v7 in build path.When i run it as a normal android project it is perfectly executing,I add maven POM.XML file to generate APK file,when i proceed to maven install it gives error.
Error :
[ERROR] Error when generating sources.
org.apache.maven.plugin.MojoExecutionException:
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:608)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute(GenerateSourcesMojo.java:229)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe /X /C "D:\NagarjunaWork\android\adt-bundle-windows-x86_64-20140321\sdk\build-tools\android-4.4.2\aapt.exe package -f --no-crunch -I D:\NagarjunaWork\android\adt-bundle-windows-x86_64-20140321\sdk\platforms\android-19\android.jar -M D:\5-8-2014\QuickRideApp\QuickRide\AndroidManifest.xml -S D:\5-8-2014\QuickRideApp\QuickRide\res -A D:\5-8-2014\QuickRideApp\QuickRide\target\generated-sources\combined-assets -m -J D:\5-8-2014\QuickRideApp\QuickRide\target\generated-sources\r --output-text-symbols D:\5-8-2014\QuickRideApp\QuickRide\target --auto-add-overlay", Result = -1073741819
at com.jayway.maven.plugins.android.CommandExecutor$Factory$DefaultCommandExecutor.executeCommand(CommandExecutor.java:252)
at com.jayway.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR(GenerateSourcesMojo.java:604)
... 23 more
This can be caused by problems in your XML files, such as referring to a resource ID that no longer exists or never existed. See MojoExecutionException: Maven with Android and aapt.exe has stopped working for possible solutions.