File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Trying to migrate a tutorial on JBoss to incorporate a mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Trying to migrate a tutorial on JBoss to incorporate a mysql database" Watch "Trying to migrate a tutorial on JBoss to incorporate a mysql database" New topic
Author

Trying to migrate a tutorial on JBoss to incorporate a mysql database

Karl Murphy
Greenhorn

Joined: Mar 02, 2013
Posts: 1
Hi there

I am new to JBoss 7 and this forum too . I have been working through some of the JBoss quickstart tutorials. Currently, I am trying to adapt the greeter tutorial ( that is found here -http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/greeter/) so that I can replace the default H2 database with mysql. I have made the necessary configuration changes to the standalone.xml file. I have created a module and placed the connector jar alongside it. I have also changed the project's persistence.xml file. However, when I run the project I am getting a number of errors. Please could someone take a look at the log file below and try to discern what may be causing the problem. Any help would be greatly appreciated as I feel I have hit a brick wall. I have the code hosted on GIT here - https://github.com/bosra/greeter. Thanks in advance

18:00:23,093 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 27) JBAS014612: Operation ("enable") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "my_pool")
]): org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context.java.jboss is already registered
at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:154) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:227) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:560) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:201) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2228) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:307) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:921) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.connector.subsystems.datasources.DataSourceEnable.addServices(DataSourceEnable.java:242) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.connector.subsystems.datasources.DataSourceEnable$1.execute(DataSourceEnable.java:90) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.connector.subsystems.datasources.DataSourceEnable$1.execute(DataSourceEnable.java:92) [jboss-as-connector-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:387) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:274) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:202) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:311) [jboss-as-controller-7.1.0.Final.jar:7.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
Jordy Med
Greenhorn

Joined: Mar 16, 2013
Posts: 3
It looks like a jndi name is being used more than once to deploy a service. Can you also share your standalone.xml file?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to migrate a tutorial on JBoss to incorporate a mysql database
 
Similar Threads
How to deploy open cms on jboss as 7
Caused by: javax.persistence.PersistenceException: JBAS011466: PersistenceProvider 'org.apache.openj
Issue while deploying Application in Jboss 7.1
No bean named 'springSecurityFilterChain' is defined
Web Service Deployment Failed