I'm trying to use db2triples for the first time, which is a java / maven project.
I got information about it from its github page.
So far, I have performed the following steps:
cd /programs/db2triples-master
vim pom.xml and added the db2triples dependency
mvn compile
mvn package
mvn dependency:copy-dependencies
java -cp target/dependency/*.jar:target/db2triples-1.0.3-SNAPSHOT.jar net.antidot.semantic.rdf.rdb2rdf.main.Db2triples
And I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.privateGetMethodRecursive(Class.java:3040)
at java.lang.Class.getMethod0(Class.java:3010)
at java.lang.Class.getMethod(Class.java:1776)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
After googling around, this may be a classpath error, but I'm not sure. What needs to be done in order to run this application?
The error means that when you run db2triples, it can't find a dependency that is needed.
One way to resolve this problem is to add the required dependencies to your class path. Is the apache commons cli jar actually sitting in target/dependencies?
Another way to resolve this is to build a jar that has all the dependencies embedded. The assembly plugin as a jar-with-dependencies descriptor. Add this to your <build><plugins> section in your pom.
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<descriptorId>jar-with-dependencies</descriptorId>
</configuration>
</plugin>
To build it mvn assembly:assembly.
You should have another jar sitting in targets named something like db2triples-<version>-jar-with-dependencies.jar. Then to run the application, you just need to run java -cp dbp2triples-<version>-jar-with-dependencies.jar net.antidot.semantic.rdf.rdb2rdf.main.Db2triples
According to your linked github page, you should get the required dependencies
Needed dependency
OpenRdf Sesame > 2.6.x - http://www.openrdf.org/
Commons-cli > 1.2 - http://commons.apache.org/cli/
Commons-logging > 1.1.1 - http://commons.apache.org/logging/
Or, if you're using maven, add db2triples as a dependency to your pom
<dependency>
<groupId>net.antidot</groupId>
<artifactId>db2triples</artifactId>
</dependency>
Related
Created a new generic Serenity BDD JBehave framework with Maven ( via command line).
Imported the project into Intelli J but when i try to run the "AcceptanceTestSuite" I get an error saying "No Tests are Found" and the following errorException in thread "main" java.lang.NoClassDefFoundError: org/junit/platform/engine/DiscoverySelector
I've tried re importing the project but that doesn't solve the problem.
Here is the full error log:
Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/platform/engine/DiscoverySelector
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at org.jbehave.core.steps.AbstractStepsFactory.hasAnnotatedMethods(AbstractStepsFactory.java:70)
at net.serenitybdd.jbehave.SerenityStepFactory.getCandidateClasses(SerenityStepFactory.java:61)
at net.serenitybdd.jbehave.SerenityStepFactory.stepsTypes(SerenityStepFactory.java:48)
at org.jbehave.core.steps.AbstractStepsFactory.createCandidateSteps(AbstractStepsFactory.java:34)
at net.serenitybdd.jbehave.SerenityStepFactory.createCandidateSteps(SerenityStepFactory.java:42)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.buildCandidateSteps(SerenityReportingRunner.java:294)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.createCandidateStepsWith(SerenityReportingRunner.java:249)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.createCandidateStepsWithNoMonitor(SerenityReportingRunner.java:257)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.getCandidateSteps(SerenityReportingRunner.java:240)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.buildDescriptionFromStories(SerenityReportingRunner.java:313)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.getDescriptions(SerenityReportingRunner.java:84)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.getDescription(SerenityReportingRunner.java:168)
at com.intellij.junit4.JUnit4IdeaTestRunner.getDescription(JUnit4IdeaTestRunner.java:78)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.engine.DiscoverySelector
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 21 more
Add dependency to pom.xml:
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
<version>1.2.0</version>
</dependency>
Without using maven, dependencies of Junit 5 are:
junit-jupiter-api
junit-jupiter-engine
junit-platform-engine
junit-platform-commons
junit-vintage-engine (optional)
They can be found:
https://junit.org/junit5/
In my case we are using gradle, somehow i could not able to solve it, i have added jars manually in eclipse now its working.
In Eclipse project → build path → config build path -> libraries → add all libraries related to "jupiterEnginer5.5".
Here are all jars for "jupiterEnginer5.5" : opentest4j-1.2.0.jar junit-platform-engine-1.7.0-M1.jar junit-platform-commons-1.7.0-M1.jar junit-jupiter-engine-5.7.0-M1.jar junit-jupiter-api-5.7.0-M1.jar apiguardian-api-1.1.0.jar
Adding this fix my issue
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
My project is starting correctly with GWT 2.7 and 2.8-beta1 in super dev mode
Unfortunately since 2.8-rc1 release it is not starting.
Looks like GWT project dependencies are not configured correctly.
IDE: IntelliJ IDEA 2016.2.5
"C:\Program Files\Java\jdk1.8.0_102\jre\bin\java" -Xmx2048m -XX:MaxPermSize=1024m -Djava.naming.factory.initial=org.eclipse.jetty.jndi.InitialContextFactory -Didea.launcher.port=7536 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\<REPO>\com\google\gwt\gwt-codeserver\2.8.0-rc1\gwt-codeserver-2.8.0-rc1.jar;C:\<REPO>\com\google\gwt\gwt-dev\2.8.0-rc1\gwt-dev-2.8.0-rc1.jar;xxx\xxx\src\main\java;xxx\xxx\src\main\resources;xxx\xxx\target\generated-sources\gwt;C:\<REPO>\com\google\jsinterop\jsinterop-annotations\1.0.0\jsinterop-annotations-1.0.0-sources.jar;xxx\domain-model\src\main\java;xxx\domain-model\src\main\resources;xxx\sso-security-lib\src\main\java;xxx\sso-security-lib\src\main\resources;xxx\seleniumtests\src\main\java;xxx\smartgwt-data-integration\src\main\java;xxx\generator\src\main\java;xxx\generator\src\main\resources;xxx\gwt-ui-utils\src\main\java;xxx\gwt-ui-utils\src\main\resources;xxx\gwt-ui-utils\target\generated-sources\gwt;C:\Program Files\Java\jdk1.8.0_102\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_102\jre\lib\rt.jar;c:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\bcprov-ext-jdk15on-154.jar;c:\Program Files\Java\jdk1.8.0_102\jre\lib\ext\bcprov-jdk15on-154.jar;xxx\xxx\target\test-classes;xxx\xxx\target\xxx\WEB-INF\classes;C:\<REPO>\org\springframework\spring-context\4.2.4.RELEASE\spring-context-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-aop\4.2.4.RELEASE\spring-aop-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-beans\4.2.4.RELEASE\spring-beans-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-core\4.2.4.RELEASE\spring-core-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-expression\4.2.4.RELEASE\spring-expression-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-webmvc\4.2.4.RELEASE\spring-webmvc-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-web\4.2.4.RELEASE\spring-web-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-aspects\4.2.4.RELEASE\spring-aspects-4.2.4.RELEASE.jar;C:\<REPO>\org\aspectj\aspectjweaver\1.8.7\aspectjweaver-1.8.7.jar;C:\<REPO>\com\google\gwt\gwt-servlet\2.8.0-rc1\gwt-servlet-2.8.0-rc1.jar;C:\<REPO>\com\google\gwt\gwt-user\2.8.0-rc1\gwt-user-2.8.0-rc1.jar;C:\<REPO>\com\google\jsinterop\jsinterop-annotations\1.0.0\jsinterop-annotations-1.0.0.jar;C:\<REPO>\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\<REPO>\org\w3c\css\sac\1.3\sac-1.3.jar;C:\<REPO>\org\eclipse\jetty\jetty-plus\8.1.19.v20160209\jetty-plus-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.transaction\1.1.1.v201105210645\javax.transaction-1.1.1.v201105210645.jar;C:\<REPO>\org\eclipse\jetty\jetty-webapp\8.1.19.v20160209\jetty-webapp-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-xml\8.1.19.v20160209\jetty-xml-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-util\8.1.19.v20160209\jetty-util-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-servlet\8.1.19.v20160209\jetty-servlet-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-security\8.1.19.v20160209\jetty-security-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-jndi\8.1.19.v20160209\jetty-jndi-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-server\8.1.19.v20160209\jetty-server-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.servlet\3.0.0.v201112011016\javax.servlet-3.0.0.v201112011016.jar;C:\<REPO>\org\eclipse\jetty\jetty-continuation\8.1.19.v20160209\jetty-continuation-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-http\8.1.19.v20160209\jetty-http-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\jetty-io\8.1.19.v20160209\jetty-io-8.1.19.v20160209.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.mail.glassfish\1.4.1.v201005082020\javax.mail.glassfish-1.4.1.v201005082020.jar;C:\<REPO>\org\eclipse\jetty\orbit\javax.activation\1.1.0.v201105071233\javax.activation-1.1.0.v201105071233.jar;C:\<REPO>\commons-dbcp\commons-dbcp\1.4\commons-dbcp-1.4.jar;C:\<REPO>\commons-pool\commons-pool\1.5.4\commons-pool-1.5.4.jar;C:\<REPO>\junit\junit\4.9\junit-4.9.jar;C:\<REPO>\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\<REPO>\org\mockito\mockito-all\1.9.5\mockito-all-1.9.5.jar;C:\<REPO>\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\<REPO>\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\<REPO>\org\springframework\security\spring-security-core\4.0.3.RELEASE\spring-security-core-4.0.3.RELEASE.jar;C:\<REPO>\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\<REPO>\org\springframework\security\spring-security-config\4.0.3.RELEASE\spring-security-config-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\security\spring-security-web\4.0.3.RELEASE\spring-security-web-4.0.3.RELEASE.jar;C:\<REPO>\javax\servlet\jstl\1.2\jstl-1.2.jar;C:\<REPO>\com\xxx\commons\authentication\xxx-authentication\1.0.5\xxx-authentication-1.0.5.jar;C:\<REPO>\org\samba\jcifs\jcifs\1.3.12\jcifs-1.3.12.jar;C:\<REPO>\com\ioplex\jespa-licensed\1.1.13-INTERNAL-1\jespa-licensed-1.1.13-INTERNAL-1.jar;C:\<REPO>\org\springframework\security\spring-security-ldap\4.0.3.RELEASE\spring-security-ldap-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\spring-tx\4.2.2.RELEASE\spring-tx-4.2.2.RELEASE.jar;C:\<REPO>\org\springframework\ldap\spring-ldap-core\2.1.0.RELEASE\spring-ldap-core-2.1.0.RELEASE.jar;C:\<REPO>\org\slf4j\slf4j-api\1.7.12\slf4j-api-1.7.12.jar;C:\<REPO>\com\google\guava\guava-gwt\19.0\guava-gwt-19.0.jar;C:\<REPO>\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\<REPO>\com\google\errorprone\error_prone_annotations\2.0.2\error_prone_annotations-2.0.2.jar;C:\<REPO>\com\google\j2objc\j2objc-annotations\0.1\j2objc-annotations-0.1.jar;C:\<REPO>\com\google\guava\guava\19.0\guava-19.0.jar;xxx\domain-model\target\classes;C:\<REPO>\com\googlecode\mvp4g\mvp4g\1.3.1\mvp4g-1.3.1.jar;C:\<REPO>\com\google\gwt\inject\gin\1.5.0\gin-1.5.0.jar;C:\<REPO>\com\google\inject\guice\3.0-rc2\guice-3.0-rc2.jar;C:\<REPO>\javax\inject\javax.inject\1\javax.inject-1.jar;C:\<REPO>\com\google\inject\extensions\guice-assistedinject\3.0-rc2\guice-assistedinject-3.0-rc2.jar;xxx\sso-security-lib\target\classes;C:\<REPO>\org\springframework\security\spring-security-taglibs\4.0.3.RELEASE\spring-security-taglibs-4.0.3.RELEASE.jar;C:\<REPO>\org\springframework\security\spring-security-acl\4.0.3.RELEASE\spring-security-acl-4.0.3.RELEASE.jar;C:\<REPO>\oracle\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar;C:\<REPO>\org\springframework\spring-test\4.2.4.RELEASE\spring-test-4.2.4.RELEASE.jar;xxx\seleniumtests\target\classes;xxx\smartgwt-data-integration\target\classes;C:\<REPO>\com\smartgwt\smartgwt\6.0p\smartgwt-6.0p.jar;C:\<REPO>\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;C:\<REPO>\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\<REPO>\net\sourceforge\collections\collections-generic\4.01\collections-generic-4.01.jar;C:\<REPO>\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;C:\<REPO>\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\<REPO>\org\hibernate\hibernate-commons-annotations\3.2.0.Final\hibernate-commons-annotations-3.2.0.Final.jar;C:\<REPO>\org\hibernate\hibernate-core\3.6.0.Final\hibernate-core-3.6.0.Final.jar;C:\<REPO>\antlr\antlr\2.7.6\antlr-2.7.6.jar;C:\<REPO>\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\<REPO>\javax\transaction\jta\1.1\jta-1.1.jar;C:\<REPO>\org\hibernate\hibernate-ehcache\3.6.1.Final\hibernate-ehcache-3.6.1.Final.jar;C:\<REPO>\net\sf\ehcache\ehcache\1.5.0\ehcache-1.5.0.jar;C:\<REPO>\backport-util-concurrent\backport-util-concurrent\3.1\backport-util-concurrent-3.1.jar;C:\<REPO>\net\sf\jsr107cache\jsr107cache\1.0\jsr107cache-1.0.jar;C:\<REPO>\org\hibernate\hibernate-entitymanager\3.6.0.Final\hibernate-entitymanager-3.6.0.Final.jar;C:\<REPO>\javassist\javassist\3.12.0.GA\javassist-3.12.0.GA.jar;C:\<REPO>\org\hibernate\javax\persistence\hibernate-jpa-2.0-api\1.0.0.Final\hibernate-jpa-2.0-api-1.0.0.Final.jar;C:\<REPO>\org\hibernate\hibernate-validator\4.1.0.Final\hibernate-validator-4.1.0.Final.jar;C:\<REPO>\org\codehaus\jackson\jackson-core-asl\1.8.0\jackson-core-asl-1.8.0.jar;C:\<REPO>\org\codehaus\jackson\jackson-mapper-asl\1.8.0\jackson-mapper-asl-1.8.0.jar;C:\<REPO>\org\springframework\spring-orm\4.2.4.RELEASE\spring-orm-4.2.4.RELEASE.jar;C:\<REPO>\org\springframework\spring-jdbc\4.2.4.RELEASE\spring-jdbc-4.2.4.RELEASE.jar;C:\<REPO>\org\slf4j\slf4j-log4j12\1.6.1\slf4j-log4j12-1.6.1.jar;C:\<REPO>\log4j\log4j\1.2.16\log4j-1.2.16.jar;C:\<REPO>\log4j\apache-log4j-extras\1.2.17\apache-log4j-extras-1.2.17.jar;C:\<REPO>\cglib\cglib-nodep\2.2\cglib-nodep-2.2.jar;C:\<REPO>\org\hsqldb\hsqldb\2.3.2\hsqldb-2.3.2.jar;C:\<REPO>\com\thoughtworks\xstream\xstream\1.4.3\xstream-1.4.3.jar;C:\<REPO>\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\<REPO>\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;xxx\generator\target\classes;C:\<REPO>\org\aspectj\aspectjrt\1.6.12\aspectjrt-1.6.12.jar;C:\<REPO>\com\informatica\powercenter\sdk\jmf\9.1.0\jmf-9.1.0.jar;C:\<REPO>\com\sun\xml\bind\jaxb-impl\1.0.6\jaxb-impl-1.0.6.jar;C:\<REPO>\javax\xml\bind\jaxb-api\1.0\jaxb-api-1.0.jar;C:\<REPO>\com\sun\xml\bind\jaxb-libs\1.0.6\jaxb-libs-1.0.6.jar;C:\<REPO>\com\sun\msv\datatype\xsd\xsdlib\20060615\xsdlib-20060615.jar;C:\<REPO>\isorelax\isorelax\20030108\isorelax-20030108.jar;C:\<REPO>\relaxngDatatype\relaxngDatatype\20020414\relaxngDatatype-20020414.jar;C:\<REPO>\com\sun\xml\bind\jaxb-xjc\1.0.6\jaxb-xjc-1.0.6.jar;C:\<REPO>\com\informatica\powercenter\sdk\jmf-jaxb\9.1.0\jmf-jaxb-9.1.0.jar;C:\<REPO>\com\informatica\powercenter\sdk\pmserversdk\9.1.0\pmserversdk-9.1.0.jar;C:\<REPO>\org\apache\poi\poi\3.9\poi-3.9.jar;C:\<REPO>\commons-codec\commons-codec\1.5\commons-codec-1.5.jar;C:\<REPO>\org\apache\poi\poi-contrib\3.1-FINAL\poi-contrib-3.1-FINAL.jar;C:\<REPO>\org\apache\poi\poi-ooxml\3.9\poi-ooxml-3.9.jar;C:\<REPO>\org\apache\poi\poi-ooxml-schemas\3.9\poi-ooxml-schemas-3.9.jar;C:\<REPO>\org\apache\xmlbeans\xmlbeans\2.3.0\xmlbeans-2.3.0.jar;C:\<REPO>\stax\stax-api\1.0.1\stax-api-1.0.1.jar;C:\<REPO>\net\sf\saxon\saxon-dom\8.7\saxon-dom-8.7.jar;xxx\gwt-ui-utils\target\classes;C:\<REPO>\net\customware\gwt\dispatch\gwt-dispatch\1.2.0\gwt-dispatch-1.2.0.jar;C:\<REPO>\net\sf\saxon\saxon\8.7\saxon-8.7.jar;C:\<REPO>\commons-fileupload\commons-fileupload\1.2.2\commons-fileupload-1.2.2.jar;C:\<REPO>\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\<REPO>\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\<REPO>\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar;C:\<REPO>\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.4\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.google.gwt.dev.DevMode -superDevMode -war C:\Users\xxx\.IntelliJIdea2016.2\system\gwt\jboss6.4-migration-xxx.b5723cb3\xxx.1652beb5\run\www -remoteUI 7907:IntelliJIdea -startupUrl core.html com.xxx.xxx.workflowdetails.WorkflowDetails com.xxx.xxx.migration.Migration com.xxx.xxx.useroptions.UserOptions com.xxx.xxx.sessiondetails.SessionDetails com.xxx.xxx.validationdetails.ValidationDetails com.xxx.xxx.builddetails.BuildDetails com.xxx.xxx.core com.xxx.xxx.dependencymgmt.DependencyMgmt com.xxx.xxx.generator.Generator
Exception in thread "main" java.lang.NoClassDefFoundError: cern/colt/map/OpenIntObjectHashMap
at com.google.gwt.dev.util.collect.IntMultimap.<init>(IntMultimap.java:28)
at com.google.gwt.dev.StringAnalyzableTypeEnvironment.<init>(StringAnalyzableTypeEnvironment.java:68)
at com.google.gwt.dev.MinimalRebuildCache.<init>(MinimalRebuildCache.java:192)
at com.google.gwt.dev.CompilerContext$Builder.<init>(CompilerContext.java:37)
at com.google.gwt.dev.DevModeBase.<init>(DevModeBase.java:636)
at com.google.gwt.dev.DevMode.<init>(DevMode.java:457)
at com.google.gwt.dev.DevMode.main(DevMode.java:424)
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:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.ClassNotFoundException: cern.colt.map.OpenIntObjectHashMap
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)
... 12 more
When I add missing dependency to my project:
<dependency>
<groupId>colt</groupId>
<artifactId>colt</artifactId>
<version>1.2.0</version>
</dependency>
I'm getting different problem related with wrong jetty-server version (I have depoendencies to 8.1.19.v20160209 but looks like 9.x should be used):
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/HttpConfiguration$Customizer
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.google.gwt.dev.DevMode$ArgHandlerServer.setString(DevMode.java:179)
at com.google.gwt.util.tools.ArgHandlerString.handle(ArgHandlerString.java:26)
at com.google.gwt.util.tools.ToolBase.processArgs(ToolBase.java:291)
at com.google.gwt.dev.ArgProcessorBase.processArgs(ArgProcessorBase.java:30)
at com.google.gwt.dev.DevMode.main(DevMode.java:425)
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:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Let me know if you have similar problems with latest GWT releases. I could try to guess versions of all dependencies that should be used but it is not a good apreach. This should be pre-configured.
UPDATE:
When I generate simple GWT project:
mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.8.0-rc3
and import it to Intelij then dependencies are correct. I have the same gwt-maven-plugin version. I re-generated project in IDE. What I'm missing ?
You should add this dependency to your pom.xml file : gwt-dev
(gwt-dev has all the dependencies needed)
If you create a new GWT 2.8.0 module, you can check that, that contains gwt-dev dependency in the pom file.
I have a class that I coded in a standard java project in eclipse on OSX (Java 1.6). The class uses classes and interfaces from another library.
I select the class, then do Run As > Java Application and all works well.
After that I try to run my project as a Maven project and things start to get a little frustrating.. I summarise all the steps here hoping that someone will tell me what I am doing wrong:
- From the standard java project I right click and did Configure > Convert to Maven project and clicked Finnish. All good so far.
Then Build Path > Configure Build Path > and add the folder that contains my project. Still good
THEN I remove all the #Override annotations since I read somewhere on SO that Maven uses JDK 1.5 instead of 1.6. Whatever, I remove them and my red flags go away. At this point my class looks exactly like in the original java project (except for the #override that I removed)
THEN I do Maven > clean. I get build success
THEN Maven > Install. I get a build success
THEN I select my class and do Run As > Java Application and I get this ugly looking trace:
Exception in thread "main" java.lang.NoClassDefFoundError: LMAXTrading/algos/HeartbeatClient
Caused by: java.lang.ClassNotFoundException: LMAXTrading.algos.HeartbeatClient
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I don't know where to go from here. You can imagine that I went through a lot of trials and errors and searched on SO and elsewhere to find a way to get this to work. But I just cannot figure out what is wrong. So if someone has an idea I am so ready to listen.
I am pasting below my directory layout from the Navigator View as well as from the Package explorer view
And here is the POM.xml where I have added the JRE config
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>someproject</groupId>
<artifactId>someproject</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
The project directory structure does not match with the default Maven directory structure. Maven expects the source to be in src/main/java directory under the root folder (the folder containing pom.xml). The source here is in the src folder hence the No sources to compile error.
You can either move your sources to use the default Maven directory structure or change the pom.xml to explicitly specify your source directory by adding the following to the build section of the pom:
<sourceDirectory>${basedir}/src</sourceDirectory>
More info on Maven's standard directory layouts can be found here.
I've developed some code that executes a quartz job.At first the code was outside the tomcat and it executes very well, but when I tried to embed the same code inside a web application I get java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution.
I'm using quartz 2.1.5 and it's already in the class path.
Here is the stack trace:
Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution
INFO: Illegal access: this web application instance has been stopped already. Could not load org.quartz.DisallowConcurrentExecution. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:390)
java.lang.IllegalStateException
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1447)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
Caused by: java.lang.ClassNotFoundException: org.quartz.DisallowConcurrentExecution
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:390)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1447)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
make sure you have only 1 quartz-all-.jar in your classpath (maybe you have 2 : 1 in Tomcat lib folder + 1 in your war)
NoClassDefFoundErrors point to a missing JAR or class on the classpath. In this case the problem is likely that in Tomcat you have quartz-<ver>.jar on your classpath when you actually need quartz-all-<ver>.jar.
for them who use maven can use the new version by add
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.1.7</version>
</dependency>
It should be keep the .jar file inside of the project location. Import .jar file from the outside from the location which the project have is the reason for getting this error. also verified that if the project is a maven project, then it should include the maven dependency in the pom.xml to add the dependency to the project
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org</groupId>
<artifactId>quartz_job</artifactId>
<version>2.2.1</version>
</dependency>
I am using the maven-jspc-plugin in my pom.xml.
When i try to execute the jsp-compile goal (which executes the plugin) I get:
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.apache.juli.logging.Slf4jLog.<init>(Slf4jLog.java:29)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:54)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:35)
at org.apache.sling.scripting.jsp.jasper.compiler.OriginalTldLocationsCache.<init>(OriginalTldLocationsCache.java:81)
at org.apache.sling.maven.jspc.JspcMojo.initServletContext(JspcMojo.java:426)
I've tried downloading the (open) source for the maven-jspc-plugin and i am able to easily "mvn install" -- I don't get any build issues, however when i use that build in my project pom it still crashes and tells me it can't find LoggerFactory.
I've logged an issue with the Apache Sling project but am not making much headway.
https://issues.apache.org/jira/browse/SLING-2350
This link includes some more troubleshooting info as well as a simple maven project that uses the maven plugin. downloading the jspc-test.zip and "mvn install"ing will result in the error I've mentioned.
Also, i took a peak at the org.apache.juli pom.xml and it doesnt appear to list any dependencies at all.
Any thoughts on how to resolve would be appreciated.
Thanks!
Plugin dependencies are supplied in a different part of the POM:
<project>
<dependencies>
<!-- dependencies defined here don't get included for plugins -->
...
</dependencies>
<build>
<plugins>
<plugin>
.... jspc plugin section ....
<dependencies>
<dependency>
<!-- Try adding slf4j here --->
Though it does sounds like their POM is invalid if it doesn't already specify slf4j.