This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

mySQL via EJB in reference implementation

 
Trailboss
Posts: 23131
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 23131
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 23131
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!