• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

datasource already registered error in deploying JPA war file to JBoss

 
Greenhorn
Posts: 3
Spring Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone encountered this error in JBoss AS 7.1.
I've got a simple application that uses JPA - referencing a data source that is already in standalone server. I added the data source via the admin console.

This is stack trace:
14:14:52,539 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."transhist-process.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."transhist-process.war".INSTALL
Failed to process phase INSTALL of deployment "transhist-process.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS010464: Exception deploying datasource java:jboss/datasources/Core2DS
at org.jboss.as.connector.deployers.processors.DsXmlDeploymentInstallProcessor.deploy(DsXmlDeploymentInstallProcessor.java:125)
...
My persistence.xml contents:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="primary">
<jta-data-source>datasources/Core2DS</jta-data-source>
<class>com.web.thp.data.Transhist</class>
<validation-mode>NONE</validation-mode>
</persistence-unit>
</persistence>
-------------
I've not found much on this sort of error. Everything is running on Windows 7 - 64-bit.

Thanks,
Dave
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That doesn't look like the entire exception stacktrace. Please post the entire exception stacktrace and your datasource configurations.

While posting, wrap the logs and xml content in a code block by using the Code button in the message editor window. Use the Preview button to make sure the post is correctly formatted.
 
Dave Wimberly
Greenhorn
Posts: 3
Spring Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, this is the subsection for the datasources in standalone\configuration\standalone.xml... Added the Oracle data source via the console -- except for the "check-valid-connection-sql".

The log entry in JBoss server log:


Dave
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


This happened to me while playing with JBoss EAP 6/7.1

Not only are you declaring it in some xml file buried in JBoss, but also within your war.
I don't know exactly where off hand, but look for Core2DS in your instalation.

WP
 
Dave Wimberly
Greenhorn
Posts: 3
Spring Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William,
I found the duplicate DataSource XML file!
I'm using these new JBoss Maven project templates in Eclipse and must have done something wrong to make it generate the additional data source to deploy.
 
reply
    Bookmark Topic Watch Topic
  • New Topic