SEVERE: Allocate exception for servlet myServletName - java

Using Spring Tool Suite 3.6.3, I added the following to my POM.XML of my Maven Web project.
<dependency>
<groupId>com.MyCompany.sei</groupId>
<artifactId>MyCompany-archetype-war</artifactId>
<version>1.0.2-RELEASE</version>
</dependency>
It successfully download this dependency and showed this new dependency in the Project Explorer->Libraries->Maven Dependencies folder
However, now when I try to access one of the test jsp pages in my HelloWorld web app running on the following STS web server "Tomcat v7 Server at localhost," I get the following error with nothing else changed.:
Feb 16, 2015 12:25:28 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet fitTrackerServlet as unavailable
Feb 16, 2015 12:25:28 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet myServletName
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1148)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
So I comment out the added dependency and try again and get the same error again.
Looking at the differences with the last working version that I checked into SVN, I see that the following files have changed:
.classpath
.project
When I compare the new versions to the old, they look identical, with the exception of having some shuffling of the buildCommand and classpathentry nodes.
I as green as the summer grass when it comes to Java development. I at a basic level know that the info in these files is used to list dependencies and where to find jar files but I am puzzled why the web site now returns an error when reverting back to the original code. I've seen some references to running "Maven->Update Project" but this doesn't work. I've also tried to revert to the old versions of the classpath and project file and still it does not work.
I'm sure that something is getting out of whack here. I even tried Sopring Tools-> Reset Internal Cache on the project with no luck.
Update
By request, here is my dependency tree. Thank you!
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building FitnessTracker Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # FitnessTracker ---
[INFO] com.cigna:FitnessTracker:war:0.0.1-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- org.springframework:spring-webmvc:jar:3.2.0.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:3.2.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:3.2.0.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:3.2.0.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.springframework:spring-web:jar:3.2.0.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-expression:jar:3.2.0.RELEASE:compile
[INFO] | \- org.springframework:spring-beans:jar:3.2.0.RELEASE:compile
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] \- javax.servlet:jstl:jar:1.2:provided
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.792 s
[INFO] Finished at: 2015-02-16T13:58:30-05:00
[INFO] Final Memory: 12M/149M
[INFO] ------------------------------------------------------------------------

Try to let M2E rebuild your Eclipse project configuration files.
Remove your project from Eclipse
delete the the .classpath, .project and .settings/ files from the file system
Import the project as an Existing Maven Project
Generally I don't store the IDE specific settings in version control anymore and let M2E do it for me. This reduces the problems when people are using different variants and versions of the Eclipse IDE (i.e. Rational, Spring, Oracle or plain Eclipse)
I use the following .gitignore file for my old projects using IntelliJ and Eclipse on both the Mac and Windows platforms.
*.iml
.DS_Store
.checkstyle
.classpath
.fbExcludeFilterFile
.idea
.metadata
.pmd
.pmdruleset.xml
.project
.settings/
artifacts.jar
bin
derby.log
logs.zip
pom.xml.releaseBackup
release.properties
target/
thumbs.db
If you need keep coding standards as part of your project, I use the m2e-codestyle-maven-plugin.
<plugin>
<groupId>net.trajano.mojo</groupId>
<artifactId>m2e-codestyle-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<goals>
<goal>configure</goal>
</goals>
<configuration>
<codeStyleBaseUrl>codestyle</codeStyleBaseUrl>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.trajano</groupId>
<artifactId>coding-standards</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</plugin>

Related

Exception in thread "main" java.lang.NoClassDefFoundError: io/cucumber/messages/Messages$Envelope [duplicate]

I'm learning Cucumber and I'm getting the FeatureParser error
java.lang.NoClassDefFoundError: io/cucumber/core/gherkin/FeatureParser
I have imported below jar files
gherkin-9.2.0.jar
cucumber-core-5.2.0.jar
cucumber-java-5.2.0.jar
cucumber-junit-5.2.0.jar
cucumber-jvm-deps-1.0.6.jar
cucumber-plugin-5.2.0.jar
i have written code like below
LoginTestRunner.java
package cucumberTests;
import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
#RunWith(Cucumber.class)
#CucumberOptions(features="features", glue="stepImplementations")
public class LoginTestRunner {
}
I have written feature file as well.
Getting below error:
java.lang.NoClassDefFoundError: io/cucumber/core/gherkin/FeatureParser
at io.cucumber.core.feature.FeatureParser.parseResource(FeatureParser.java:35)
at io.cucumber.core.runtime.FeaturePathFeatureSupplier.lambda$new$0(FeaturePathFeatureSupplier.java:39)
at java.base/java.util.function.BiFunction.lambda$andThen$0(BiFunction.java:70)
at io.cucumber.core.resource.ResourceScanner.lambda$processResource$2(ResourceScanner.java:126)
at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:67)
at io.cucumber.core.resource.PathScanner$ResourceFileVisitor.visitFile(PathScanner.java:52)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2724)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2796)
at io.cucumber.core.resource.PathScanner.findResourcesForPath(PathScanner.java:46)
at io.cucumber.core.resource.PathScanner.findResourcesForUri(PathScanner.java:26)
at io.cucumber.core.resource.ResourceScanner.findResourcesForUri(ResourceScanner.java:109)
at io.cucumber.core.resource.ResourceScanner.scanForResourcesUri(ResourceScanner.java:86)
at io.cucumber.core.runtime.FeaturePathFeatureSupplier.loadFeatures(FeaturePathFeatureSupplier.java:62)
at io.cucumber.core.runtime.FeaturePathFeatureSupplier.get(FeaturePathFeatureSupplier.java:46)
at io.cucumber.junit.Cucumber.<init>(Cucumber.java:156)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder$DefensiveAnnotatedBuilder.buildRunner(DefensiveAllDefaultPossibilitiesBuilder.java:113)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.vintage.engine.discovery.DefensiveAllDefaultPossibilitiesBuilder.runnerForClass(DefensiveAllDefaultPossibilitiesBuilder.java:56)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolveTestClass(ClassSelectorResolver.java:66)
at org.junit.vintage.engine.discovery.ClassSelectorResolver.resolve(ClassSelectorResolver.java:47)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.lambda$resolve$2(EngineDiscoveryRequestResolution.java:129)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:174)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolve(EngineDiscoveryRequestResolution.java:120)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:87)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:80)
at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.resolve(EngineDiscoveryRequestResolver.java:112)
at org.junit.vintage.engine.discovery.VintageDiscoverer.discover(VintageDiscoverer.java:42)
at org.junit.vintage.engine.VintageTestEngine.discover(VintageTestEngine.java:62)
at org.junit.platform.launcher.core.DefaultLauncher.discoverEngineRoot(DefaultLauncher.java:177)
at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:164)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:120)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.<init>(JUnit5TestReference.java:45)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createUnfilteredTest(JUnit5TestLoader.java:76)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.createTest(JUnit5TestLoader.java:66)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.loadTests(JUnit5TestLoader.java:53)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.ClassNotFoundException: io.cucumber.core.gherkin.FeatureParser
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 56 more
I'm learning Cucumber and I'm getting the FeatureParser error
If you follow the 10 minute tutorial you'll get an introduction that uses Maven dependency management.
In addition to this tutorial I would strongly urge you to invest time in learning either Maven or Gradle along with Cucumber. Amongst other things these tools will automate your dependency management and this can make your life much easier.
For example:
If you want to use Cucumber with JUnit 4 and annotation based step definitions you would declare this minimal set of dependencies in a Maven pom.xml file.
<properties>
<cucumber.version>5.2.0</cucumber.version>
</properties>
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
By telling Maven what your dependencies are Maven can calculate your transitive dependencies i.e: the dependencies of your dependencies.
This has many advantages. One example would be using the mvn dependency:tree -Dverbose=true command to will list all dependencies. This is much faster and much less error prone then downloading jar files by hand and hoping that you have the right ones.
$ mvn dependency:tree -Dverbose=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< cucumber:cucumber-java-skeleton >-------------------
[INFO] Building Cucumber-Java Skeleton 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # cucumber-java-skeleton ---
[INFO] cucumber:cucumber-java-skeleton:jar:0.0.1
[INFO] +- io.cucumber:cucumber-java:jar:5.2.0:test
[INFO] | +- io.cucumber:cucumber-core:jar:5.2.0:test
[INFO] | | +- io.cucumber:cucumber-gherkin:jar:5.2.0:test
[INFO] | | +- io.cucumber:cucumber-gherkin-vintage:jar:5.2.0:test
[INFO] | | +- io.cucumber:tag-expressions:jar:2.0.4:test
[INFO] | | +- io.cucumber:cucumber-expressions:jar:8.3.1:test
[INFO] | | +- io.cucumber:datatable:jar:3.3.0:test
[INFO] | | +- io.cucumber:cucumber-plugin:jar:5.2.0:test
[INFO] | | \- io.cucumber:docstring:jar:5.2.0:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] +- io.cucumber:cucumber-junit:jar:5.2.0:test
[INFO] \- junit:junit:jar:4.13:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.781 s
[INFO] Finished at: 2020-02-10T23:00:14+01:00
[INFO] ------------------------------------------------------------------------
Add the following dependency and rebuild your project:
Note that the scope is set to test --
java.lang.NoClassDefFoundError is thrown when the class is found at compile time, but not at runtime. So you need to ensure this .jar is available at runtime
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>5.1.3</version>
<scope>test</scope>
</dependency>
If you're using Eclipse, make sure that you have the project class path set to include the dependency and that it's built and embedded into the project
In your testrunner.java file , try giving full path of feature file

Maven Compile GWT & OpenJDK 11

Recently, I am trying to switch my project to use OpenJDK 11, however the Maven build is failing because one of the GWT modules is failing to compile.
The project currently uses GWT 2.6.0, and I've tried updating to 2.8.2 if any of the newer versions is compatible with OpenJDK 11. The build is run from Eclipse IDE 4.9.0
When running with 2.6.0, the following error occurs:
Compiling module XXXXModule
[INFO] Looking for precompiled archives. To disable, use -Dgwt.usearchives=false
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/user/User.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/core/Core.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/regexp/RegExp.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/web/bindery/event/Event.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/xml/XML.gwtar
[INFO] Loading archived module: jar:file:/C:/Users/XXXX/.m2/repository/com/google/gwt/gwt-user/2.6.0/gwt-user-2.6.0.jar!/com/google/gwt/json/JSON.gwtar
[INFO] Found 0 cached/archived units. Used 0 / 0 units from cache.
[INFO] Compiling...
[INFO] Compilation completed in 0.00 seconds
[INFO] Added 0 units to cache since last cleanup.
[INFO] Validating units:
[INFO] Removing invalidated units
[INFO] Checked 0 dependencies for errors.
[INFO] [ERROR] Unable to find type 'java.lang.Object'
[INFO] [ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
[INFO] Shutting down PersistentUnitCache thread
....
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.0:compile (default) on project tlm-war: Command [[
[ERROR] C:\jdk-11.0.1\bin\java -Xmx512M -Xss1024k -classpath .... -localWorkers 4 -XfragmentCount -1 -sourceLevel auto -gen C:\Users\XXXX\gitrepos\XXXX\XXXX\XXXX\target\.generated XXXXModule XXXXModule XXXXModule XXXXModule
But investigating XXXXModule.gwt.xml, the file does include 'Core'
<module>
<inherits name="com.google.gwt.user.User" />
<inherits name="com.smartgwt.SmartGwt" />
....
I did some investigation online, and according to this answer, Migrating a GWT 2.5 web app to Java 10, I should try upgrading to GWT 2.8.2, but the build gets another issue:
[ERROR] Unexpected internal compiler error
[INFO] java.lang.SecurityException: class "org.eclipse.jdt.internal.compiler.ast.LambdaExpression"'s signer information does not match signer information of other classes in the same package
[INFO] at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1150)
[INFO] at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:905)
[INFO] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1014)
[INFO] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
[INFO] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
[INFO] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[INFO] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.<init>(GwtAstBuilder.java:3881)
[INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:3970)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:129)
[INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:336)
[INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
[INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:1040)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:325)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:548)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:479)
[INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:465)
[INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:423)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:222)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:202)
[INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:143)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:204)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
[INFO] at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
[INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
[INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:125)
Has anyone else been successful in compiling GWT 2.6-2.8.2 with OpenJDK 11?
EDIT:
Snippet of pom.xml
....
<properties>
<gwt.version>2.8.2</gwt.version>
<smartgwt.version>2.4</smartgwt.version>
</properties>
....
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<configuration>
<modules>
<module>XXXXModule</module>
<module>XXXXModule</module>
<module>XXXXModule</module>
<module>XXXXModule</module>
</modules>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<logLevel>DEBUG</logLevel>
</configuration>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Classpath:
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-servlet\2.8.2\gwt-servlet-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-user\2.8.2\gwt-user-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\jsinterop\jsinterop-annotations\1.0.2\jsinterop-annotations-1.0.2.jar
C:\Users\XXXX\.m2\repository\com\google\jsinterop\jsinterop-annotations\1.0.2\jsinterop-annotations-1.0.2-sources.jar
C:\Users\XXXX\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar
C:\Users\XXXX\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar
C:\Users\XXXX\.m2\repository\javax\servlet\javax.servlet-api\3.0.1\javax.servlet-api-3.0.1.jar
C:\Users\XXXX\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar
C:\Users\XXXX\.m2\repository\com\smartgwt\smartgwt\2.4\smartgwt-2.4.jar
C:\Users\XXXX\.m2\repository\com\smartgwt\smartgwt-skins\2.4\smartgwt-skins-2.4.jar
C:\Users\XXXX\.m2\repository\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar
C:\Users\XXXX\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.6\jcl-over-slf4j-1.7.6.jar
C:\Users\XXXX\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.6\log4j-over-slf4j-1.7.6.jar
C:\Users\XXXX\.m2\repository\ch\qos\logback\logback-classic\1.1.1\logback-classic-1.1.1.jar
C:\Users\XXXX\.m2\repository\ch\qos\logback\logback-core\1.1.1\logback-core-1.1.1.jar
C:\Users\XXXX\.m2\repository\commons-codec\commons-codec\1.9\commons-codec-1.9.jar
C:\Users\XXXX\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
C:\Users\XXXX\.m2\repository\org\jasypt\jasypt\1.9.2\jasypt-1.9.2.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-core\4.3.5.Final\hibernate-core-4.3.5.Final.jar
C:\Users\XXXX\.m2\repository\org\jboss\logging\jboss-logging\3.1.3.GA\jboss-logging-3.1.3.GA.jar
C:\Users\XXXX\.m2\repository\org\jboss\logging\jboss-logging-annotations\1.2.0.Beta1\jboss-logging-annotations-1.2.0.Beta1.jar
C:\Users\XXXX\.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.0.0.Final\jboss-transaction-api_1.2_spec-1.0.0.Final.jar
C:\Users\XXXX\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar
C:\Users\XXXX\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar
C:\Users\XXXX\.m2\repository\org\hibernate\common\hibernate-commons-annotations\4.0.4.Final\hibernate-commons-annotations-4.0.4.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar
C:\Users\XXXX\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar
C:\Users\XXXX\.m2\repository\org\jboss\jandex\1.1.0.Final\jandex-1.1.0.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-jpamodelgen\4.3.5.Final\hibernate-jpamodelgen-4.3.5.Final.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-tools\4.3.1.CR1\hibernate-tools-4.3.1.CR1.jar
C:\Users\XXXX\.m2\repository\org\hibernate\hibernate-entitymanager\4.3.1.Final\hibernate-entitymanager-4.3.1.Final.jar
C:\Users\XXXX\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar
C:\Users\XXXX\.m2\repository\freemarker\freemarker\2.3.8\freemarker-2.3.8.jar
C:\Users\XXXX\.m2\repository\org\hibernate\jtidy\r8-20060801\jtidy-r8-20060801.jar
C:\Users\XXXX\.m2\repository\org\eclipse\tycho\org.eclipse.jdt.core\3.9.1.v20130905-0837\org.eclipse.jdt.core-3.9.1.v20130905-0837.jar
C:\Users\XXXX\.m2\repository\org\eclipse\text\3.3.0-v20070606-0010\text-3.3.0-v20070606-0010.jar
C:\Users\XXXX\.m2\repository\org\eclipse\core\commands\3.3.0-I20070605-0010\commands-3.3.0-I20070605-0010.jar
C:\Users\XXXX\.m2\repository\org\eclipse\equinox\common\3.6.200-v20130402-1505\common-3.6.200-v20130402-1505.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-context\3.2.9.RELEASE\spring-context-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-aop\3.2.9.RELEASE\spring-aop-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-beans\3.2.9.RELEASE\spring-beans-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-expression\3.2.9.RELEASE\spring-expression-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-jdbc\3.2.9.RELEASE\spring-jdbc-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-tx\3.2.9.RELEASE\spring-tx-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-core\3.2.9.RELEASE\spring-core-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-orm\3.2.9.RELEASE\spring-orm-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\com\oracle\jdbc\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar
C:\Users\XXXX\.m2\repository\com\oracle\ucp\ucp\11.2.0.3.0\ucp-11.2.0.3.0.jar
C:\Users\XXXX\.m2\repository\com\mysema\querydsl\querydsl-sql\2.8.2\querydsl-sql-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\mysema\querydsl\querydsl-core\2.8.2\querydsl-core-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\guava\guava\11.0.2\guava-11.0.2.jar
C:\Users\XXXX\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar
C:\Users\XXXX\.m2\repository\com\mysema\commons\mysema-commons-lang\0.2.4\mysema-commons-lang-0.2.4.jar
C:\Users\XXXX\.m2\repository\cglib\cglib\2.2\cglib-2.2.jar
C:\Users\XXXX\.m2\repository\asm\asm\3.1\asm-3.1.jar
C:\Users\XXXX\.m2\repository\joda-time\joda-time\1.6\joda-time-1.6.jar
C:\Users\XXXX\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar
C:\Users\XXXX\.m2\repository\org\springframework\data\spring-data-jdbc-core\1.0.0.RELEASE\spring-data-jdbc-core-1.0.0.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\springframework\retry\spring-retry\1.0.0.RELEASE\spring-retry-1.0.0.RELEASE.jar
C:\Users\XXXX\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.13\jackson-mapper-asl-1.9.13.jar
C:\Users\XXXX\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.13\jackson-core-asl-1.9.13.jar
C:\Users\XXXX\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar
C:\Users\XXXX\.m2\repository\commons-beanutils\commons-beanutils\1.9.1\commons-beanutils-1.9.1.jar
C:\Users\XXXX\.m2\repository\commons-configuration\commons-configuration\1.10\commons-configuration-1.10.jar
C:\Users\XXXX\.m2\repository\commons-lang\commons-lang\2.6\commons-lang-2.6.jar
C:\Users\XXXX\.m2\repository\org\springframework\spring-test\3.2.9.RELEASE\spring-test-3.2.9.RELEASE.jar
C:\Users\XXXX\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar
C:\Users\XXXX\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar
C:\Users\XXXX\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.1\jaxb-runtime-2.3.1.jar
C:\Users\XXXX\.m2\repository\org\glassfish\jaxb\txw2\2.3.1\txw2-2.3.1.jar
C:\Users\XXXX\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.7\istack-commons-runtime-3.0.7.jar
C:\Users\XXXX\.m2\repository\org\jvnet\staxex\stax-ex\1.8\stax-ex-1.8.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\fastinfoset\FastInfoset\1.2.15\FastInfoset-1.2.15.jar
C:\Users\XXXX\.m2\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar
C:\Users\XXXX\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar
C:\Users\XXXX\.m2\repository\org\apache\cxf\cxf-xjc-plugin\3.2.3\cxf-xjc-plugin-3.2.3.jar
C:\Users\XXXX\.m2\repository\org\sonatype\plexus\plexus-build-api\0.0.7\plexus-build-api-0.0.7.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.5\plexus-utils-2.0.5.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-archiver\1.2\plexus-archiver-1.2.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-container-default\1.0-alpha-9-stable-1\plexus-container-default-1.0-alpha-9-stable-1.jar
C:\Users\XXXX\.m2\repository\classworlds\classworlds\1.1-alpha-2\classworlds-1.1-alpha-2.jar
C:\Users\XXXX\.m2\repository\org\codehaus\plexus\plexus-io\1.0.1\plexus-io-1.0.1.jar
C:\Users\XXXX\.m2\repository\org\apache\maven\shared\maven-artifact-resolver\1.0\maven-artifact-resolver-1.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-xjc\2.3.0\jaxb-xjc-2.3.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-impl\2.3.0\jaxb-impl-2.3.0.jar
C:\Users\XXXX\.m2\repository\com\sun\xml\bind\jaxb-core\2.3.0\jaxb-core-2.3.0.jar
C:\Users\XXXX\.m2\repository\xml-resolver\xml-resolver\1.2\xml-resolver-1.2.jar
C:\Users\XXXX\.m2\repository\org\javassist\javassist\3.18.2-GA\javassist-3.18.2-GA.jar
C:\Users\XXXX\.m2\repository\javax\xml\ws\jaxws-api\2.3.0\jaxws-api-2.3.0.jar
C:\Users\XXXX\.m2\repository\javax\xml\soap\javax.xml.soap-api\1.4.0\javax.xml.soap-api-1.4.0.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\7.0.91\tomcat-embed-core-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\tomcat-annotations-api\7.0.91\tomcat-annotations-api-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-jasper\7.0.91\tomcat-embed-jasper-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jdt\core\compiler\ecj\4.4.2\ecj-4.4.2.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\7.0.91\tomcat-embed-el-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-logging-log4j\7.0.91\tomcat-embed-logging-log4j-7.0.91.jar
C:\Users\XXXX\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\7.0.91\tomcat-embed-websocket-7.0.91.jar
C:\Users\XXXX\.m2\repository\commons-fileupload\commons-fileupload\1.2\commons-fileupload-1.2.jar
C:\Users\XXXX\.m2\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar
C:\Users\XXXX\.m2\repository\com\google\gwt\gwt-dev\2.8.2\gwt-dev-2.8.2.jar
C:\Users\XXXX\.m2\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar
C:\Users\XXXX\.m2\repository\com\google\code\gson\gson\2.6.2\gson-2.6.2.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-util\5.0.3\asm-util-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-tree\5.0.3\asm-tree-5.0.3.jar
C:\Users\XXXX\.m2\repository\org\ow2\asm\asm-commons\5.0.3\asm-commons-5.0.3.jar
C:\Users\XXXX\.m2\repository\colt\colt\1.2.0\colt-1.2.0.jar
C:\Users\XXXX\.m2\repository\ant\ant\1.6.5\ant-1.6.5.jar
C:\Users\XXXX\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar
C:\Users\XXXX\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar
C:\Users\XXXX\.m2\repository\com\ibm\icu\icu4j\50.1.1\icu4j-50.1.1.jar
C:\Users\XXXX\.m2\repository\tapestry\tapestry\4.0.2\tapestry-4.0.2.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\htmlunit\htmlunit\2.19\htmlunit-2.19.jar
C:\Users\XXXX\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar
C:\Users\XXXX\.m2\repository\xalan\serializer\2.7.2\serializer-2.7.2.jar
C:\Users\XXXX\.m2\repository\xml-apis\xml-apis\1.4.01\xml-apis-1.4.01.jar
C:\Users\XXXX\.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpclient\4.5.1\httpclient-4.5.1.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar
C:\Users\XXXX\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
C:\Users\XXXX\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar
C:\Users\XXXX\.m2\repository\org\apache\httpcomponents\httpmime\4.5.1\httpmime-4.5.1.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\htmlunit\htmlunit-core-js\2.17\htmlunit-core-js-2.17.jar
C:\Users\XXXX\.m2\repository\xerces\xercesImpl\2.11.0\xercesImpl-2.11.0.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\nekohtml\nekohtml\1.9.22\nekohtml-1.9.22.jar
C:\Users\XXXX\.m2\repository\net\sourceforge\cssparser\cssparser\0.9.18\cssparser-0.9.18.jar
C:\Users\XXXX\.m2\repository\org\w3c\css\sac\1.3\sac-1.3.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-client\9.2.13.v20150730\websocket-client-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-util\9.2.14.v20151106\jetty-util-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-io\9.2.14.v20151106\jetty-io-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-common\9.2.13.v20150730\websocket-common-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\websocket\websocket-api\9.2.13.v20150730\websocket-api-9.2.13.v20150730.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-webapp\9.2.14.v20151106\jetty-webapp-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-xml\9.2.14.v20151106\jetty-xml-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-servlet\9.2.14.v20151106\jetty-servlet-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-security\9.2.14.v20151106\jetty-security-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-server\9.2.14.v20151106\jetty-server-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-http\9.2.14.v20151106\jetty-http-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-servlets\9.2.14.v20151106\jetty-servlets-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-continuation\9.2.14.v20151106\jetty-continuation-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-annotations\9.2.14.v20151106\jetty-annotations-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-plus\9.2.14.v20151106\jetty-plus-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\jetty-jndi\9.2.14.v20151106\jetty-jndi-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\apache-jsp\9.2.14.v20151106\apache-jsp-9.2.14.v20151106.jar
C:\Users\XXXX\.m2\repository\org\eclipse\jetty\toolchain\jetty-schemas\3.1.M0\jetty-schemas-3.1.M0.jar
C:\Users\XXXX\.m2\repository\org\mortbay\jasper\apache-jsp\8.0.9.M3\apache-jsp-8.0.9.M3.jar
C:\Users\XXXX\.m2\repository\org\mortbay\jasper\apache-el\8.0.9.M3\apache-el-8.0.9.M3.jar
Now I did notice that gwt-dev and ecj jar does have LambdaExpression with the same package. But I removed ecj and I still get the same issue. Apache-jsp jar does have a LambdaExpression but different package so I doubt that is the issue.
GWT 2.8.2 works with openjdk11. Here you can see that the tbroyer gwt-maven-plugin works with openjdk8 and openjdk11 using both last GWT release (version 2.8.2) and last development commit (version HEAD-SNAPSHOT).
So, you really should upgrade to GWT 2.8.2. GWT only support the last version. Usually upgrading between version is trivial because almost no API changes have been made for years and only bug fixes and new java language support has been added. It should be quite easy.
In your case, it seems to be a dependency problem, maybe because some of your dependencies have a dependency on the old version of GWT itself. To avoid dependencies conflicts it is recommended to use the BOM dependency. This tutorial includes a minimal explanation of why and how to use the GWT BOM dependency. Essentially, add this in your root project pom.xml:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>2.8.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

How to start launch the HSQLDB server as described in the Hibernate tutorial?

Trying to follow step #4 in this Hibernate tutorial:
mvn exec:java -Dexec.mainClass="org.hsqldb.Server" -Dexec.args="-database.0 file:target/data/tutorial"
I am getting this error:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building First Hibernate Tutorial
[INFO] task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default-cli}]
[WARNING]
java.lang.ClassNotFoundException: org.hsqldb.Server
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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
at java.lang.Thread.run(Thread.java:662)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. org.hsqldb.Server
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Dec 17 16:35:42 EST 2012
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
This is despite downloading the latest hsqldb package and installing it per the FAQ. The hsqldb.jar file is located in C:\hsqldb-2.2.9\hsqldb-2.2.9\hsqldb\lib and the classpath env var points at it:
CLASSPATH=C:\hsqldb-2.2.9\hsqldb-2.2.9\hsqldb\lib
So why am I receiving this ClassNotFoundException: org.hsqldb.Server error?
What am I doing wrong?
First of all, your CLASSPATH is not generally correct for any jar. A jar name must be specified, for example:
CLASSPATH=C:\hsqldb-2.2.9\hsqldb-2.2.9\hsqldb\lib\hsqldb.jar
Second, CLASSPATH is not necessary for this tutorial, as it is a Maven project. You should add the relevant dependency to the pom.xml file that is described in section 1.1.1 of the tutorial you mention. Simply add this block to the ones listed in the pom.xml, inside the tab:
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.2.9</version>
</dependency>
According to http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html, you need to specify the whole path ending with .jar. If there are multiple jar files, maybe try specifying C:\path\to\hibernate*.jar
If you only specify directories, only *.class files are loaded.
Other possiblity is the CLASSPATH variable you set only valid for a shell session, not globally -- hence the maven command is not reading it. Try setting it via Windows system settings.
I would recommend to download fresh copy of tutorial from http://sourceforge.net/projects/hibernate/files/hibernate3/3.3.2.GA/ and try to build it. If you will be missing dependendiens like hsqldb or commons-logging and others I got this problem solved by adding maven project repository - https://repository.jboss.org/nexus/content/repositories/thirdparty-releases. Once all artifacts downloaded I was able to run HSQLDB server. Would recommend to compare your current project with freshly downloaded one. It should solve your problem.

How can I see jboss console with maven

I started jboss-5.1.0.GA server with maven2, is there a possibility that I can see what is happening in the console. I'm using eclipse plugin to run maven. Is it possible to see console in eclipse or elsewhere?
Here is what I mean by console :
Is it possible to see this output somewhere? I took this screen shot when manually running jboss.
When I start the server with maven here is what I get :
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[snrf] in [C:\HOME\c0mrade\Workspaces\Eclipse 3.5 Classic\snrf\target\0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in[337 msecs]
[INFO] Building war: C:\HOME\c0mrade\Workspaces\Eclipse 3.5 Classic\snrf\target\0.0.1-SNAPSHOT.war
[INFO] [jboss:hard-deploy]
[INFO] Copying C:\HOME\c0mrade\Workspaces\Eclipse 3.5 Classic\snrf\target\0.0.1-SNAPSHOT.war to C:\jboss-5.1.0.GA\server\default\deploy\0.0.1-SNAPSHOT.war
[INFO] [jboss:start]
[INFO] Starting JBoss...
[INFO] [install:install]
[INFO] Installing C:\HOME\c0mrade\Workspaces\Eclipse 3.5 Classic\snrf\target\0.0.1-SNAPSHOT.war to C:\HOME\c0mrade\.m2\repository\org\trialofmaven\0.0.1-SNAPSHOT\0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
And that is it. nothing is happening..
Thank you
Is it possible to see this output somewhere? I took this screen shot when manually running jboss.
I'm don't think that the jboss-maven-plugin redirects the logs anywhere so you'll find them in
$JBOSS_HOME/server/<your_server>/log
Just in case, note that cargo has support for this (here, I'm getting the console output in cargo.log):
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0</version>
<configuration>
<container>
<containerId>jboss5x</containerId>
<home>${jboss.home}</home>
<append>false</append>
<log>${basedir}/target/jboss5.x.logs/cargo.log</log>
<timeout>300000</timeout> <!-- 5 minutes -->
</container>
<configuration>
<type>existing</type>
<home>${jboss.home}/server/default</home>
<properties>
<cargo.jboss.configuration>default</cargo.jboss.configuration>
<cargo.rmi.port>1099</cargo.rmi.port>
<cargo.logging>high</cargo.logging>
</properties>
</configuration>
<wait>false</wait>
</configuration>
...
</plugin>
P.S.: I really wonder why you don't start JBoss with the WTP from Eclipse by the way.

mvn tomcat:run doesn't start Tomcat

I am trying to deploy and run my webapplication using maven and its tomcat plugin.
I have set it up in project's pom.xml, but when I'm calling it from command line:
mvn tomcat:run
all that I get is:
[root#ovz6022 trunk]# mvn -e tomcat:run
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.gotbrains.breeze:breeze:jar:1.0
[INFO] task-segment: [tomcat:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing tomcat:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /root/trunk/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [tomcat:run {execution: default-cli}]
[INFO] Skipping non-war project
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24 seconds
[INFO] Finished at: Thu Jul 23 14:34:31 MDT 2009
[INFO] Final Memory: 7M/14M
[INFO] ------------------------------------------------------------------------
And that's all. Tomcat hasn't been launched but I don't see any errors here.
Does anybody knows what's happening?
As mentioned before, you should use war packaging. However, if you can't because you're using OSGI or some other reason, you can tell the Tomcat plugin to deploy anyway even if it isn't war packaging by using the ignorePackaging option:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<ignorePackaging>true</ignorePackaging>
The clue is in the line:
[INFO] Skipping non-war project
The tomcat:run goal is intended to work with war projects, I'm guessing yours is a jar project.
You need to change the packaging of your project to war, you may also need to provide some additional configuration for the war to actually do anything.
Note: I'd recommend having a separate war project to your jar projects, then adding the jars as dependencies to the war.
if you're using Roo, and haven't yet invoked the controller command then your configuration is not yet set to generate a WAR file.

Categories

Resources