2 Replies Latest reply on Jan 29, 2002 3:45 PM by dsundstrom

    CMP2.0 example not working for me.

    chris70

      I did the following.

      1.Created a mysql-services.xml file in jboss3.0/deploy/lib (see below). (Dont know from where people copied it as I could not find it in JBoss3.0-alpha download or CMP2.0-docs.

      2.Copied the jar file mm.mysql-2.0.8-bin.jar to the lib/ext directory.

      3.Started the mysql server,jboss3.0 with jetty

      4. Deployed the cmp2-examples.ear from CMP2.0-docs. Its failed with msg. "Can't find Datasource java:/DefaultDS". What am I missing here?

      Please help,
      Chris


      <?xml version="1.0" encoding="UTF-8" ?>



      ConnectionURL=jdbc:mysql://localhost/test DriverClass=org.gjt.mm.mysql.Driver UserName=tester Password=tester
      java:/DefaultDS
      java:/Transactionmanager
      <mbean-ref name="ResourceAdapterName">JCA:service=RARDeployment,name=Minerva JDBC Localransaction ResourceAdapter</mbean-ref>
      ##Wed Aug 15 16:17:29 EDT 2001 BlockingTimeoutMillis=500000 IdleTimeoutMinutes=30 MaxSize=10 CleanupIntervalMinutes=10 MinSize=0 MaxIdleTimeoutPercent=1.0
      org.jboss.resource.security.ManytoOnePrincipalMapping
      UserName=tester


        • 1. Re: CMP2.0 example not working for me.
          c-ker...

          I also have a little bit problems with setting the datasource.

          I was used of naming my mysql-datasource mySQLDS, so I tried to use the mysql-service.xml which didn't really worked.

          Next I tried to hack it up a little by surfing to http://localhost:8082 and changing the values of the DefaultDS at JBoss-runtime. I set the values as u did, only I didn't mention the username and password after the url, but instead at the principal mapping.

          Maybe u can try this...

          • 2. Re: CMP2.0 example not working for me.
            dsundstrom

            The 3.0 alpha has a bug where the CMP 2.0 persistence engine always used the default datasource. This was fixed about a week after the 3.0 alpha was released. Until the next release, I suggest naming your datasource DefaultDS.