After coming back to a part of my code base that hadn't been touched for a few weeks, I got the rather terse message: "Could not initialize class sun.security.ec.SunEC" from my functional REST test cases.
I'm not making much progress figuring out how tackle this one, there's no other error information (no stack trace) and not much on the Internet. I expect an update has changed something since everything was working.
Does anyone have any suggestions or insight for fixing this one?
Ubuntu 16.10
Java 8, Oracle, "1.8.0_131"
The problem was caused by a missing library libsunec.so. I was using the alpine docker container V3.4 which contained the library, but when I upgraded to V3.5, a "glich" in my build process actually had me still using V3.4. When that was indirectly "fixed," and I unknowingly started using V3.5, the error was suddenly, and confusingly, uncovered because libsunec.so was left out of alpine V3.5. See: https://bugs.alpinelinux.org/issues/6809
Related
First time with JavaFx. To begin with, I've made sure that my version of Java is, indeed, Java 13: Screenshot:
And, I've followed all the directions on the JavaFx tutorials: https://openjfx.io/openjfx-docs/#introduction
I've spent so many hours on this issue. I found similar problems, but the closest "solution" to my problem assumed that the VM customization was put in verbatim, but I have made sure to use the correct path. I have tried the tutorials for both modular and non-modular applications. I have customized everything, for the project itself to Appearance and Behavior preferences. I downloaded the separate JavaFx 13 file from via Gluon and made sure I was able to access them (I have a Mac, so this required a security override).
I have gone so far as to uninstall all Java and JavaFx libraries from my computer and reinstalled them.
After trying what seems to be everything, I have the same error :(
Screenshot:
Otherwise, if I try to toggle some, I'll get the classic (but dreaded) result:
"Error occurred during initialization of boot layer
java.lang.module.FindException: Module JavaFxProject not found"
Does anybody have some insight into this? I'd love to find out it was a tiny bug that I could easily eliminate, even though I've already spent so many hours trying to solve this problem myself.
Thanks in advance.
I would like to load an op from tf.contrib, specifically "_beam_search_ops". I use Tensorflow 1.6 from Maven.
Following the answer at Issue while loading/serving tensorflow model in java using estimators , I'm able to do so on Ubuntu 17.10.
The code looks like so:
TensorFlow.loadLibrary("_beam_search_ops.so");
Then I try to do the same in Windows 10 with code
TensorFlow.loadLibrary("_beam_search_ops.dll");
And it fails with
java.lang.UnsatisfiedLinkError: D:\Users\ALEXAN~1\AppData\Local\Temp\deep_api_plugin\_beam_search_ops.dll not found
at org.tensorflow.TensorFlow.loadLibrary(TensorFlow.java:47)
So what is the reason for this?
While I was writing and researching the question, I've stumbled on the solution.
In order to resolve the problem, a _pywrap_tensorflow_internal.pyd file should be copied to the folder where _beam_search_ops.dll resides. I understand that this is also some kind of dll, but do not understand why it is necessary for Windows and not for Ubuntu. If anyone happens to know, please enlighten me.
Also I understand that this sort of additional information should be provided in a comment to the original answer, but unfortunately I do not have enough reputation to comment and thought this answer could help someone.
Edit: I was too quick to celebrate. With this answer a library is loaded without exception, but the model cannot seem to use it, failing with
Exception in thread "main" org.tensorflow.TensorFlowException: Op type not registered 'GatherTree' in binary running on DESKTOP-EB6GIDR. Make sure the Op and Kernel are registered in the binary running in this process.
at org.tensorflow.SavedModelBundle.load(Native Method)
at org.tensorflow.SavedModelBundle.load(SavedModelBundle.java:39)
Search for answer should continue.
I've been banging my head on this for about a week straight now and can't figure out why this is happening.
I'm using the latest stable version of the testrail-api-java (1.0.1) in a mavenized java 1.8 project with the latest Selenium and TestNG.
I'm attempting to update a test run with the results of a test using the following code:
List<ResultField> customResultField = testRail.resultFields().list().execute();
testRail.results().addForCase(testRun.getId(), testId, new Result().setStatusId(testStatus), customResultField).execute();
The update was failing with a RuntimeException:
com.fasterxml.jackson.databind.JsonMappingException: Failed to
getValue() with method
com.codepine.api.testrail.model.Result#getCustomFields(0 params): null
(through reference chain:
com.codepine.api.testrail.model.Result["[anySetter]"])
I debugged the code and noticed that this exception occurs and is caught during the attempted update of the run:
Method threw 'java.lang.NoSuchMethodError' exception. Cannot evaluate
com.codepine.api.testrail.model.Result.toString()
This appears to be an issue with the override of the base java util toString() method.
During debugging I checked for obvious things like null variables, scope issues, etc but wasn't able to really nail down why this is happening.
My java knowledge is prob novice at best as I'm self-taught so I apologize if this is obvious and not an actual issue with this library.
Any help would be greatly appreciated as I've tried literally everything I can think of.
UPDATE: I updated my pom to refer to version 1.0.2 in case I was mistaken about which version was stable and the exception still occurs.
UPDATE: A java developer thought it could be a Lombok issue and suggested adding Lombok to my classpath, the exception still occurs regardless.
I've reached out to the Git community for the library I'm using but haven't received a response at this time.
Link to issue posting (duplicate info) on the project's Github page: https://github.com/codepine/testrail-api-java-client/issues/14
https://github.com/codepine/testrail-api-java-client#thin-client-library
getCustomFields(0 params)
customResultField has no data, so could check above link and set proper customResultFields then try it.
I am learning deep learning, and use deeplearning4J tuts.
But when i run example code, some issue there :
Caused by: java.lang.UnsatisfiedLinkError: no jnind4j in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:727)
at org.bytedeco.javacpp.Loader.load(Loader.java:502)
at org.nd4j.nativeblas.NativeOps.<clinit>(NativeOps.java:37)
... 18 more
i have tried some solutions on web but it doesnot work.
So, if you know how to fix it, help me.
You need to unzip cuda-9.1-7.1-1.4.1-windows-x86_64.jar and nd4j-cuda-9.1-1.0.0-beta-windows-x86_64.jar somewhere, and add the paths to the native dlls to the java.library.path property when launching your app.
For example:
-Djava.library.path=C:\<path where you unzipped>\cuda-9.1-7.1-1.4.1-windows-x86_64\org\bytedeco\javacpp\windows-x86_64;C:\<path where you unzipped>\nd4j-cuda-9.1-1.0.0-beta-windows-x86_64\org\nd4j\nativeblas\windows-x86_64
I had the same problem. But the issue was I was using the wrong import , nd4j-native. Instead of that I used nd4j-native-platform import and it fixed the problem.
Hope it helps.
I will try to answer this here, but usually this is where the chat comes in handy (a lot of asking about your environment and back and forth here..)
I'd try to answer this here, but the native code (especially with the examples) should run fine.
You could also try filing an issue: https://github.com/deeplearning4j/dl4j-examples/issues
In the mean time, read up on what an nd4j backend is:
http://nd4j.org/backend.html
This SHOULD be the only dependency you need to run:
http://search.maven.org/#artifactdetails%7Corg.nd4j%7Cnd4j-native-platform%7C0.6.0%7Cjar
The examples run out of the box for everyone we've talked to.
You don't seem to be doing anything out of the ordinary.
An alternative might just be using the nd4j-native artifact id with the appropriate classifier.
This is where you modify the nd4j backend:
https://github.com/deeplearning4j/dl4j-examples/blob/master/dl4j-examples/pom.xml#L64
You can try just getting rid of this and replacing it with 1 of the artifact ids I told you about. If that doesn't fix it, I would recommend coming in to gitter.
Please come in to gitter: https://gitter.im/deeplearning4j/deeplearning4j
for real time help.
I was working this afternoon in my project without problems. Before come home I did a commit to my svn to continues it in home, but now when I try to run it shows a code error that hadn't shown before. The Following code it's supposed to initiate new scene using controllers and passing parameters. Error:
Someone knows what is happening? If you say "The code is wrong" it's not possible cause I was using the exactily same code in my work.
Detail, in the afternoon i was using Mac OS and now I'm using Windows. And IDE is Netbeans in booth places
My problem was not about code, actually the code is right.
The problem ocurred because my Netbeans was pointing to a old version of JavaFX. The way to fix it was to uninstall everything about java from my computer and after reinstall with the newer versions of JDK, JavaFx and Netbeans.
Cast your loaders to their appropriate types. For the first cast it to the Login Controller and for the second cast it to the MainViewController.
NetBeans only see's an abstract Object being returned, even though what is actually being returned is a little more specific. I'm not sure why this happened when you moved from one platform to the next (I assume you have the same version and everything), but some compliers will catch this as an error and others will not. Technically there is no error, just questionable results.