Jboss jar deployment not persisting across server restarts - jboss

Using the jboss cli, We are deploying the Oracle Jdbc 12 (ojdbc7.jar) to a jboss server version 6.4, running with JDK 1.8. The command looks like this:
call %JBOSSHOME%\bin\jboss-cli.bat -c "deploy %JBOSSHOME%\ojdbc7.jar --name=OracleJDBCDriver12c"
The command above succeeds, and jboss goes about its business with all Oracle datasources working as expected. However, after we shutdown and restart the jboss server, the ojdbc deployment is "lost". Here are some text from the server log, during startup:
09:13:54,716 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 12.1)
And then further down the log:
09:13:57,642 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) JBAS014901: Content removed from location C:\java\jboss-eap-6.4\standalone\data\content\a2\348e4944956fac05235f7cd5d30bf872afb157\content
09:13:57,644 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015858: Undeployed "OracleJDBCDriver12c" (runtime-name: "OracleJDBCDriver12c")
It seems from the logs that jboss for some reason decides to undeploy the ojdbc jar deployment. Would anyone have any idea why?
Thanks

Related

Hibernate OGM mongodb example

I'm new to java ee, I'm searching for some example of hibernate OGM with Mongodb. I found this: https://github.com/fmarchioni/mastertheboss/tree/master/hibernateogm-mongo but I'm struggling trying to run it.
Those are the steps I've done:
import the project in Eclipse as Maven project
added JavaServer Faces and Dynamic Web Module in Project Facets
installed Wildfly as Server runtime
Trying to run the project I get this error
13:32:49,916 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."hibernateogm-mongo.war".FIRST_MODULE_USE: org.jboss.msc.service.StartException in service jboss.deployment.unit."hibernateogm-mongo.war".FIRST_MODULE_USE: WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment "hibernateogm-mongo.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:151)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1736)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1698)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1556)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJPA0027: Persistence provider module load error org.hibernate.ogm (class org.hibernate.ogm.jpa.HibernateOgmPersistence)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:991)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:266)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleWarDeployment(PersistenceUnitServiceHandler.java:206)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:134)
at org.jboss.as.jpa.processor.PersistenceBeginInstallProcessor.deploy(PersistenceBeginInstallProcessor.java:52)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144)
... 8 more
Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate.ogm
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:294)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:280)
at org.jboss.as.jpa.persistenceprovider.PersistenceProviderLoader.loadProviderModuleByName(PersistenceProviderLoader.java:65)
at org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.lookupProvider(PersistenceUnitServiceHandler.java:987)
... 13 more
13:32:50,978 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Estrella Galicia' 9.3.1.Final
13:32:51,380 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 72) WFLYCLINF0002: Started client-mappings cache from ejb container
13:32:51,602 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 72) WFLYUT0021: Registered web context: '/wildflyDynamicProject' for server 'default-server'
13:32:51,612 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "hibernateogm-mongo.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"hibernateogm-mongo.war\".FIRST_MODULE_USE" => "WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"hibernateogm-mongo.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJPA0027: Persistence provider module load error org.hibernate.ogm (class org.hibernate.ogm.jpa.HibernateOgmPersistence)
Caused by: org.jboss.modules.ModuleNotFoundException: org.hibernate.ogm"}}
You can see the actual error is org.jboss.modules.ModuleNotFoundException: org.hibernate.ogm
Now the questions:
I guess org.hibernate.ogm as Maven dependency is not enough, Widlfly needs org.hibernate.ogm module. How can I install it? All the informations I find are JBoss related and outdated.
can I run this project in Tomcat or this makes no sense? Is Wildfly necessary in this case? I get this error in case of Tomcat 8 runtime: java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
That example is quite old, I've created an up-to-date example that I'm planning to inlcude in the project on my personal repository.
Here's the link: https://github.com/DavideD/hibernate-demos/tree/master/hibernate-ogm/nosql-with-hibernate-ogm-101/hibernate-ogm-demo-nosql-with-hibernate-ogm-101-part-3
This project shows how to setup a maven build that prepares WildFly 13 with the appropriate modules using the provisioning plugin. It also show a basic configuration for the persistence.xml and jboss deploy descriptor.
One thing to keep in mind, is that you need to start the server using the proprierty -Dee8.preview.mode=true as you can see in the arquillian.xml
I hope this help

Problems with Jboss 6.1+ deployment

I think I have some related problems with JBOSS. If I start server with some project in the deploy folder, the server doesn't start and gives me the error:
'Server JBoss EAP 6.1+ Runtime Server failed to start'.
Furthermore if I add an ear in the deploy folder I get the following warning:
'JBAS015000: Cannot delete deployment progress marker file'.
Sometimes adding the ear's in the folder I get the errors:
JBAS018559: Deployed "my-ear-7.5.13.ear" (runtime-name : "my-ear-7.5.13.ear")
17:11:18,463 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2)
JBAS015877: Stopped deployment null (runtime-name: my-ejb.jar) in 32ms
17:11:18,511 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3)
JBAS015877: Stopped deployment my-ear-7.5.13.ear (runtime-name: my-ear-7.5.13.ear) in 90ms
17:11:18,573 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "my-ear-7.5.13.ear"

Openshift - ROOT.war deployed but no app

That's what I see in my logs:
[jbossas-DOMAIN.rhcloud.com SHA]\> tail_all
2014/05/26 09:08:35,527 INFO [org.jboss.as.messaging] (MSC service thread 1-4)
JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
2014/05/26 09:08:35,599 INFO [org.jboss.as.deployment.connector] (MSC service t
hread 1-2) JBAS010406: Registered connection factory java:/JmsXA
2014/05/26 09:08:35,620 INFO [org.hornetq.ra.HornetQResourceAdapter] (MSC servi
ce thread 1-2) HornetQ resource adaptor started
2014/05/26 09:08:35,621 INFO [org.jboss.as.connector.services.ResourceAdapterAc
tivatorService$ResourceAdapterActivator] (MSC service thread 1-2) IJ020002: Depl
oyed: file://RaActivatorhornetq-ra
2014/05/26 09:08:35,623 INFO [org.jboss.as.deployment.connector] (MSC service t
hread 1-4) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
2014/05/26 09:08:35,785 INFO [org.jboss.as.server.deployment] (MSC service thre
ad 1-4) JBAS015876: Starting deployment of "ROOT.war"
2014/05/26 09:08:38,512 INFO [org.jboss.web] (MSC service thread 1-4) JBAS01821
0: Registering web context:
2014/05/26 09:08:38,532 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951
: Admin console listening on http://127.2.148.129:9990
2014/05/26 09:08:38,532 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015874
: JBoss AS 7.1.1.Final "Brontes" started in 19348ms - Started 211 of 330 service
s (116 services are passive or on-demand)
2014/05/26 09:08:38,785 INFO [org.jboss.as.server] (DeploymentScanner-threads -
2) JBAS018559: Deployed "ROOT.war"
[jbossas-DOMAIN.rhcloud.com SHA]\> find . -name ROOT.war
find: `./.ssh': Permission denied
find: `./.sandbox': Permission denied
./app-root/runtime/dependencies/jbossas/deployments/ROOT.war
find: `./.tmp': Permission denied
./app-deployments/2014-05-26_08-49-32.024/dependencies/jbossas/deployments/ROOT.
war
[jbossas-DOMAIN.rhcloud.com SHA]\>
But when I go to the root url I see the default Welcome to your JBoss AS application on OpenShift page. I am not using maven. Tried to follow the instructions for Jboss (jboss-as-7.1.1.Final) from this page - did not delete the src folder though. What do I need to do ? Do I need to delete the src folder (?) and add a deployments folder ?
Build output (eclipse Java EE Luna M7)
Stopping jbossas cartridge
Sending SIGTERM to jboss:301473 ...
Building git ref 'master', commit e48bedf
Skipping Maven build due to absence of pom.xml
Preparing build for deployment
Deployment id is 72c749b6
Activating deployment
Deploying JBoss
Starting jbossas cartridge
Found 127.2.148.129:8080 listening port
Found 127.2.148.129:9999 listening port
/var/lib/openshift/538267574382ece7950004a4/jbossas/standalone/deployments /var/lib/openshift/SHA/jbossas
/var/lib/openshift/538267574382ece7950004a4/jbossas
Artifacts deployed: ./ROOT.war
-------------------------
Git Post-Receive Result: success
Activation status: success
Deployment completed with status: success
Repository already uptodate.
EDIT: hmm, the war is 24k which is little - the project is a regular java web application project - runs fine locally both on glassfish and jboss
I would accept an answer telling me how to do it from eclipse (edit: asked here) but till then producing manually the war (right click on the project then export as war) and then scp'ing straight from git Bash (msysgit, mingwin):
$ scp "~/ROOT.war" SHA#APP-DOMAIN.rhcloud.com:/var/lib/\
openshift/SHA/app-root/dependencies/jbossas/deployments
as detailed here (detailed is an euphemism) solved it.
For the gory details of finally setting this up see here
This question is pretty old so I am sure that the problem has been solved, however I was having the same problem and I am sure someone else will do as well. In my case the git wasn't tracking the src folder in my local repository.
You just need to open up a terminal in your git repo folder and type git status to show which folders are not being tracked, then git add [file/foldername] and finally republish it.

Unable to start JBoss from within Eclipse

I am unable to start JBoss server 5.1.0.GA version from eclipse Indigo.
Eclipse shows me message box saying 'Server JBoss v5.0 at localhost was unable to start within 500 seconds. If the server requires more time, try increasing the timeout in the server editor.' but in the console window I can see that JBoss has been actually started.
here is some part of log which I can see in console window of eclipse :
SecureDeploymentManager/remote - EJB3.x Default Remote Business Interface
SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager - EJB3.x Remote Business Interface
15:14:20,212 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
15:14:20,212 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureManagementView ejbName: SecureManagementView
15:14:20,222 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
SecureManagementView/remote - EJB3.x Default Remote Business Interface
SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView - EJB3.x Remote Business Interface
15:14:20,252 INFO [SessionSpecContainer] Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
15:14:20,262 INFO [EJBContainer] STARTED EJB: org.jboss.profileservice.ejb.SecureProfileServiceBean ejbName: SecureProfileService
15:14:20,272 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
SecureProfileService/remote - EJB3.x Default Remote Business Interface
SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService - EJB3.x Remote Business Interface
15:14:20,362 INFO [TomcatDeployment] deploy, ctxPath=/admin-console
15:14:20,412 INFO [config] Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
15:14:23,486 INFO [TomcatDeployment] deploy, ctxPath=/BannedListSearch
15:14:27,532 INFO [TomcatDeployment] deploy, ctxPath=/IWorkWebApp
15:14:27,813 INFO [TomcatDeployment] deploy, ctxPath=/
15:14:29,155 INFO [TomcatDeployment] deploy, ctxPath=/TestWebProject
15:14:30,036 INFO [TomcatDeployment] deploy, ctxPath=/displaytag-examples-1.2
15:14:30,136 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
15:14:30,276 INFO [TomcatDeployment] deploy, ctxPath=/HelloWebService
15:14:30,407 ERROR [EngineConfigurationFactoryServlet] Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
15:14:30,687 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8081
15:14:30,707 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
15:14:30,707 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 48s:110ms
I have increased start Timeout of server to 500 seconds then also I am getting same error. I have not changed anything else.
I am able to start JBoss from command prompt successfully but same server is not getting started from eclipse.
Please help me to start the JBoss server.
Sound to me like the http port you are configured in JBoss is different to the port you have in the Eclipse configuration for JBoss.
Eclipse uses the port configuration to listen to JBoss' port so that it can determine that JBoss has actually started. If they differ, Eclipse thinks JBoss has never started although it actually has according to the log console. Make the ports match and it will probably work.
Updated: According to your log, JBoss is using port 8081 for HTTP:
Starting Coyote HTTP/1.1 on http-127.0.0.1-8081
Now you have to tell Eclipse to listen to that port so that it can figure out whether JBoss has started (default is 8080 and therefore Eclipse will never be aware of it!). Go to your servers view, double click on your JBoss server, and the configuration screen will come up:
You have to edit the HTTP port (in the 'Port' box) and set it to 8081 so that it matches your server's.

How to start JBoss AS 7?

I run the standalone.bat
I encounter a page 404 error when accessing
http://127.0.0.1:8080/
May i know what is wrong?
Below is the server startup logs
Config file not found C:\software\JBoss\bin\standalone.conf.bat
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\software\JBoss
JAVA: C:\Program Files\Java\jdk1.6.0_25\bin\java
JAVA_OPTS: -Dprogram.name=standalone.bat -server
===============================================================================
20:10:34,077 INFO [org.jboss.modules] JBoss Modules version 1.0.0.Beta17
20:10:34,406 INFO [org.jboss.msc] JBoss MSC version 1.0.0.Beta8
20:10:34,468 INFO [org.jboss.as] JBoss AS 7.0.0.Beta3 "Salyut" starting
20:10:35,296 INFO [org.jboss.as.server] Activating core services
20:10:35,468 INFO [org.jboss.as] creating native management service using netwo
rk interface (default) port (9999)
20:10:35,484 INFO [org.jboss.as] creating http management service using network
interface (default) port (9990)
20:10:35,499 INFO [org.jboss.as.arquillian] Activating Arquillian Subsystem
20:10:35,515 INFO [org.jboss.as.ee] Activating EE subsystem
20:10:35,577 INFO [org.jboss.as.naming] Activating Naming Subsystem
20:10:35,781 INFO [org.jboss.as.connector.subsystems.datasources] Deploying JDB
C-compliant driver class org.h2.Driver (version 1.2)
20:10:35,796 INFO [org.jboss.as.osgi] Activating OSGi Subsystem
20:10:36,202 INFO [org.jboss.as.webservices] Activating WebServices Extension
20:10:36,468 INFO [org.jboss.as.logging] Removing bootstrap log handlers
20:10:36,468 INFO [org.jboss.as.naming] Starting Naming Service
20:10:36,484 INFO [org.jboss.as.deployment] (MSC service thread 1-3) Started Fi
leSystemDeploymentService for directory C:\software\JBoss\standalone\deployments
20:10:36,499 INFO [org.jboss.wsf.common.management.AbstractServerConfig] (MSC s
ervice thread 1-4) JBoss Web Services - Stack CXF Server 4.0.0.Alpha4
20:10:36,531 INFO [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting
version 3.1.0.Beta2
20:10:36,593 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-
1) Starting remote JMX connector
20:10:36,593 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service
thread 1-3) The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program File
s\Java\jdk1.6.0_25\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Tortois
eSVN\bin
20:10:36,609 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC ser
vice thread 1-3) Unable to set the URLStreamHandlerFactory
20:10:36,609 WARN [org.jboss.osgi.framework.internal.URLHandlerPlugin] (MSC ser
vice thread 1-3) Unable to set the ContentHandlerFactory
20:10:36,749 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service
thread 1-2) live server is starting..
20:10:36,765 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread
1-3) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
20:10:36,984 INFO [org.jboss.as.connector] (MSC service thread 1-3) Starting JC
A Subsystem (JBoss IronJacamar 1.0.0.Beta5)
20:10:37,015 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service
thread 1-3) Bound JDBC Data-source [java:/H2DS]
20:10:37,124 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC ser
vice thread 1-2) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5445
for CORE protocol
20:10:37,140 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC ser
vice thread 1-2) Started Netty Acceptor version 3.2.1.Final-r2319 localhost:5455
for CORE protocol
20:10:37,140 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service
thread 1-2) HornetQ Server version 2.1.2.Final (Colmeia, 120) started
20:10:37,218 INFO [org.jboss.as] (MSC service thread 1-4) JBoss AS 7.0.0.Beta3
"Salyut" started in 3391ms - Started 100 of 147 services (47 services are passiv
e or on-demand)
In the alphas and betas of JBoss 7 there were no welcome page deployed. There are and will be in the final release.
To get a page there simply deploy a war named ROOT.war or a war with / as its context root.
I suppose that there is no web application that can be executed.
You can connect to console using these address: http://localhost:9990/console/.
There's simply no default web page there. Try deploying your web app and accessing it.