java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initSingleton()V attempting to run worldwind based app - eclipse-pde

Upgrading a java eclipse program from 32 bit WorldWind libs to 64 and receiving the following error at run time.
java.lang.NoSuchMethodError: javax.media.opengl.GLDrawableFactory.initSingleton()V
I'm using jre1.8.0.202
And Worldwind-v2.1.0

Related

Class not found exception "java.time.temporal.TemporalField" when connecting to jdbc:postgresql from Matlab

I'm trying to connect to a PostgreSQL database from Matlab. This is my code:
javaclasspath('/usr/share/java/postgresql-jdbc4.jar');
properties = java.util.Properties;
properties.setProperty('user', '********');
properties.setProperty('password', '********');
driver = org.postgresql.Driver;
url = 'jdbc:postgresql://127.0.0.1:5432/DBNAME';
connection = driver.connect(url, properties)
I get the following exception:
Error using org.postgresql.Driver/connect
Java exception occurred:
java.lang.NoClassDefFoundError: java/time/temporal/TemporalField
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:322)
at org.postgresql.Driver.makeConnection(Driver.java:404)
at org.postgresql.Driver.connect(Driver.java:272)
Caused by: java.lang.ClassNotFoundException: java.time.temporal.TemporalField
<SNIP>
I'm running Matlab R2012a on Debian. Everything was installed from the testing repository. Java is openjdk version "1.8.0_144" and PostgreSQL is 9.6.5-1.
It seems you don't use the jdk 1.8.
See same topic
Could you try to execute java -version to be sure?
[edit]
This error happens because Matlab 2012 does not use Java 8. To confirm, run this in the Matlab shell, not in your system terminal:
java -version
It is posible to make Matlab use a different JDK, but this can cause more problems than it solves. The better solution is to get the PostgreSQL JDBC 4.0, which is suitable for Java 6.
Direct link: https://jdbc.postgresql.org/download/postgresql-42.1.4.jre6.jar

GWT compile error with jdk1.5.0_22, works fine with jdk1.5.0_13

I am working on a tomcat web app (tomcat 5.5.30) which consists of GWT widgets (GWT 1.7.0).
While running the ant build, the compilation fails with following error:
...
ERROR] Unexpected internal compiler error
[java] java.lang.StackOverflowError
[java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1891)
[java] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
...
The JDK version I am using is jdk1.5.0_22. Interestingly, the build completes successfully with JDK version 1.5.0_13. I've also tried to build with jdk1.5.0_18, but it fails with same error message.
I searched the web, and found this discussion. I tried the solutions but none works for me.
I am unable to find out, what has changed after jdk1.5.0 update 13 that my build is failing.
Thanks in advance.

GWT Project fails to launch in Dev mode from Intellij 12

I have just installed an eveluation version of Intellij IDEA 12 to have a play with the new features.
I'm having difficulty getting my GWT project to run in Dev mode. It's failing with the following error:
[ERROR] Unable to load class 'com.google.gwt.useragent.rebind.UserAgentPropertyGenerator'
java.lang.ClassNotFoundException: com.google.gwt.useragent.rebind.UserAgentPropertyGenerator
this same project runs perfectly with Intellij 9 so I don't think it's my project that's at fault, presumably there is a configuration option in 12 which I need to set.
I am using Java 6 and GWT 2.4
Any clues would be apprieciated, for now I'm going back to Intellij 9.

Apache Sling - OSGI framework exception when starting in Windows

I received the following error message when starting Sling on Windows with Java 1.7 (see below). I'm using Sling 6 (http://www.apache.org/dyn/closer.cgi/sling/org.apache.sling.launchpad-6-standalone.jar). Any idea what could be wrong?
Last time I tried using the same Sling version on Mac OSX and it worked perfectly.
Failed to Start OSGi framework
org.osgi.framework.BundleException: Uncaught Instantiation Issue:
java.lang.ArrayIndexOutOfBoundsException: -1
at
org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:245)
at
org.apache.sling.launchpad.base.app.MainDelegate$1.<init>(MainDelegate.java:159)
at
org.apache.sling.launchpad.base.app.MainDelegate.start(MainDelegate.java:159)
at org.apache.sling.launchpad.app.Main.startSling(Main.java:244)
at org.apache.sling.launchpad.app.Main.<init>(Main.java:107)
at org.apache.sling.launchpad.app.Main.main(Main.java:56)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.ArrayList.elementData(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at
org.apache.felix.framework.BundleImpl.getCurrentModule(BundleImpl.java:1046)
at
org.apache.felix.framework.BundleImpl.getSymbolicName(BundleImpl.java:863)
at
org.apache.sling.launchpad.base.impl.SlingFelix.getSymbolicName(SlingFelix.java:32)
at org.apache.felix.framework.Felix.toString(Felix.java:1012)
at org.apache.felix.framework.Logger.doLog(Logger.java:128)
at org.apache.felix.framework.Logger._log(Logger.java:181)
at org.apache.felix.framework.Logger.log(Logger.java:114)
at
org.apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java:201)
at org.apache.felix.framework.Felix.<init>(Felix.java:374)
at
org.apache.sling.launchpad.base.impl.SlingFelix.<init>(SlingFelix.java:39)
at
org.apache.sling.launchpad.base.impl.Sling.<init>(Sling.java:235)
I had exactly the same error when using java 1.7. After switching to 1.6 everything seems to be fine. You check your java version by typing java -version in the terminal.

java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()

I am getting this error java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()
at the runtime in eclipse. However, eclipse shows the method on doing intelligence search, but at runtime it fails to identify it.
I am using the latest log4j1.2.16 jar and it is added in the classpath.
Any suggestions?