Discussion:
[Middlegen-user] Deploying sample from middlegen-2.0-vo on JBoss/MySQL
Andreas Kemkes
2004-02-25 07:20:03 UTC
Permalink
I'm trying to deploy the airplane.ear on JBoss 3.2.3 with an MySQL
database, but the server log shows the following error:

2004-02-24 16:14:03,531 INFO [org.jboss.ejb.EjbModule] Deploying
FlightFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
PersonFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
SequenceSession
2004-02-24 16:14:04,109 ERROR [org.jboss.ejb.EntityContainer] Starting
failed
org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml :
datasource-mapping MySQL not found
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:433)

I've configured the mapping as mySQL (please note the different
spelling) in mysql.xml:

<property name="jboss.datasource.mapping" value="mySQL"/>

That is reflected in jbosscmp-jdbc.xml:

<defaults>
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
</defaults>

My understanding is that the mapping is resolved through
standardjbosscmp-jdbc.xml.

What I do not understand is where the MySQL name originates that causes
the error. I've scanned the sample directory for the string, but
nothing noteable came up. I've also removed an older version of the
file from the JBoss's deploy directory including the tmp directory. Any
help would be appreciated.

Thanks,

Andreas
Eivind Waaler
2004-02-25 09:04:05 UTC
Permalink
This works fine for me. Having the value as 'mySQL' in the mysql.xml file.
Could it be a problem with the JBoss version you're using or something
like that? I'm using jboss-3.2.3 now, seems to work fine :-)

You have of course changed the DefaultDS to use mysql instead of hsqldb?
The datasource to use is set in the jboss.xml file if you want to change
that to something other than default.

.eivind
Post by Andreas Kemkes
I'm trying to deploy the airplane.ear on JBoss 3.2.3 with an MySQL
2004-02-24 16:14:03,531 INFO [org.jboss.ejb.EjbModule] Deploying
FlightFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
PersonFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
SequenceSession
2004-02-24 16:14:04,109 ERROR [org.jboss.ejb.EntityContainer] Starting
failed
datasource-mapping MySQL not found
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:433)
I've configured the mapping as mySQL (please note the different
<property name="jboss.datasource.mapping" value="mySQL"/>
<defaults>
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
</defaults>
My understanding is that the mapping is resolved through
standardjbosscmp-jdbc.xml.
What I do not understand is where the MySQL name originates that causes
the error. I've scanned the sample directory for the string, but
nothing noteable came up. I've also removed an older version of the
file from the JBoss's deploy directory including the tmp directory. Any
help would be appreciated.
Thanks,
Andreas
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Andreas Kemkes
2004-03-01 06:15:04 UTC
Permalink
It was my bad. I didn't look in the right place. There was a
<defaults> element in the standardjbosscmp-jdbc.xml, which had the wrong
spelling for the datasource-mapping.
Sorry for the bandwidth, but I'm still trying to get my head around all
these configuration files.

The only thing that is still unclear is how the two different <defaults>
elements in standardjbosscmp-jdbc.xml (from JBoss's config) and
jbosscmp-jdbc.xml (from airline.ear) relate and how any precedence among
them is resolved.

Thanks for the answer.

Andreas
Post by Andreas Kemkes
I'm trying to deploy the airplane.ear on JBoss 3.2.3 with an MySQL
2004-02-24 16:14:03,531 INFO [org.jboss.ejb.EjbModule] Deploying
FlightFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
PersonFacade
2004-02-24 16:14:03,765 INFO [org.jboss.ejb.EjbModule] Deploying
SequenceSession
2004-02-24 16:14:04,109 ERROR [org.jboss.ejb.EntityContainer] Starting
failed
datasource-mapping MySQL not found
at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:433)
I've configured the mapping as mySQL (please note the different
<property name="jboss.datasource.mapping" value="mySQL"/>
<defaults>
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
</defaults>
My understanding is that the mapping is resolved through
standardjbosscmp-jdbc.xml.
What I do not understand is where the MySQL name originates that
causes the error. I've scanned the sample directory for the string,
but nothing noteable came up. I've also removed an older version of
the file from the JBoss's deploy directory including the tmp
directory. Any help would be appreciated.
Thanks,
Andreas
Loading...