How can I see jboss console with maven - java

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.

Related

Java project with Maven dependency compiles but fails at runtime

EDIT: This question should absolutely not be closed. I'm NOT asking how to create an executable jar. A jar doesn't need to be executable to be run from the terminal. For example, if I have have this code:
package com.dogzilla.maven.quickstart;
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World" );
}
}
...and Maven builds it, it creates quickstart-0.0.1-SNAPSHOT.jar. Which is not, ahem, 'executable'.
I can run it from the terminal quite successfully with this:
java -cp /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar com.dogzilla.maven.quickstart.App
The problem, as I have written below, is experienced when using an external dependency. </end edit>
I have a simple Maven project in Eclipse (2020-6). It was set up by doing the following in Eclipse:
1. File -> New -> Other... Maven -> Maven Project
2. Used the maven-archetype-quickstart archetype
Group ID: com.dogzilla.maven
Artifact ID: quickstart
Right click the pom file -> select Add Dependency -> enter:
Group ID: com.google.code.gson
Artifact ID: gson
Version: 2.8.6
Which I verified on https://search.maven.org/
Here's the POM file:
<?xml version="1.0" encoding="UTF-8"?>
<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>com.dogzilla.maven</groupId>
<artifactId>quickstart</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>quickstart</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Here's the source code:
package com.dogzilla.maven.quickstart;
import com.google.gson.Gson;
public class App
{
public static void main( String[] args )
{
Gson gson = new Gson();
System.out.println(gson.toJson("Hello World!") );
}
}
I then right-clicked on the POM file -> Run As -> Maven Build...
and here is the output:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/eclipse/java/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/opt/eclipse/java/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/eclipse/java/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/opt/eclipse/java/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.dogzilla.maven:quickstart >--------------------
[INFO] Building quickstart 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) # quickstart ---
[INFO] Deleting /opt/workspace/eclipse/java/quickstart/target
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) # quickstart ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/workspace/eclipse/java/quickstart/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) # quickstart ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /opt/workspace/eclipse/java/quickstart/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) # quickstart ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/workspace/eclipse/java/quickstart/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) # quickstart ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /opt/workspace/eclipse/java/quickstart/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) # quickstart ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.dogzilla.maven.quickstart.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s - in com.dogzilla.maven.quickstart.AppTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) # quickstart ---
[INFO] Building jar: /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.967 s
[INFO] Finished at: 2020-12-13T20:00:27-07:00
[INFO] ------------------------------------------------------------------------
But if I run:
java -cp /opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar com.dogzilla.maven.quickstart.App
It fails with:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gson/Gson
at com.dogzilla.maven.quickstart.App.main(App.java:13)
Caused by: java.lang.ClassNotFoundException: com.google.gson.Gson
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 1 more
The thing is if I change System.out.println(gson.toJson("Hello World!") ); to plain 'ol System.out.println("Hello World"); it works. So I know the porblem isn't with my java command or how I set the project up outside of the dependency getting resolved.
So the question is, I'm not sure how this is failing on the dependency. I was under the impression Maven managed all that for you. Why is this failing to run?
The jar file that created from your project only contains classes that written by you. If you need to run the application, you need to include all the necessary dependencies (either direct or transitive) in your classpath.
If you need a single jar file that you can execute without other dependencies, Please follow this to create a fatjar.
Use the Maven plugin mentioned in comment https://stackoverflow.com/a/65486325/679858 or use the Maven Shade plugin described here: https://maven.apache.org/plugins/maven-shade-plugin/
Your question was "Why does it run from Eclipse and not from console?":
If you run it from Eclipse then the Maven plugin in Eclipse knows the full runtime classpath and so it works. If you run it in console with the created JAR file then that JAR file only contains the classes of your sources but not the transitive dependencies, e.g. Google GSON. But if you use the Maven Assembly plugin or the Maven Shade plugin then you can create a JAR file which contains all the transitive dependencies of your project. That jar could be executed like you wrote it in your example.
try remove gson from .m2 folder then run maven install again.
You are not providing the path to the additional, transitive, dependencies of your project in the java command, which is why it fails.
You are using maven to build your project, not to execute your class: this is not Maven purpose, although it can do it using maven-exec-plugin. Eclipse is different: it uses Maven information (with m2e) and provides a context to run classes, context that includes dependencies.
The option -cp, explained in depth at Oracle Web Site: java (15), accepts one or more path to list of directories, jar and zip to search for class files:
--class-path classpath, -classpath classpath, or -cp classpath
A semicolon (;) separated list of directories, JAR archives, and ZIP archives to search for class files.
Specifying classpath overrides any setting of the CLASSPATH environment variable. If the class path option isn't used and
classpath isn't set, then the user class path consists of the current
directory (.).
As a special convenience, a class path element that contains a base name of an asterisk (*) is considered equivalent to specifying a
list of all the files in the directory with the extension .jar or .JAR
. A Java program can't tell the difference between the two
invocations. For example, if the directory mydir contains a.jar and
b.JAR, then the class path element mydir/* is expanded to A.jar:b.JAR,
except that the order of JAR files is unspecified. All .jar files in
the specified directory, even hidden ones, are included in the list. A
class path entry consisting of an asterisk (*) expands to a list of
all the jar files in the current directory. The CLASSPATH environment
variable, where defined, is similarly expanded. Any class path
wildcard expansion that occurs before the Java VM is started. Java
programs never see wildcards that aren't expanded except by querying
the environment, such as by calling System.getenv("CLASSPATH").
So you need to fix your command to provides gson and any other compile/runtime/provided dependencies you may add later:
CLASSPATH=''
CLASSPATH+=";$HOME/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar"
CLASSPATH+=";/opt/workspace/eclipse/java/quickstart/target/quickstart-0.0.1-SNAPSHOT.jar"
CLASSPATH="${CLASSPATH:1}" # remove leading ';'
java -cp "${CLASSPATH}" com.dogzilla.maven.quickstart.App
The man says that you can use ; to separate entries; that is true at least for Windows. However on other Linux based OS (which seems to are on due to /opt being used), this can also be :: that what appassembler does when writing CLASSPATH.
Do note that you will have to adapt the path manually to retarget the actual location of gson.jar (I guessed from what maven does by default).
You can also use appassembler or launch4j to do the trick for you. You can also use build-classpath to build the classpath (it may also work from command line).

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>

Unable to redeploy the java application to tomcat7 using maven deployment

This is my pom.xml
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>http://192.168.10.42:8086/manager/html</url>
<server>TomcatServer</server>
<path>/MavenExample321</path>
<username>XXX</username>
<password>XXXXXX</password>
</configuration>
</plugin>
Am trying to redeploy the java application using maven using following command
mvn tomcat7:redeploy
am able to deploy but unable to redeploy application to same path second time, its giving the following error
[INFO] tomcatManager status code:200, ReasonPhrase:OK
[INFO] OK - Undeployed application at context path /MavenExample321
[INFO] FAIL - Failed to deploy application at context path /MavenExample321
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.490s
[INFO] Finished at: Wed Nov 25 11:00:38 IST 2015
[INFO] Final Memory: 16M/183M
[INFO] ------------------------------------------------------------------------
Finally I found the solution.
Use following update tag in configuration
<update>true</update>
and use the following command to undeploy last deployed application and redeploy the new war file with same name.
mvn clean tomcat:deploy

SEVERE: Allocate exception for servlet myServletName

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>

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