aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes mySQL via EJB in reference implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "mySQL via EJB in reference implementation" Watch "mySQL via EJB in reference implementation" New topic
Author

mySQL via EJB in reference implementation

paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20635
    ∞

I've been tinkering with this for a couple of hours now.
I can see how you can make your EJB's access cloudscape, but I would like to access mySQL.
Can it be done? If so, how?

permaculture Wood Burning Stoves 2.0 - 4-DVD set
mohit joshi
Ranch Hand

Joined: Sep 23, 2000
Posts: 243

I have worked with weblogic which can be connected to 4 types of dbs, and mySql is not one of them. The required driver is not present.
I do not know about other App Servers.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20635
    ∞

I've worked with weblogic too.
I get mySQL to work okay from applications. I work a jar file into my classpath and do the forName thing.
It seems the reference implementation from Sun uses your classpath (sometimes). But I suspect that somewhre I need to tell it how to do the Class.forName stuff.
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20635
    ∞

I've moved a little further forward.
I've included the following in the config/default.properties file:
jdbc.drivers=COM.cloudscape.core.RmiJdbcDriver rg.gjt.mm.mysql.Driver
jdbc.datasources=jdbc/Cloudscape|jdbc:cloudscape:rmi:CloudscapeDB;create=true|jdbc/DataSource|jdbc:mysql://localhost/soup
(soup is the name of my database in mySQL)
All the JNDI stuff in the deploytool is set to jdbc/DataSource
Here is where my problem is (with debug lines):

And here is what I see on the j2ee console:
xxx 2.1
xxx 2.2
xxx 2.3
xxx 2.4
xxx 2.5
Cannot find principal mapping information for data source with JNDI name jdbc/DataSource
xxx 2.6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mySQL via EJB in reference implementation