I have Ubuntu 16.04. I downloaded and installed bazel according to the official bazel guide and after that I downloaded the first tutorial for building a Java project but it didn't work. I got this exception:
unexpected pipe read status: (error: 2): No such file or directory
Server presumed dead. Now printing '/home/jingw222/.cache/bazel/_bazel_jingw222/ada033fd33c06190d78b77ab4907f1d0/server/jvm.out':
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.ensureError(J9VMInternals.java:141)
at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:130)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.skyFunctions(SkyframeExecutor.java:348)
at com.google.devtools.build.lib.skyframe.SkyframeExecutor.init(SkyframeExecutor.java:586)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.init(SequencedSkyframeExecutor.java:252)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.create(SequencedSkyframeExecutor.java:211)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutor.create(SequencedSkyframeExecutor.java:162)
at com.google.devtools.build.lib.skyframe.SequencedSkyframeExecutorFactory.create(SequencedSkyframeExecutorFactory.java:48)
at com.google.devtools.build.lib.runtime.WorkspaceBuilder.build(WorkspaceBuilder.java:81)
at com.google.devtools.build.lib.runtime.BlazeRuntime.initWorkspace(BlazeRuntime.java:204)
at com.google.devtools.build.lib.runtime.BlazeRuntime.newRuntime(BlazeRuntime.java:1023)
at com.google.devtools.build.lib.runtime.BlazeRuntime.createBlazeRPCServer(BlazeRuntime.java:850)
at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:789)
at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:570)
at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:56)
Caused by: java.lang.ClassCastException: com.ibm.lang.management.UnixExtendedOperatingSystem incompatible with com.sun.management.OperatingSystemMXBean
at com.google.devtools.build.lib.util.ResourceUsage.<clinit>(ResourceUsage.java:45)
... 13 more
What can caouse the problem?
I found this issue, and finally I realized, that I need to download the jdk manually. So I used this command:
sudo apt-get install openjdk-8-jdk
After that I built it again, and it worked well.
Related
brew install leiningen
I got
Compiling joy.gui.DynaFrame
Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
Exception in thread "main" java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath: , compiling:(/private/var/folders/zm/swyymlvn4l7__d1rln_n391r0000gn/T/form-init7580966196782799989.clj:1:124)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate joy/gui/DynaFrame__init.class or joy/gui/DynaFrame.clj on classpath:
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5066.invoke(core.clj:5641)
at clojure.core$load.doInvoke(core.clj:5640)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5446)
at clojure.core$compile$fn__5071.invoke(core.clj:5652)
at clojure.core$compile.invoke(core.clj:5651)
at user$eval20$fn__29.invoke(form-init7580966196782799989.clj:1)
at user$eval20.invoke(form-init7580966196782799989.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6703)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
... 11 more
Compilation failed: Subprocess failed
I tried to reinstall but the issue does not solved.
When I type,
lein version
I got this:
Leiningen 2.9.1 on Java 12 Java HotSpot(TM) 64-Bit Server VM
I installed Java correctly but not sure where to start to fix this problem.
I looked around and it seems you are trying to run an old example from The Joy of Clojure, right?
The example needed a minor touch-up for me to be able to run it.
I created a new Leiningen project first with lein new app dynademo.
Inside the new project folder, I created the directories for the namespace: mkdir -p src/joy/gui
Created the file src/joy/gui/DynaFrame.clj
The Leiningen project that we just created with lein new ... uses Clojure 1.10, which doesn't seem to like one thing:
Replace the line with :prefix df- with :prefix "df-" (eg. wrap the value df- in quotes)
Save the file, and now you can launch the window from the REPL, like this:
$ lein repl
nREPL server started on port 44037 on host 127.0.0.1 - nrepl://127.0.0.1:44037
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
OpenJDK 64-Bit Server VM 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
dynaframe.core=> (compile 'joy.gui.DynaFrame)
joy.gui.DynaFrame
dynaframe.core=> (def hello-frame (joy.gui.DynaFrame. "Hello"))
#'dynaframe.core/hello-frame
dynaframe.core=> (.show hello-frame)
nil
It looks like this:
(you will need to move/resize the window a bit, but you get the idea). Note: I'm using Java 8 (JDK 1.8.0_191) but it should work the same in JDK 12.
Goodmorning,
Today I started with a POC with SikuliX and Java. I want to try the example in this link. Here a part of the screen is captured and searched.
When I execute this, I receive the error:
[error] RunTimeAPI: loadLib: opencv_java not usable:
java.lang.UnsatisfiedLinkError: no opencv_java in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.sikuli.script.FindInput2.<clinit>(FindInput2.java:17)
at org.sikuli.script.Finder.<init>(Finder.java:21)
at org.sikuli.script.Region.doCheckLastSeenAndCreateFinder(Region.java:2936)
at org.sikuli.script.Region.checkLastSeenAndCreateFinder(Region.java:2897)
at org.sikuli.script.Region.doFind(Region.java:2827)
at org.sikuli.script.Region.find(Region.java:2325)
at Apl.sikuliXHighlight(Apl.java:50)
at Apl.main(Apl.java:26)
Caused by: org.sikuli.script.SikuliXception: fatal: problem with native library: opencv_java
at org.sikuli.script.RunTime.terminate(RunTime.java:70)
at org.sikuli.script.RunTime.libsLoad(RunTime.java:792)
at org.sikuli.script.RunTime.loadLibrary(RunTime.java:949)
at org.sikuli.script.Finder2.<clinit>(Finder2.java:35)
... 8 more
[4346 debug] RunTimeAPI: ***** final cleanup at System.exit() *****
I added the library to my POM.XML. But that didn't help.
Did I use the wrong library?
Some additional info:
I am using Intellij on an Ubuntu 18.10 machine.
If I missed something, please let me know. Many thanks in advance.
#Edit:
I had checked out the possible duplicate post. But I am not using OpenCV, but SikuliX. I just need OpenCV as a dependency (as it is being used by SikuliX).
#Edit2:
After more digging and trying to follow the information from the link (duplicate) I found this. Which provides the required info for use on Linux systems.
First check java version.
java -version
After that install opencv
sudo apt install libopencv3.2-java
sudo ln -s /usr/lib/jni/libopencv_java320.so /usr/lib/libopencv_java.so
I downloaded ingest-attachment plugin 6.3.0 version to my machine and trying to install using command prompt in my windows machine and am getting the error.
Please find the error that am getting while installing ingest-attachment plugin.
I have install elasticsearch 6.2.3 version.
D:\1SearchEngine\elasticsearch-6.2.3\elasticsearch-6.2.3>bin\elasticsearch-plugi
n install d:\1SearchEngine\ingest-attachment\ingest-attachment-6.3.0.zip
-> Downloading d:\1SearchEngine\ingest-attachment\ingest-attachment-6.3.0.zip
Exception in thread "main" java.net.MalformedURLException: unknown protocol: d
at java.net.URL.<init>(URL.java:600)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at org.elasticsearch.plugins.InstallPluginCommand.downloadZip(InstallPlu
ginCommand.java:329)
at org.elasticsearch.plugins.InstallPluginCommand.download(InstallPlugin
Command.java:253)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginC
ommand.java:221)
at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginC
ommand.java:212)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwar
eCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1
24)
at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:1
24)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)
D:\1SearchEngine\elasticsearch-6.2.3\elasticsearch-6.2.3>
The documentation says that:
bin\elasticsearch-plugin install file:///C:/path/to/plugin.zip
You are missing file://.
I want to build my projects on a Windows machine, so I created a slave there. First we tried the standard java application runner, but our build sets up its own environment and it always ended up deleting the existing Java installation, not giving any proper error messages, but failing. Then I switched to using Cygwin sshd and have Jenkins log in via ssh. This works for the connection (just as the standard method worked), but when I ran the build then it failed again to install the jdk. I ended up running the following command by hand:
C:\jenkins\tools\hudson.model.JDK\Latest\jdk.exe ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\jenkins\tools\hudson.model.JDK\Latest /L
This is the same as Jenkins would run, but without the /s (silent) option. Now when I run the build, I get the following error:
Building remotely on jenkins-slave-win64 (Johnny5) (windows) in workspace C:\jenkins\workspace\continuous.xill
java.io.IOException: remote file operation failed: C:\jenkins\tools\hudson.model.JDK\Latest at hudson.remoting.Channel#200354fa:jenkins-slave-win64 (Johnny5): java.nio.file.AccessDeniedException: C:\jenkins\tools\hudson.model.JDK\Latest\bin\java.exe
at hudson.FilePath.act(FilePath.java:987)
at hudson.FilePath.act(FilePath.java:969)
at hudson.FilePath.deleteRecursive(FilePath.java:1171)
at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:130)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at hudson.model.JDK.forNode(JDK.java:132)
at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:360)
at hudson.model.Run.getEnvironment(Run.java:2234)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:935)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1036)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Caused by: java.nio.file.AccessDeniedException: C:\jenkins\tools\hudson.model.JDK\Latest\bin\java.exe
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
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 hudson.Util.deleteFile(Util.java:247)
Of course I tried everything:
Run sshd as a different (Administrator) user
Checked every error mentioned here:
https://wiki.jenkins-ci.org/display/JENKINS/SSH+slaves+and+Cygwin
here
https://wiki.jenkins-ci.org/display/JENKINS/My+software+builds+on+my+computer+but+not+on+Jenkins
and here
http://www.noah.org/ssh/cygwin-sshd.html
And nothing works. Do you have a hint where to look?
UPDATE:
Meanwhile I managed to get a bit further in the build process by deactivating the option to "Automatically install jdk" in the Jenkins settings, git clone works and gradle starts up. However, now the JAVA_HOME environment variable somehow is not accessible to the slave (although we even tried setting it in .bashrc, just to be sure). So the build fails with this message":
FAILURE: Build failed with an exception.
* Where:
Script 'http://dl.bintray.com/content/shemnon/javafx-gradle/8.1.1/javafx.plugin' line: 60
* What went wrong:
A problem occurred evaluating script.
> Could not find JavaFX Packager Tools, please set one of [jfxrtDir in Gradle Properties, JFXRT_HOME in System Environment, JAVA_HOME in System Environment, java.home in JVM properties]
For your build error after "UPDATE" I think you have to add a JDK under Manage Jenkins > Configure System > JDK or in newer versions under Manage Jenkins > Global Tool Configuration > JDK
I am getting following error while installing the JDK 7u15 version on Red Hat Enterprise Linux box.
I am not able figure out what to do with it? I mean what is impact on running my programs?
What are these pack files?
charsets.pack
deploy.pack
javaws.pack
jsse.pack
localedata.pack
plugin.pack
rt.pack
I have followed the steps given in oracle site:
http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html
RHEL version: 6
Here is the exact message from putty:
bash-4.1$ sudo rpm -ivh jdk-7u15-linux-i586.rpm
Preparing... ########################################### [100%]
1:jdk ########################################### [100%]
Unpacking JAR files...
rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/charsets.pack
tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/lib/tools.pack
localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/ext/localedata.pack
plugin.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/plugin.pack
javaws.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/javaws.pack
deploy.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_15/jre/lib/deploy.pack
Recently I have got the same problem on Fedora. After researching on the Internet, it has been discussed somewhere (I will add the reference later if I can find it again) that these are normal. It appears that the installer is trying the open *.pack file when they are already gone because they are renamed to *.jar. For some reasons, they are not trying to fix this problem in any newer installer.
Here are the references:
http://forums.fedoraforum.org/showthread.php?t=283237
http://wiki.rosalab.ru/en/index.php/Howto_install_proprietary_Java_from_Oracle
Errors when installing jdk 1.7 in linux
http://forums.fedoraforum.org/showthread.php?t=285076