I'm not familiar with web configuration. I think you need an additional jboss specific file to map the java:/comp/env/jdbc/JackalopeDB to a non-private jndi entry, such as java:/jdbc/JackalopeDB where your datasource should be deployed. Alternatively you could simply look up java:/jdbc/JackalopeDB directly
I don't think this has anything to do with the web because <resource-ref> in web.xml is the same as in ejb-jar.xml
I don't think this is a JNDI issue because I'm able to access EJBs from my Servlet, and I was able to use ENC-style naming conventions ("java:comp/env/ejb/Hello") to lookup the "Hello" EJB.
Since I can do this with EJB's, then I should be able to access a DataSource with java:comp/env/jdbc/JackalopeDB"
I don't think the sample mysql-ds.xml (from docs/examples/jca) has everything it needs OR there's another step in login-config.xml that I'm missing. It doesn't look like JBoss is loading the MySQL driver (at least according to the server log).
Does anyone have a working example that could share?
Was a solution ever found for this? I am having the same problem and it's driving me nuts. My datasource connection is retrieved in some cases and not others and it's really baffling.
i'm also having almost similar problem. I'm trying to configure mysql4.0.12 in jboss-3.2.1_tomcat-4.1.24.
I created a mysql-service.xml and put it in jboss-dist/server/default/deploy and put mysql-connector-java-3.0.7-stable-bin.jar in jboss-dist/lib.
mysql-service.xml looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
ConnectionURL=jdbc:mysql://localhost:3306/test DriverClass=org.gjt.mm.mysql.Driver UserName=shelly Password=nebula
<depends optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva JDBC LocalTransaction ResourceAdapter
BlockingTimeoutMillis=500000 IdleTimeoutMinutes=30 MaxSize=10 CleanupIntervalMinutes=10 MinSize=0 MaxIdleTimeoutPercent=1.0
i get the following errors while deployment:
org.jboss.deployment.DeploymentException: create operation failed for package file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/mysql-service.xml; - nested throwable: (javax.management.InstanceNotFoundException: jboss.jca:service=ConnectionFactoryLoader,name=mySqlDS is not registered.)
Does somebody know what else needs to be done.