I try to migrate my application from Tomcat Server to JBoss6.3.0.
My schedule.war file works ok in Tomcat, but when i move it in
C:...\EAP-6.3.0\jboss-eap-6.3\standalone\deployments
the server displayed thet error:
09:04:25,907 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBA
S015877: Stopped deployment schedule.war (runtime-name: schedule.war) in 284ms
09:04:25,909 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBA
S014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit
."schedule.war".POST_MODULE
service jboss.web.connector.http: org.jboss.msc.service.StartException in
service jboss.web.connector.http: JBAS018007: Error starting web connector
It is probably a port conflict. JBoss is trying to use the same port that TomCat already uses.
Change the http port in the file standalone.xml (or other profile you are using) on standalone\configuration like:
<socket-binding name="http" port="8179"/>
and restart the server.
Related
Good day Java and Wildfly Swarm Gurus,
I have a question.
I have built a microservice project in Eclipse using Wildfly Swarm and EJB.
The project is named TestProject and will build a TestProject.war.
When I run in the Terminal, using the command "mvn wildfly-swarm:run" it runs properly and will somewhat build the right war file. Below is a snippet when it runs:
2017-09-12 12:03:34,884 INFO [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.4.0.Final
2017-09-12 12:03:34,971 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0012: Started server default-server.
2017-09-12 12:03:35,056 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8080
2017-09-12 12:03:35,176 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Swarm 2017.3.3 (WildFly Core 2.2.1.CR1) started in 1140ms - Started 132 of 143 services (25 services are lazy, passive or on-demand)
2017-09-12 12:03:36,380 INFO [org.wildfly.swarm.runtime.deployer] (main) deploying TestProject.war
2017-09-12 12:03:36,398 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "TestProject.war" (runtime-name: "TestProject.war")
2017-09-12 12:03:37,779 WARN [org.jboss.as.dependency.private] (MSC service thread 1-2) WFLYSRV0018: Deployment "deployment.TestProject.war" is using a private module ("org.jboss.jts:main") which may be changed or removed in future versions without notice.
2017-09-12 12:03:38,114 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-1) WFLYEJB0473: JNDI bindings for session bean named 'ProductRestBean' in deployment unit 'deployment "TestProject.war"' are as follows:
java:global/TestProject/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:app/TestProject/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:module/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:global/TestProject/ProductRestBean
java:app/TestProject/ProductRestBean
java:module/ProductRestBean
When I run in in Eclipse IDE it will still run, but the war it created is different and is causing the bean loading and look up later, unable to load.
Below is a snippet on how it runs (problematic) in Eclipse:
[0m[0m2017-09-12 12:36:46,741 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.4.0.Final
[0m[0m2017-09-12 12:36:46,795 INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0012: Started server default-server.
[0m[0m2017-09-12 12:36:46,871 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on [0:0:0:0:0:0:0:0]:8080
[0m[0m2017-09-12 12:36:46,997 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Swarm 2017.3.3 (WildFly Core 2.2.1.CR1) started in 1197ms - Started 132 of 143 services (25 services are lazy, passive or on-demand)
[0m[0m2017-09-12 12:36:48,232 INFO [org.wildfly.swarm.runtime.deployer] (main) deploying 507ac020-cc98-4956-9c88-418869842dcf.war
[0m[0m2017-09-12 12:36:48,252 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "507ac020-cc98-4956-9c88-418869842dcf.war" (runtime-name: "507ac020-cc98-4956-9c88-418869842dcf.war")
[0m[33m2017-09-12 12:36:49,676 WARN [org.jboss.as.dependency.private] (MSC service thread 1-8) WFLYSRV0018: Deployment "deployment.507ac020-cc98-4956-9c88-418869842dcf.war" is using a private module ("org.jboss.jts:main") which may be changed or removed in future versions without notice.
[0m[0m2017-09-12 12:36:49,966 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-3) WFLYEJB0473: JNDI bindings for session bean named 'ProductRestBean' in deployment unit 'deployment "507ac020-cc98-4956-9c88-418869842dcf.war"' are as follows:
java:global/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:app/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:module/ProductRestBean!com.mycompany.ejb.ProductRestBeanInterface
java:global/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean
java:app/507ac020-cc98-4956-9c88-418869842dcf/ProductRestBean
java:module/ProductRestBean
as we can observe, it creates the war file:
507ac020-cc98-4956-9c88-418869842dcf.war
instead of:
TestProject.war
I would be very delighted to have some insights on how to prevent Eclipse from creating the randomly named war file and use the intended war file name which is TestProject.war.
Thanks a lot!
And have a great day =)!
The solution is to add these lines in to the projects-default.yml of your project.
swarm:
app:
name: TestProject.war
I have a MAVEN war file which works just fine in my old JBOSS 5.1 AS Environment. However, when I try adding the war into the JBOSSEAP/standalone/deployments directory (via the management console UI or directly), I get the following error which I'm unable to make sense of:
15:45:07,693 ERROR [org.jboss.as.controller.management-operation]
(HttpManagementService-threads - 1) JBAS014612: Operation ("add")
failed - address: ([{"deployment" => "clinicalTrials.war"}]) - failure
description: {"JBAS014771: Services with missing/unavailable
dependencies" => ["jboss.deployment.unit.\"clinicalTrials.war\".PARSE
is missing
[jboss.deployment.subunit.\"clinicalTrials.war\".WEB-INF/classes.STRUCTURE]"]}
15:45:07,694 ERROR [org.jboss.as.server] (HttpManagementService-threads - 1) JBAS015870: Deploy of deployment
"clinicalTrials.war" was rolled back with the following failure
message: {"JBAS014771: Services with missing/unavailable dependencies"
=> ["jboss.deployment.unit.\"clinicalTrials.war\".PARSE is missing [jboss.deployment.subunit.\"clinicalTrials.war\".WEB-INF/classes.STRUCTURE]"]}
15:45:07,698 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015974: Stopped subdeployment (runtime-name:
WEB-INF/classes) in 2ms
15:45:07,735 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment clinicalTrials.war
(runtime-name: clinicalTrials.war) in 40ms
15:45:07,735 INFO [org.jboss.as.controller] (HttpManagementService-threads - 1) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.deployment.subunit."clinicalTrials.war".WEB-INF/classes
(missing) dependents: [service
jboss.deployment.unit."clinicalTrials.war".PARSE]
service jboss.deployment.subunit."clinicalTrials.war".WEB-INF/classes.STRUCTURE
(missing) dependents: [service
jboss.deployment.unit."clinicalTrials.war".PARSE]
I have run a jar tvf clinicalTrials.war to ensure the war deployment contains all of the classes and again, this is working in my JBOSS 5 AS Environment when I plop it in the server/default/deploy directory so I'm not quite sure what I'm missing. I have set the log level to DEBUG but it doesn't seem to help.
Depending on the jar files that are included in the war files especially those related to Hibernate, JSF and XML parser, need to play around with WEB-INF/jboss-deployment-structure.xml to make sure the correct version are loaded. Some of the jars under the modules are automatically loaded base on the presences of certain files in the war (see JBoss documentation on Module). This could suppress the local version from loading under the local lib causing the error.
I've been working through the instructions here: http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/h2-console/#deploy_the_h2_console/
However, I can't figure out what is meant by this line of the instructions: "Deploy the console by copying the QUICKSTART_HOME/h2-console/h2console.war to the $JBOSS_HOME/standalone/deployments directory."
After installing the greeter quickstart, I did not have an "h2console.war" anywhere. So I downloaded all of the quickstarts from here: http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/ after which I had that file.
I then copied that file to the suggested folder, but that didn't seem to do anything as the suggested localhost does not load the console.
I've searched high and low but the documentation on h2-console installation seems sketchy at best. What am I missing?
I test it with Wildfly8.Alpha4 and work as aspected.
When you copy the h2console.war in $JBOSS_HOME/standalone/deployments you must see:
12:17:11,279 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "h2console.war" (runtime-name: "h2console.war")
12:17:11,394 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) JBAS018210: Register web context: /h2console
12:17:11,472 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "h2console.war" (runtime-name : "h2console.war")
on the Application Server's server.log. After that you can use the console at http://localhost:8080/h2console/.
I have deploy a war file in JBoss AS7 and when i enable it, it gives me the below error,
14:00:05,700 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "JSPServletPoc.war"
14:00:29,749 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
14:00:30,156 INFO [org.jboss.as.server] (HttpManagementService-threads - 7) JBAS015870: Deploy of deployment "JSPServletPoc.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.JSPServletPoc.JSPServletPoc.env.jdbc.MySQLDSJndijboss.naming.context.java.jboss.resources.jdbc.MySQLDSJndiMissing[jboss.naming.context.java.module.JSPServletPoc.JSPServletPoc.env.jdbc.MySQLDSJndijboss.naming.context.java.jboss.resources.jdbc.MySQLDSJndi]"]}
14:00:30,437 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment JSPServletPoc.war in 236ms
14:00:30,437 INFO [org.jboss.as.controller] (HttpManagementService-threads - 7) JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jboss.resources.jdbc.MySQLDSJndi (missing) dependents: [service jboss.naming.context.java.module.JSPServletPoc.JSPServletPoc.env.jdbc.MySQLDSJndi]
I have already configure a data source as MySQLDSJndi and enable it too.
I dont find any problem with setting the data source where i gave the data source name as MySQLDSJndi and the JNDI name as java:/MySQLDSJndi. Further I have given the user name and password and the connection url as jdbc:mysql://localhost:3306/testdb
Also i have a doubt why the error message,
JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
I have checked inside the jar for file named “META-INF/services/java.sql.Driver” because that file is what makes the jar to be JDBC-compliant jar file and it exists too.
The driver version is not compliant and you would need to first register the driver as a module.
Read through section Installing a JDBC driver as a module # How to configure datasource in Jboss As7
The MySQL driver is non-compliant because it doesn't support SQL-92. AFAIK copying to $JBOSS_HOME/standalone/deployments only works for compliant drivers, non-compliant drivers need to be deployed as a module.
I have an error during deploy and I did not understand what that mean. Here is the log:
16:54:50,298 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/content/RQ.war/WEB-INF/lib/mail-1.4.jar" does not point to a valid jar for a Class-Path reference.
16:54:52,888 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 6379ms - Started 632 of 876 services (163 services failed or missing dependencies, 76 services are passive or on-demand)
In that log I can see only ONE ERROR and ONE WARN. And application does not deploys..
An oracle driver was not installed correctly. I re-installed it and it works fine now.