Why can't GWT connect to superdevmode server in multi module maven project? - maven

I recently changed my GWT + App Engine project setup from a single module maven project, to a multi module maven project:
My project builds using mvn install (on the parent) with no errors, and as long as the whole project has been compiled, it runs fine.
However, I need to have <superDevMode>false</superDevMode> in the configuration of the Mojo gwt-maven-plugin to do this. Here is some of my pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt-maven-plugin.version}</version>
<configuration>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<!-- With multiple tests use GwtTestSuite.java for speed -->
<includes>**/*GwtTest.java</includes>
<mode>htmlunit</mode>
<logLevel>INFO</logLevel>
<style>PRETTY</style>
<copyWebapp>true</copyWebapp>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
<appEngineVersion>${gae.version}</appEngineVersion>
<extraJvmArgs>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=10 -Xmx2g -Dappengine.sdk.root=${mvn.gae.home}
</extraJvmArgs>
<!--<port>8888</port>-->
<superDevMode>false</superDevMode>
<!--<incremental>true</incremental>-->
<!--<bindAddress>0.0.0.0</bindAddress>-->
<runTarget>Project.html</runTarget>
<modules>
<module>com.utilitiessavings.usavappv7.Project</module>
</modules>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
If I turn on SDM, I don't seem to get any errors when it starts up (using gwt:run):
[INFO] --- gwt-maven-plugin:2.8.0-rc1:run (default-cli) # UsavAppV7 ---
[INFO] create exploded Jetty webapp in C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT
[INFO] extract appengine 1.9.40 sdk to C:\Users\Drew\IntelliJ\UsavApp\app\target\appengine-sdk
[INFO] Super Dev Mode starting up
[INFO] workDir: C:\Users\Drew\AppData\Local\Temp\gwt-codeserver-4487617494656562585.tmp
[ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation
[ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Loading Java files in com.utilitiessavings.usavappv7.Project.
[INFO] Module setup completed in 16220 ms
[INFO]
[INFO] The code server is ready at http://127.0.0.1:9876/
[ERROR] Aug 16, 2016 4:35:26 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[ERROR] INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\Drew\.m2\repository\com\google\appengine\appengine-java-sdk\1.9.40\appengine-java-sdk\appengine-java-sdk-1.9.40\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT\WEB-INF\appengine-web.xml'
[ERROR] Aug 16, 2016 4:35:26 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
[ERROR] Aug 16, 2016 3:35:27 PM com.google.appengine.tools.development.IsolatedAppClassLoader checkWorkingDirectory
[ERROR] WARNING: Your working directory, (C:\Users\Drew\IntelliJ\UsavApp\app) is not equal to your
[ERROR] web application root (C:\Users\Drew\IntelliJ\UsavApp\app\target\UsavAppV7-1.0-SNAPSHOT)
[ERROR] You will not be able to access files from your working directory on the production server.
[ERROR]
[ERROR] Aug 16, 2016 3:35:27 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: jetty-6.1.x
[INFO] ChatServiceImpl constructed
[INFO] BlobServiceImpl constructed
[INFO] UploadPricesServlet constructed
[ERROR] Aug 16, 2016 3:35:30 PM com.google.apphosting.utils.jetty.JettyLogger info
[ERROR] INFO: Started SelectChannelConnector#0.0.0.0:8888
[ERROR] Aug 16, 2016 3:35:30 PM com.google.appengine.tools.development.AbstractModule startup
[ERROR] INFO: Module instance default is running at http://localhost:8888/
[ERROR] Aug 16, 2016 3:35:30 PM com.google.appengine.tools.development.AbstractModule startup
[ERROR] INFO: The admin console is running at http://localhost:8888/_ah/admin
[ERROR] Aug 16, 2016 4:35:30 PM com.google.appengine.tools.development.DevAppServerImpl doStart
[ERROR] INFO: Dev App Server is now running
But when I open localhost:8888 I get the "Couldn't load project from Super Dev Mode" error:
If I go to http://localhost:9876 I see this message:
HTTP ERROR: 500
Problem accessing /. Reason:
java.lang.NoSuchMethodError:
javax.servlet.http.HttpServletResponse.getHeader(Ljava/lang/String;)Ljava/lang/String;
EDIT: pom.xml setup requested
I have created a gist with the 5 pom.xml files here: https://gist.github.com/slugmandrew/1d9acf86be2c7db89031dc60de9df6e2
EDIT 2: Have had some success getting SDM to run, but for some reason file changes aren't being detected, so it never recompiles.
Google Groups post: https://groups.google.com/forum/#!topic/google-web-toolkit/dF8KhbxnlBY

The getHeader method of HttpServletResponse is part of the Servlet 3.0 API. Check your classpath for an older version of the Servlet API, ie conflicting GWT version jars (2.6 vs 2.7), conflicting Jetty jars, or conflicting servlet-api jars.

Related

jenkins deploy war/ear to a container - why the .war file is renamed before it is deployed on the remoteserver

I'm new to jenkins and have a problem. I created a maven project (maven integration plugin 2.12.1) in jenkins (ver. 1.638). I got the source-code via git (maven web application).
Everything works fine, but at the end the .war which is moved/deployed via deploy plugin to the remote server has a wrong name.
I dont know why the .war file is renamed before it is deployed on the remoteserver.
It is called services.war instead of services_admin.war.
Screenshot jenkins:
https://i.stack.imgur.com/uc5wK.png
pom.xml:
<groupId>services_admin</groupId>[enter image description here][1]
<artifactId>services_admin</artifactId>
<name>services_admin</name>
<description>services_admin</description>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<wtpversion>1.5</wtpversion>
<additionalProjectFacets>
<jst.java>6.0</jst.java>
<jst.web>2.5</jst.web>
</additionalProjectFacets>
<additionalBuildcommands>
<buildcommand>org.eclipse.wst.common.project.facet.core.builder</buildcommand>
<buildcommand>org.eclipse.wst.validation.validationbuilder</buildcommand>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.common.project.facet.core.nature</projectnature>
<projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature</projectnature>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
</configuration>
</plugin>
</plugins>
<finalName>services_admin</finalName>
</build>
Build log:
[INFO] ------------------------------------------------------------------------
[INFO] Building services_admin 2
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # services_admin ---
[INFO] Deleting D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # services_admin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 120 resources
[INFO] Copying 307 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) # services_admin ---
[INFO] Compiling 307 source files to D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\classes
[WARNING] D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\java\de\...\services\java\util\Cryptographer.java:[34,40] BASE64Encoder is internal proprietary API and may be removed in a future release
[WARNING] D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\java\de\...\services\java\util\Cryptographer.java:[59,39] BASE64Decoder is internal proprietary API and may be removed in a future release
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # services_admin ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) # services_admin ---
[INFO] Compiling 48 source files to D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # services_admin ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) # services_admin ---
[INFO] Packaging webapp
[INFO] Assembling webapp [services_admin] in [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\src\main\webapp]
[INFO] Webapp assembled in [2328 msecs]
[INFO] Building war: D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war
[INFO] WEB-INF\web.xml already added, skipping
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.360 s
[INFO] Finished at: 2017-01-31T16:00:01+01:00
[INFO] Final Memory: 46M/447M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\pom.xml to services_admin/services_admin/2/services_admin-2.pom
[JENKINS] Archiving D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war to services_admin/services_admin/2/services_admin-2.war
channel stopped
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Deploying D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war to container Tomcat 7.x Remote
Redeploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Undeploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Deploying [D:\Programme_x64\Jenkins\jobs\Mavenproject - services Admin (Test)\workspace\target\services_admin.war]
Finished: SUCCESS
remoteserver log:
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: list: Listing contexts for virtual host 'localhost'
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: deploy: Deploying web application '/services'
Feb 01, 2017 9:50:09 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] log
INFORMATION: Manager: Uploading WAR file to D:\Programme_x64\tomcat\...\webapps\services.war
Feb 01, 2017 9:50:15 AM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deploying web application archive D:\Programme_x64\tomcat\...\webapps\services.war
Feb 01, 2017 9:50:15 AM org.apache.tomcat.util.digester.Digester begin
WARNUNG: [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
Feb 01, 2017 9:50:24 AM org.apache.jasper.servlet.TldScanner scanJars
INFORMATION: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: No Spring WebApplicationInitializer types detected on classpath
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: Set web app root system property: 'OsWebApp.root' = [D:\Programme_x64\tomcat\...\temp\6-services\]
Feb 01, 2017 9:50:25 AM org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/services] log
INFORMATION: Initializing Spring root WebApplicationContext
Feb 01, 2017 9:50:31 AM com.sun.faces.config.ConfigureListener contextInitialized
INFORMATION: Mojarra 2.1.13 ( 20120907-1514) für Kontext '/services' wird initialisiert.
Feb 01, 2017 9:50:32 AM com.sun.faces.spi.InjectionProviderFactory createInstance
INFORMATION: JSF1048: PostConstruct/PreDestroy-Annotationen vorhanden. Verwaltete Bean-Methoden, die mit diesen Annotationen markiert sind, lassen die entsprechenden Annotationen verarbeiten.
Feb 01, 2017 9:50:33 AM com.sun.faces.config.configprovider.BaseWebConfigResourceProvider getResources
WARNUNG: JSF1067: Ressource /WEB_INF/wickedcharts.taglib.xml, die von der Konfigurationsoption javax.faces.CONFIG_FILES angegeben wird, kann nicht gefunden werden. Die Ressource wird ignoriert.
Feb 01, 2017 9:50:33 AM org.primefaces.webapp.PostConstructApplicationEventListener processEvent
INFORMATION: Running on PrimeFaces 5.3
Feb 01, 2017 9:50:33 AM org.apache.catalina.startup.HostConfig deployWAR
INFORMATION: Deployment of web application archive D:\Programme_x64\tomcat\...\webapps\services.war has finished in 17,323 ms
i dont use the "deploy plugin - deploy war/ear to a container" for this project. Instead of that im using now "Send files to a windows share - CIFS Publishers".
The problem with the "deploy plugin - deploy war/ear to a container" i could solve :(.
Anyway thx for ur help :).
Best regards

Wildfly command line deploy failure

I am able to run most of these tutorials in Eclipse provided in the Wildfly quickstart here:
https://github.com/wildfly/quickstart/
However, I am running into problem when I use command line to do the deployment. For the most basic HelloWorld tutorial, I received this message:
mvn clean install
is successful. However, the deployment fails:
mvn clean install wildfly:deploy
Error messages:
ackaging webapp
[INFO] Assembling webapp [wildfly-helloworld] in [/home/abigail/study/quickstart/helloworld/target/wildfly-helloworld]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/abigail/study/quickstart/helloworld/src/main/webapp]
[INFO] Webapp assembled in [2 msecs]
[INFO] Building war: /home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.war
[INFO]
[INFO] <<< wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) < package # wildfly-helloworld <<<
[INFO]
[INFO] --- wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) # wildfly-helloworld ---
Dec 19, 2015 11:42:10 PM org.xnio.Xnio
INFO: XNIO version 3.2.2.Final
Dec 19, 2015 11:42:10 PM org.xnio.nio.NioXnio
INFO: XNIO NIO Implementation Version 3.2.2.Final
Dec 19, 2015 11:42:10 PM org.jboss.remoting3.EndpointImpl
INFO: JBoss Remoting version 4.0.3.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.836 s
[INFO] Finished at: 2015-12-19T23:42:15-05:00
[INFO] Final Memory: 21M/162M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final:deploy (default-cli) on project wildfly-helloworld: Could not execute goal deploy on /home/abigail/study/quickstart/helloworld/target/wildfly-helloworld.war. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to http-remoting://127.0.0.1:9990. The connection timed out
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
You have to check if you created a user for the deployment.See this article where it is further explained .
I had same problem when the other application is usind default 9990 port.
I moved wildfly to the port 9991 (modifying standalone.xml and host.xml), admin console started to work, but deploy still was failed.
Then I figured out that wildfly plugin uses same 9990 by default.
I handled this by modiying pom.xml of my progect, put the other port (the same I was using in standalone) to the configuration of wildfly plugin.
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
<configuration>
<port>9991</port>
</configuration>
</plugin>

Creating security domain using wildfly-maven-plugin has no effect

I found this which uses /subsystem in its command, so I tried it with a different subsystem command (I use one to create a security domain), it builds successfully, but has no effect in standalone.xml.
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha1</version>
<configuration>
<execute-commands>
<commands>
<command>/subsystem=security/security-domain=secureD:add(cache-type=default)</command>
<command>reload</command>
<command>/subsystem=security/security-domain=secureD/authentication=classic:add(login-modules=[{"code"=>"Database","flag"=>"required","module-options"=>[("dsJndiName"=>"java:jboss/datasources/MyDB"),("principalsQuery"=>"select password from Users where username=?"),("rolesQuery"=>"select role, 'Roles' from Users where username=?"),("hashAlgorithm"=>"SHA-256"),("hashEncoding"=>"hex"),("hashCharset"=>"UTF-8")]}])</command>
<command>reload</command>
</commands>
</execute-commands>
</configuration>
</plugin>
When I execute the commands manually in $ ./jboss-cli.sh --connect it works and the domain is created.
I use eclipse with the following Run Configurations: "Goals: clean package wildfly:deploy" "Profiles: local"
<project ...
...
<build>
<plugins>
<plugin>
tried pasting code from above once here
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>local</id>
<properties>
...
</properties>
<build>
<plugins>
<plugin>
and once here
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
When building I get these errors:
...
[INFO]
[INFO] --- wildfly-maven-plugin:1.0.1.Final:undeploy (undeploy) # Project ---
Jul 03, 2015 3:50:36 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.2.0.Final
Jul 03, 2015 3:50:36 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.2.0.Final
Jul 03, 2015 3:50:36 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.0.Final
WARN: can't find jboss-cli.xml. Using default configuration values.
Jul 03, 2015 3:50:36 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: {"outcome" => "success"}
{"outcome" => "success"}
Jul 03, 2015 3:50:36 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: {
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.316 s
[INFO] Finished at: 2015-07-03T15:50:36+01:00
[INFO] Final Memory: 12M/165M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:undeploy (undeploy) on project Project: Could not execute goal undeploy on /home/username/workspace/Project/target/Project-0.0.1-SNAPSHOT.war. Reason: Command execution failed for command 'reload'. Unsupported ModelControllerClient implementation org.wildfly.plugin.cli.Commands$NonClosingModelControllerClient -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
If I remove the reload command I get:
...
WARN: can't find jboss-cli.xml. Using default configuration values.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.825 s
[INFO] Finished at: 2015-07-03T15:45:23+01:00
[INFO] Final Memory: 22M/214M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:deploy-artifact (deploy_jdbc_driver) on project Project: Could not execute goal deploy-artifact on /home/username/.m2/repository/mysql/mysql-connector-java/5.1.35/mysql-connector-java-5.1.35.jar. Reason: Command execution failed for command '/subsystem=security/security-domain=secureD:add(cache-type=default)'. {
[ERROR] "outcome" => "failed",
[ERROR] "failure-description" => "JBAS014803: Duplicate resource [
[ERROR] (\"subsystem\" => \"security\"),
[ERROR] (\"security-domain\" => \"secureD\")
[ERROR] ]",
[ERROR] "rolled-back" => true,
[ERROR] "response-headers" => {"process-state" => "reload-required"}
[ERROR] }
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
You need to either add the wildfly:execute-commands goal or change your configuration to use the <before-deployment/>. The latter is probably a better solution as you'd have to use executions to ensure the commands are executed before your deployment. I'd also only use a reload at the end.
<configuration>
<before-deployment>
<commands>
<command>/subsystem=security/security-domain=secureD:add(cache-type=default)</command>
<command>/subsystem=security/security-domain=secureD/authentication=classic:add(login-modules=[{"code"=>"Database","flag"=>"required","module-options"=>[("dsJndiName"=>"java:jboss/datasources/MyDB"),("principalsQuery"=>"select password from Users where username=?"),("rolesQuery"=>"select role, 'Roles' from Users where username=?"),("hashAlgorithm"=>"SHA-256"),("hashEncoding"=>"hex"),("hashCharset"=>"UTF-8")]}])</command>
<command>reload</command>
</commands>
</before-deployment>
</configuration>

mvn package jboss-as:deploy failing

This is my plugin information in pom.xml
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.0.2.Final</version>
</plugin>
I have downloaded the jboss AS 7.0.2 on my laptop under the /jboss folder (Mac OSX)
Although I am able to it as a local server on my Eclipse IDE and am able to run my projects via that.I wanted to give a try with mvn jboss-as:deploy.
And it gives this error :
[INFO] --- jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) # propertyfinder ---
[INFO] Executing goal deploy on server localhost (127.0.0.1) port 9999.
Apr 3, 2014 2:08:50 AM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.0.Beta2
Apr 3, 2014 2:08:50 AM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.0.Beta2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.446s
[INFO] Finished at: Thu Apr 03 02:08:55 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) on project propertyfinder: Could not execute goal deploy on propertyfinder.war. Reason: Could not connect to remote://localhost:9999 in 5000ms. Make sure the server is running and/or consider setting a longer timeout by setting -Dorg.jboss.as.client.connect.timeout=<timeout in ms>. -> [Help 1]
Any help is appreciated.
If you are starting with JBOSS. Before starting JBOSS application server. add the management user
Refer link to add management user.
Start Server by running standalone.bat( windows) or standalone.sh(linux) under bin directory
You can quickly verify if the server is started or not by logging into home page http://localhost:9990/console.
In the log verify if port 9999 is listening which is used for deployment( a default configuration, else you can check which port is listening for remoting)
Use the following maven plug-in configuration. user name and password is the management user and password
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${jboss.as.plugin.version}</version>
<configuration>
<hostname>localhost</hostname>
<username>{user name}</username>
<password>{password}</password>
<port>9999</port>
</configuration>
</plugin>
You can use either jboss-as:deploy or jboss-as:redeploy

Why are Spring log messages listed as [ERROR] when there seem to be no errors?

I have a GWT/Spring application, building with Maven and the gwt-maven-plugin.
When I run
mvn gwt:run
the gwt-maven-plugin runs the application and everything starts up and runs fine. What's bothering me is that the log messages claim [ERROR] on every line even though there are no apparent errors, and no message ever says what the error might be.
My guess is that [ERROR] on every log line is from the gwt-maven-plugin, since what comes after seems to be Spring's log message like so... [ERROR] INFO:
and when I run the app with mvn jetty:run, I see only the INFO: part of the messages.
Attached is most of the log to standard out. Has anybody seen log output like this, or have any ideas about what could cause a plugin to log info messages as error messages?
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:2.4.0:run (default-cli) # gwt >>>
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) # gwt ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # gwt ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-war-plugin:2.1.1:exploded (default) # gwt ---
[INFO] Exploding webapp
[INFO] Assembling webapp [gwt] in [/home/jay/workspace/buildtimer/target/gwt-1.0- SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/jay/workspace/buildtimer/src/main/webapp]
[INFO] Webapp assembled in [169 msecs]
[INFO]
[INFO] <<< gwt-maven-plugin:2.4.0:run (default-cli) # gwt <<<
[INFO]
[INFO] --- gwt-maven-plugin:2.4.0:run (default-cli) # gwt ---
[INFO] create exploded Jetty webapp in /home/jay/workspace/buildtimer/target/gwt-1.0- SNAPSHOT
[INFO] auto discovered modules [com.buildtimer.Main]
[ERROR] Nov 14, 2011 7:38:44 PM org.springframework.web.context.ContextLoader initWebApplicationContext
[ERROR] INFO: Root WebApplicationContext: initialization started
[ERROR] Nov 14, 2011 7:38:44 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
[ERROR] INFO: Refreshing Root WebApplicationContext: startup date [Mon Nov 14 19:38:44 EST 2011]; root of context hierarchy
[ERROR] Nov 14, 2011 7:38:44 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[ERROR] INFO: Loading XML bean definitions from class path resource [META- INF/applicationContext.xml]
[ERROR] Nov 14, 2011 7:38:44 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
[ERROR] INFO: Loading XML bean definitions from class path resource [META- INF/applicationContext-persistence.xml]
[ERROR] Nov 14, 2011 7:38:44 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
[ERROR] INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#1e42c6e: defining beans [org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.ann otation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.T ransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,tr ansactionManager,buildDao,dataSource,sessionFactory]; root of factory hierarchy
[ERROR] Nov 14, 2011 7:38:45 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
[ERROR] INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
[ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation
[ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Nov 14, 2011 7:38:46 PM org.springframework.orm.hibernate3.LocalSessionFactoryBean buildSessionFactory
[ERROR] INFO: Building new Hibernate SessionFactory
[ERROR] Nov 14, 2011 7:38:48 PM org.springframework.orm.hibernate3.LocalSessionFactoryBean updateDatabaseSchema
[ERROR] INFO: Updating database schema for Hibernate SessionFactory
[ERROR] Nov 14, 2011 7:38:48 PM org.springframework.orm.hibernate3.HibernateTransactionManager afterPropertiesSet
[ERROR] INFO: Using DataSource [org.springframework.jdbc.datasource.DriverManagerDataSource#1b0e438] of Hibernate SessionFactory for HibernateTransactionManager
My web.xml logging configuration is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
...
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
...
</web-app>
my log4j.properties.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="rootAppender" class="org.apache.log4j.FileAppender" >
<param name="file" value="app.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c - %m%n"/>
</layout>
</appender>
<root>
<priority value ="warn" />
<appender-ref ref="rootAppender" />
</root>
</log4j:configuration>
Not sure how much it is related, but your log indicates that the SLF4J logging framework is not properly initilaized
[ERROR] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[ERROR] SLF4J: Defaulting to no-operation (NOP) logger implementation
[ERROR] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Make sure that you have all three dependencies in your pom (SLF4J, The log4j binding and log4j itself)
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>runtime</scope>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<scope>runtime</scope>
<version>1.2.16</version>
</dependency>

Resources