Not able to deploy war in JBoss AS 7 through Eclipse luna. - eclipse

I am using Eclipse luna with Jboss tools 4.2.0.Beta2 and JbossAS 7.1.1.
I am deployed my application from eclipse and started Jboss.
Then i'm getting a problem that deployment starts completes the deployment and again re deploy the application.
Its happening for more than 2 times and undeploys.
I am not able to deploy my application.
Please share the resolution for the above problem.

On your standalone.xml edit deployment-scanner with enabled="true" and auto-deploy-exploded="true"
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-enabled="true" scan-interval="5000" auto-deploy-exploded="true" deployment-timeout="1200" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>

Related

picketlink.xml & jboss-web.xml is missing on JBOSS EAP 7.4

I recently downloaded VM and Installed RHEL 8.6 and installed JBOSS EAP 7.4.
I am trying to create a SSO POC and need to do some changed in picketlink.xml and jboss-web.xml.
I checked in all the folders of jboss eap 7.4 but couldnt find.
Do I install separately or how do I fix this.
I am able to start the server and deploy a sample war file too.

Wildfly deployment scanner "jbosstoolsscanner1"

I have standalone installation of Wildfly server on path C:\Tools\wildfly-10.1.0.Final and in standalone.xml defined following deployment scanner:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
</subsystem>
For developing Java EE apps I use Eclipse IDE with JBoss Tools pluging for enterpirse development. Recently I started to use latest Eclipse update (Oxygen 3) with newest JBoss Tools 4.5.2 Final.
When I configure new Wildfly server and start using it it automaticali inserts fallowing scanner in standalone.xml:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0">
<deployment-scanner name="jbosstoolsscanner1" path="C:\Tools\wildfly-10.1.0.Final\standalone" deployment-timeout="5000"/>
</subsystem>
This scanner starts to deploy bunch of files to Wildfly including standalone.xml, then Wildfly goes nuts.
How to disable this automatic scanner or at least how to change folder which this scanner scans (to change path attribute to proper deployments folder of Wildfly)?
To disable the Deployment Scanner, stop your Wildfly. In Eclipse open the Servers-View and double-click on your server. In 'Deployment Scanners' uncheck the following options:
Add missing deployment scanners after server startup
Remove added deployment scanners before shutdown
I was having the same problem. I manually modified standalone-full.xml to remove deployment-scanner for jbosstoolsscanner1. That has fixed it for me. I am not very sure though if this has any side-effects.

Spring Petclinic (2013 version) doesn't work in JBoss AS 7

I'm trying to run the Spring Petclinic example on JBoss AS 7.1.1. I've imported the maven project from https://github.com/SpringSource/spring-petclinic/ to Eclipse Juno and successfully deployed it, but http://localhost:8080/petclinic/ gives me HTTP Status 404 error.
The only problem I can see from the log is
JBAS011006: Not installing optional component
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
due to exception:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011054: Could not find default constructor for class
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
but according to Spring3.2 and jboss as 7 it's normal behavior.
I've found some advices about modifying the Petclinic sample for JBoss, but all of them are for the old version of the sample, not the updated 2013 version (http://blog.springsource.org/2013/03/21/spring-petclinic-is-on-github/).
The sample works fine with Tomcat 7.0.39.
Update:
The problem only occurs when I run the sample from Eclipse using JBoss. As Andrzej said, building the app with standalone maven and deploying the resulting war works fine.
The problem is JBoss/JBoss Tools use incorrect war name and context root when deploying from Eclipse.
In pom.xml the war name is specified as <warName>petclinic</warName>, but JBoss uses "spring-petclinic" instead. Tomcat, Glassfish, and Weblogic don't have this problem and work correctly with deployment from Eclipse.
The workaround is either to use http://localhost:8080/spring-petclinic/ instead of http://localhost:8080/petclinic/ or configure the context root via WEB-INF/jboss-web.xml:
<jboss-web>
<context-root>petclinic</context-root>
</jboss-web>
The Spring Petclinic (2013 version) works well with Jboss AS7. Tried it with two Jboss versions. What you need is to build app with maven and deploy it to standalone/deployments folder.
Problem is running it from Eclipse Juno.

How to debug on local jboss as 7 using Eclipse 3.7

I am using Eclipse 3.7 and I added JBoss as 7.1 server.
I want to know how to debug a Java EE application deployed on this local server using Eclipse?
What is the needed debug configuration that I should use?
Note that I am using JBoss Tools.
I found the way!
its pretty simple, just install Eclipse indigo 3.7.2
and install jboss web tools 3.3 beta1 (the current newest release)
and add jboss application server 7.1.1 Final.
and right click your application (in eclipse) --> debug as --> server --> choose jboss as 7.1.1 and it will run smoothly in debug mode.
Note: I was unable to debug my application as I used older version for jboss tools.

Deploy war in Jboss - MAVEN

I just migrated from ant to maven .. and i successfully created a war from 3 module . But now i want my war to be deployed automatically into jboss server. Is there any plugin or So
help appreciated..
Check out the Cargo plugin. It supports hot deployment to containers.