Export to GitHub

open-archetypes - issue #10

Datasource XML not included in deployment files


Posted on Jan 31, 2010 by Happy Cat

I created a new project using "seam-ear-archetype".

After starting the application I get the following error:

DEPLOYMENTS MISSING DEPENDENCIES: Deployment "persistence.unit:unitName=seamtest-ear.ear/seamtest-ejb- 1.0.jar#seamtest" is missing the following dependencies: Dependency "jboss.jca:name=seamtest-ds,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=seamtest-ds,service=DataSourceBinding' **")

DEPLOYMENTS IN ERROR: Deployment "jboss.jca:name=seamtest-ds,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=seamtest-ds,service=DataSourceBinding' **

The datasource file "seamtest-ds.xml" is located in "/seamtest- ear/src/etc" but it seems not to be included in any jar/war or ear.

Any idea?

Comment #1

Posted on Jan 31, 2010 by Happy Rhino

The datasource is environment specific, so it's not shipped with the ear. You need to manually deploy seamtest-ds.xml to your JBoss AS's deploy folder. I just mimicked the behaviour of JBoss Tools in this case.

If you're using eclipse, I suggest you use JBoss Tools (3.1.CR1) for Seam developments. Thus, you can right click on your *-ds.xml file and make it "deployable". JBT will automatically deploy your ear AND the datasource to JBoss AS.

Anyway, since I plan to add automatic deployment with maven-cargo-plugin (for maven CLI), you won't have to manually deploy the file.

Comment #2

Posted on Jan 31, 2010 by Happy Rhino

(No comment was entered for this change.)

Comment #3

Posted on Jan 31, 2010 by Happy Rhino

(No comment was entered for this change.)

Comment #4

Posted on Jan 31, 2010 by Happy Cat

Comment deleted

Comment #5

Posted on Jan 31, 2010 by Happy Cat

My fault! JBoss Tools sounds good - I'll give it a try!

Comment #6

Posted on Jan 31, 2010 by Happy Rhino

Database drivers are usually installed directly in your server /lib directory. Shipping one with an EAR seems a bad idea, I guess you'd run into classloading issues.

Anyway, what I plan to do is to implement stuff described by Carlos Sanchez in is [http://www.jroller.com/carlossg/entry/functional_testing_with_maven_cargo blog] and some JBoss configuration from their [http://community.jboss.org/wiki/CargoMavenplugin-JBossAS5loggingconfiguration wiki]. You might want to take a look at the latter for config file deployment.

Comment #7

Posted on Aug 9, 2010 by Swift Rhino

This is pretty simple to resolve, you can include your ds in either the pom of the ear or use other mechanism to deploy it to the app server (usually through the ant-runner-plugin)

Status: Accepted

Labels:
Type-Defect Priority-Medium Archetype-seam-ear-archetype Usability