Thats all well and good, but what about your xml file that configures mysql as a service. You also need something along the lines of a mysql-service.xml in deploy. Take a look at the hypersonic example that I mentioned and also take a look at Chap10 of the JBoss3.0QuickStartGuide gotten from here: http://prdownloads.sourceforge.net/jboss/?sort_by=date&sort=desc
wonder sonic wrote: > I've done all of you said: xml file in the deploy > directory with <attribute > name="JndiName">MySql</attribute>, xxx-13.jar file in > the jboss/lib directory and here is the > jbosscmp-jdbc.xml file of my ear: > ... > <jbosscmp-jdbc> > <defaults> > <datasource>java:/MySqlDS</datasource> > <datasource-mapping>MySql</datasource-mapping> > </defaults> > > And I've got the following exception for each of my > entity beans: > > 22:47:35,746 ERROR [URLDeploymentScanner] Failed to > deploy: > org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@4e98 > de0{ > url=file:/E:/jboss-3.0.0_tomcat-4.0.3/server/myrpg/deploy/myrpg-atlas.ear, > deployedLastModified=0 } > org.jboss.deployment.DeploymentException: error in > create of EjbModule: > njar:file:/E:/jboss-3.0.0_tomcat-4.0.3/server/myrpg/tm > p/deploy/server/myrpg/deploy/myrpg-atlas.ear/78.myrpg-atlas.ear^/myrpg-atlas-ejb.jar; > - nested throwable: (org.jboss.deploymen > t.DeploymentException: Error in jbosscmp-jdbc.xml : > datasource-mapping MySql not found) > at > org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:384) > at > org.jboss.deployment.MainDeployer.create(MainDeployer.java:637) > at > org.jboss.deployment.MainDeployer.create(MainDeployer.java:631) > at > org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:512) > at > org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481) > at > sun.reflect.GeneratedMethodAccessor8.invoke(Unknown > Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) > at $Proxy4.deploy(Unknown Source) > at > >org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405) > at > >org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:586) > at > org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:465) > at > >org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:237) > at > org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162) > at > sun.reflect.GeneratedMethodAccessor6.invoke(Unknown > Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894) > at $Proxy0.start(Unknown Source) > at > org.jboss.system.ServiceController.start(ServiceController.java:340) > at > sun.reflect.GeneratedMethodAccessor5.invoke(Unknown > Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) > at $Proxy3.start(Unknown Source) > at > org.jboss.deployment.SARDeployer.start(SARDeployer.java:243) > at > org.jboss.deployment.MainDeployer.start(MainDeployer.java:678) > at > org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513) > at > org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481) > at > org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:314) > at > org.jboss.system.server.ServerImpl.start(ServerImpl.java:216) > at org.jboss.Main.boot(Main.java:142) > at org.jboss.Main$1.run(Main.java:375) > at java.lang.Thread.run(Thread.java:536) > Caused by: 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:365) > at > >org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:237) > at > >org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:67) > at > >org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:601) > at > org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java:321) > at > org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:155) > at > org.jboss.ejb.EntityContainer.create(EntityContainer.java:337) > at > org.jboss.ejb.Container.invoke(Container.java:789) > at > org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894) > at $Proxy6.create(Unknown Source) > at > org.jboss.system.ServiceController.create(ServiceController.java:272) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) > at $Proxy19.create(Unknown Source) > at > org.jboss.ejb.EjbModule.createService(EjbModule.java:392) > at > org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:134) > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894) > at $Proxy6.create(Unknown Source) > at > org.jboss.system.ServiceController.create(ServiceController.java:272) > at > org.jboss.system.ServiceController.create(ServiceController.java:212) > at > sun.reflect.GeneratedMethodAccessor3.invoke(Unknown > Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at > java.lang.reflect.Method.invoke(Method.java:324) > at > >org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) > at > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) > at > org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) > at $Proxy5.create(Unknown Source) > at > org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:380) > ... 47 more > > What did I missed? > > Wonder sonic, brain storming ;) > > --- Greg Turner <[EMAIL PROTECTED]> a > écrit : > Hmmm. I am running RC2 and there is no > > jboss/server/default/lib, so I meant jboss/lib. I > > don't clearly understand how <depends> works, but > > there is an > > example in the deploy/hsqldb-service.xml file for > > deploying the hypersonic db > > > > wonder sonic wrote: > > > > > The lib directory, you mean by this, the jboss/lib > > or > > > jboss/server/default/lib? > > > > > > And what would be the <depends> tag for a jar??? > > > > > > tia, > > > wonder sonic > > > > > > --- Greg Turner <[EMAIL PROTECTED]> a > > > écrit : > Putting the driver jar file into /lib > > will > > > work, but > > > > I don't think that is the correct place. I > > think > > > > the correct place is in the /deploy directory. > > > > Putting it into the /deploy directory means you > > have > > > > to put a <depends></depends> tag into your xml > > file > > > > so that JBoss will not try and deploy your > > service > > > > before it deploys the jar file. > > > > > > > > wonder sonic wrote: > > > > > > > > > I use the 3.0 final, and indeed, the version > > is > > > > old (I > > > > > use the one downloadable in the CMP 2.0 / > > JBoss > > > > 3.0 > > > > > tutorial ;) instead of the one in this > > directory > > > > :D > > > > > One thing I don't know is where to put the > > 2.0.11 > > > > > driver archive :( If you know, could you > > please > > > > tell > > > > > me? > > > > > > > > > > TIA, > > > > > Wonder Sonic > > > > > > > > > > --- Ricardo_Argüello <[EMAIL PROTECTED]> a > > > > écrit : > > > > > > Are you using JBoss 3.0.0 final? It looks > > like > > > > your > > > > > > mysql-service.xml is an old one. > > > > > > > > > > > > There is an example file for MySQL > > > > > > (mysql-service.xml) in the > > > > > > jboss-3.0.0/docs/examples/jca/ directory. > > > > > > > > > > > > You should edit this file, and drop it into > > > > > > server/default/deploy > > > > > > > > > > > > Follow the instructions in the XML file. > > > > > > > > > > > > Ricardo Argüello > > > > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > > From: "wonder sonic" <[EMAIL PROTECTED]> > > > > > > To: <[EMAIL PROTECTED]> > > > > > > Sent: Thursday, June 06, 2002 11:23 AM > > > > > > Subject: [JBoss-user] MySQL service > > installation > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > I've read the tutorial document about CMR > > 2.0 > > > > with > > > > > > > JBoss 3.0 and tried to install mySQL as > > the > > > > > > default > > > > > > > datasource but I encouter some errors > > during > > > > the > > > > > > > deployment of my beans: > > > > > > > > > > > > > > Caused by: > > > > > > org.jboss.deployment.DeploymentException: > > > > > > > Error: can't find data source: > > java:/mySQLDS; > > > > - > > > > > > nested > > > > > > > throwable: (javax. > > > > > > > naming.NameNotFoundException: mySQLDS not > > > > bound) > > > > > > > > > > > > > > Though I've got: > > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > > <!-- $Id: mysql-service.xml,v 1.3 > > 2002/03/01 > > > > > > 00:02:00 > > > > > > > d_jencks Exp $ --> > > > > > > > > > > > > > > > > > > > > > <!-- > > > > > > > > > > > > > > > > > > > > > > > > > > > > ===================================================================== > > > > > > > --> > > > > > > > <!-- > > > > > > > > > > > > > --> > > > > > > > <!-- Example configuration for the mysql > > > > database. > > > > > > > > > > > > > --> > > > > > > > <!-- Put the driver jar > > mm.mysql-2.0.4-bin.jar > > > > in > > > > > > > lib/ext --> > > > > > > > <!-- Contributed by Ignacio Coloma > > > > > > > [EMAIL PROTECTED] > > --> > > > > > > > <!-- > > > > > > > > > > > > > > > > > > > > > > > > > > > > ===================================================================== > > > > > > > --> > > > > > > > > > > > > > > <server> > > > > > > > <classpath codebase="." > > > > > > > archives="mm.mysql-2.0.11-bin.jar"/> > > > > > > > > > > > > > > <mbean > > > > > > > > > > > > > code="org.jboss.resource.ConnectionFactoryLoader" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="jboss.jca:service=ConnectionFactoryLoader,name=mySQLDS"> > > > > > > > <attribute > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="ManagedConnectionFactoryProperties">ConnectionURL=jdbc:mysql://localhost/myrpg > > > > > > > DriverClass=org.gjt.mm.mysql.Driver > > > > > > > UserName=myrpg > > > > > > > Password=myrpg123</attribute> > > > > > > > <attribute > > name="JndiName">mySQLDS</attribute> > > > > > > > <attribute > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="TransactionManagerName">java:/TransactionManager</attribute> > > > > > > > <depends > > > > > > > > > > > > > > > > > > > > > > > > > > > > >optional-attribute-name="ResourceAdapterName">jboss.jca:service=RARDeployment,name=Minerva > > > > > > > JDBC LocalTransaction > > > > ResourceAdapter</depends> > > > > > > > <depends > > > > > > > > > > > > > > > > > > > > > > > > > > > > >optional-attribute-name="ConnectionManagerFactoryLoaderName">jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory</depends> > > > > > > > <attribute > > > > name="ConnectionManagerProperties"># > > > > > > > #Wed Aug 15 16:17:29 EDT 2001 > > > > > > > BlockingTimeoutMillis=500000 > > > > > > > IdleTimeoutMinutes=30 > > > > > > > MaxSize=10 > > > > > > > CleanupIntervalMinutes=10 > > > > > > > MinSize=0 > > > > > > > MaxIdleTimeoutPercent=1.0 > > > === message truncated === > > ___________________________________________________________ > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! > Yahoo! Mail : http://fr.mail.yahoo.com > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- Greg Turner Tiburon Enterprise Systems http://www.tiburon-e-systems.com Box 1171 Tiburon, CA 94920 415-332-3363 _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user