native library in an application Client - glassfish

I'm using jogl in an application that is deploeyd from a glassfish server .
I have tested the part using jogl in a jse and it works fine.
When i paste the code and add the libraries and run the programm via netbeans it didn't work.
I get this exception:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
What can i do to fix this problems ?
Thanks

In NetBeans under File / Project Properties, select "Run" from the "Categories" tree. In the "VM Options" box, add -Djava.library.path="<full path to your library>" with the quotation marks.

Related

Karate 0.9.1 - Exception in thread "main" java.lang.StackOverflowError

When I'm trying to run *.feature file or a single scenario with "right-click" (IntelliJ Idea), I've always received an exception:
Exception in thread "main" java.lang.StackOverflowError
at java.util.HashMap.<init>(HashMap.java:457)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:347)
at java.util.HashSet.<init>(HashSet.java:162)
at java.util.LinkedHashSet.<init>(LinkedHashSet.java:154)
at jdk.nashorn.internal.runtime.ScriptObject$KeyIterator.init(ScriptObject.java:2467)
at jdk.nashorn.internal.runtime.ScriptObject$ScriptObjectIterator.hasNext(ScriptObject.java:2441)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:368)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:363)
at jdk.nashorn.api.scripting.ScriptObjectMirror.inGlobal(ScriptObjectMirror.java:858)
at jdk.nashorn.api.scripting.ScriptObjectMirror.entrySet(ScriptObjectMirror.java:363)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:135)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:128)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:77)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:67)
...
Same scenario works fine if I run with TestRunner.java. Looks like that problem is in IJ cucumber plugin.
Maybe someone has a solution or workaround for this issue.
I'm using karate 0.9.1, cucumber for Java plugin: v183.4284.148, Idea 2018.3.3
No one has reported this - and from the stack-trace it looks like some JSON that you are using is being printed to the console - has some circular references, maybe you are using a Map of object references. But yes I can't explain why this works fine in the runner.
Can you follow the instructions here and submit a sample project, we can try open it in IntelliJ: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
EDIT: this was a cyclic reference, but we have fixed it to be safe in future.

How to import sample codename one demos in IntelliJ

I have downloaded the official codename one demos from here : https://github.com/codenameone/codenameone-demos
I opened one of the projects ( such as KitchenSink or Dr.Sbaitso ) in IntelliJ by going to File-> Open -> Selecting a project folder (KitchenSink).
I get the following error if I try to run the project:
Exception in thread "main" java.lang.ClassNotFoundException: com.codename1.impl.javase.Simulator
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0
Do I need to add some library files?Please share the process. Also, is there a way to automate this step(adding libraries) whenever we open a codename one project? For example, If I import an existing Android project, IntelliJ/Android Studio automatically configures it.
Thanks in Advance!
I suggest creating a new project with that name. Then copying the code from the demo. This will provide the libraries necessary to compile and the IntelliJ specific files.
Ideally we'll make this process simpler like we did on Eclipse/NetBeans but we currently don't have a dedicated IDEA plugin developer on staff.

Eclipse Null Pointer when adding HTML under skin folder

I have a simple hybrid App for Android phones. I have a skin folder created for Android tablets. I create an HTML file under the android.tablet but if this HTML file name match the same name of the HTML file under common folder then Eclipse shows a pop up error message that says:
'Building Workspace' has encountered a problem
Errors occurred during the build.
Java.Lang.NullPointerException
I have Eclipse Kepler SR1 64bits on OS X I get same error in Eclipse Juno on Win7.
This is the exception:
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
org.eclipse.core.runtime.CoreException: java.lang.NullPointerException
at com.worklight.studio.plugin.utils.PluginUtils.toCoreException(PluginUtils.java:138)
at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:112)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:69)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
at com.worklight.studio.plugin.builders.WorklightProjectBuilder.incrementalBuild(WorklightProjectBuilder.java:73)
at com.worklight.studio.plugin.builders.WorklightProjectBuilder.build(WorklightProjectBuilder.java:61)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.NullPointerException
at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:78)
... 19 more
I cannot confirm this using Worklight 6.1.0:
Created new project and application, "test"
Added the Android environment
Add a skin to the Android environment, "android.skin"
Copied common\index.html to android.skin\
No pop-up
Changed the HTML a bit
Run As > Run on Worklight Server
No pop-up
Suggestions:
Try with a new workspace
Close Eclipse and follow these instructions to delete the wlBuildResources folder

Drools Guvnor on Glassfish error

I'm trying to deploy Guvnor (guvnor-5.5.0.Final-tomcat-6.0) to a fresh
glassfish server ( 3.1.2.2 build 5) and am getting the error below.
I did try the other WARs without any luck and I get the same error on
OSX and windows.
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
java.lang.NoClassDefFoundError: org/apache/AnnotationProcessor. Please
see server.log for more details
Are there any work-around for this ?
Add the jasper-xxx.jar to your lib. It should work. If you deploy in tomcat, it should be in catalina.jar.
Unfortunately JBOSS 7 doesn't use tomcat instead it uses JBossWeb. That's why you have this problem.
Take the guvnor-5.5.0.Final-jboss-as-7.0.war binary war file
add dom4j-1.6.1.jar
remove javassit*.jars
add resteasy-jaxb-provider-2.2.3.GA.jar
add resteasy-jaxrs-2.2.3.GA.jar
Add the a glassfish-web.xml file to WEB-INF https://github.com/snowch/glassfish-guvnor/blob/master/src/main/webapp/WEB-INF/glassfish-web.xml
Replace WEB-INF/web.xml with this https://github.com/snowch/glassfish-guvnor/blob/master/src/main/webapp/WEB-INF/web.xml
Repackage the binary war file and deploy to glassfish

wsdl2java codegen eclipse plugin- java.lang.reflect.invocationtargetexception

I had added the Axis2_Codegen_Wizard_1.3.0,Axis2_Service_Archiver_1.3.0 to eclipse plugin. On clicking finish button, after I go through all the steps which include specifying wsdl file path and output path, I a pop up with following error.
An error occurred while completing the process
java.lang.reflect.invocationtargetexception
Any idea ?
Thanks
-Aj
Well, the problem was solved on upgrading to Eclipse IDE 3.6.