I assume that your example is the template examples from
the free user doc's page.
I noticed that the
<config-property name="UserName" and
were not set in your mysql-service.xml file.
I configured the examples to work with mySQL 3.?? version
and I specified UserName with no password.
You might want to check the authentication parameters used to login to mySQL from the mysql.exe (windows) command line tool.
I had some different issues when changing the data source to mysql:
I changed the datasource names and mappings to not
use default names.
I had to change the .ant.properites file (the template
# Set the DB type mapping (Hypersonic SQL, PostgreSQL etc., see XDoclet's attribute "typemapping")
# Set the DataSource name your are going to use (java:/DefaultDS etc., see XDoclet's attribute "datasource")
XDoclet uses these properties when building the app's
You might need to change the .ant.properties "type.mapping" property if your using the template's build.xml file.
Check the jbosscmp-jdbc.xml file in the ejb-test.jar
in the JBoss deployment directory "your_jboss_path/server/default/deploy"
to see what exactly is being generated.
It should look something like this:
your mapping might still be "Hypersonic SQL" which might also be causing the problem.
Actually Bruce, I was trying to run the cmp2 Ganster program. I modified the jbosscmp-jdbc.xml file found in the cmp2/src/resources/ejb-jar/META-INF directory. The ant build.xml file doesn't address the database directly only the jbosscmp-jdbc.xml file.
again I modified the values found in defaults datasource and datasource-mapping from
Do you have any perls of wisdom on this example program?
Bruce, I found two bugs, one in the cmp2 examples jbosscmp-jdbc.xml and the other is in the creation of the JMS_MESSAGES table.
The jbosscmp-jdbc.xml contains the following :
The word "desc" is reserved in MySQL and when JAWS trys to create the table it blows up.
The second error occurs when the "JMS_MESSAGES" table is created by JBoss. JAWS generated the following SQL script:
CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(50) NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
The problem is that there is no "OBJECT" type in MySQL. If you substitue "BLOB" for "OBJECT" and execute the above SQL script by hand the table is created and everything works.