Could not find the main class: com.complexible.stardog.cli.admin.CLI. Program will exit - semantic-web

I'm trying to install Stardog, but it sends me this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/complexible/stardog/cli/admin/CLI, offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
at java.security.AccessController.doPrivileged(AccessController.java:284)
at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
Could not find the main class: com.complexible.stardog.cli.admin.CLI. Program will exit.
Does anybody know how to solve it?

Errors of this kind typically mean the code you are attempting for run is for a different version of Java than you are trying to run.
Stardog requires Java 8:
Stardog runs on Java 8
So please ensure you are running it under Java 8, providing the output of java -version in your environment as part of your question would be helpful in determining if this is your problem.

Related

Why can't I run a JApplet in IntelliJ?

I am learning Java from the Oracle documentation page: https://docs.oracle.com/javase/tutorial/reallybigindex.html
I am using Intellij on Linux Mint and I had no problems until I got to JApplets. Whenever I am trying to run my code now I get the following error:
Error: Could not find or load main class sun.applet.AppletViewer
Caused by: java.lang.ClassNotFoundException: sun.applet.AppletViewer
Can someone point me in the right direction?

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.

NoClassDefFoundError in Liquibase

Getting an Exception when initializing Liquibase. We are using version 3.3.2 (because offline is broken in 3.3.3)
java.lang.NoClassDefFoundError: Could not initialize class liquibase.servicelocator.ServiceLocator
at liquibase.logging.LogFactory.getLog(LogFactory.java:44)
at liquibase.logging.LogFactory.getLogger(LogFactory.java:37)
at liquibase.integration.spring.SpringLiquibase.<init>(SpringLiquibase.java:142)
We are running java 8, and it seems like this error is only visible when using sun-java-1.8.0_latest-x86_64-1.8.0-45.x86_64, not sun-java-1.8.0_latest-x86_64-1.8.0-12.x86_64.
I have created https://liquibase.jira.com/browse/CORE-2372, but maybe some of you guys have some tips

Getting Error while starting glassfish server

when I am starting glass fish server through command prompt I am getting an
error. I am using jdk 1.5 and jdk1.6 also. Due to java version am I getting that error or any other reason.
I am using two tomcat server also that port no is 8080 and 8081.
For glass fish-domain purpose I am using 4545 port number.
Error starting domain mydomain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
FATAL ERROR in native method: processing of -javaagent failed
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:133)
Exception in thread "main"
This is the important bit.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
It means that the class loader does not understand the version number of one of the ".class" files that it is trying to load.
The most likely explanation is that you are trying to load classes that have been compiled on a Java 7 development platform on an earlier (e.g. Java 5 or Java 6) JRE / JVM installation. You either need to upgrade your execution platform to Java 7 (best option), or downgrade your development platform to Java 5 or Java 6 (or whatever you are using).
Note that both Java 5 and Java 6 have reached "end of life", and there will not be any more patch releases available ... unless you take out an Oracle Java support contract.

PlayORM Example compilation error

Samples run fine on my Windows 7.
However I get the following error on my Ubuntu machine:
Exception in thread "main" java.lang.NoSuchMethodError: org.joda.time.LocalDateTime.toDate()Ljava/util/Date;
at com.alvazan.orm.api.base.spi.UniqueKeyGenerator.generateKey(UniqueKeyGenerator.java:47)
at com.alvazan.orm.api.base.spi.UniqueKeyGenerator.generateNewKey(UniqueKeyGenerator.java:42)
at com.alvazan.orm.api.base.spi.UniqueKeyGenerator.generateNewKey(UniqueKeyGenerator.java:21)
at com.alvazan.orm.impl.meta.data.MetaIdField.fillInAndFetchId(MetaIdField.java:106)
at com.alvazan.orm.impl.meta.data.MetaIdField.translateToColumn(MetaIdField.java:56)
at com.alvazan.orm.impl.meta.data.MetaClassSingle.translateToRow(MetaClassSingle.java:82)
at com.alvazan.orm.layer0.base.BaseEntityManagerImpl.putImpl(BaseEntityManagerImpl.java:117)
at com.alvazan.orm.layer0.base.BaseEntityManagerImpl.put(BaseEntityManagerImpl.java:100)
at com.example.PlayORMExample.createTestData(PlayORMExample.java:89)
at com.example.PlayORMExample.main(PlayORMExample.java:31)
I looked at similar questions on the "stack", but they do not seem to apply to my case.
you either
have the wrong version of the joda-time jar OR
have two joda time jars one of which is the wrong version
later,
Dean (I am a committer on PlayOrm).