5 Replies Latest reply on Jun 20, 2003 10:09 PM by Adrian Brock

    how to configure cloudscape data source in JBOSS running pet

    cliffwei Newbie

      hi, I am trying to run petstore 1.3.1 on JBOSS_3.2 with tomcat. I am using the petstore patch from wrox website. Do I just need to rewrite the login.config file in /server/default/conf and add one file about data base source in /server/default/deploy? I have used two configuration files from the patch from http://www.stanford.edu/~mdelgado/jboss/. But I got many errors about data source connection and JMS Container problem:

      ERROR [JMSContainerInvoker] Starting failed
      javax.naming.NameNotFoundException: DefaultJMSProvider not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.getJMSProviderAdapter(JMSContainerInvoker.java:805)


      ERROR [MessageDrivenContainer] Starting failed
      javax.naming.NameNotFoundException: DefaultJMSProvider not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lo

      ERROR [MessageDrivenContainer] Starting failed
      javax.naming.NameNotFoundException: DefaultJMSProvider not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      at org.jnp.interfaces.NamingContext.lookup(Naming

      ........


      Please help me.

      MUCH APPRECIATED

        • 1. Re: how to configure cloudscape data source in JBOSS running
          Adrian Brock Master

          Set the RecursiveSearch attribute in
          conf/jboss-service.xml to True.

          Regards,
          Adrian

          • 2. Re: how to configure cloudscape data source in JBOSS running
            cliffwei Newbie

            Thank you for your help. I have done the modification and I met with new errors:

            10:22:55,157 INFO [ServiceConfigurator] Problem configuring service jboss.jca:service=LocalTxDS,name=EstoreDataSource
            org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName
            at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:332)
            at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
            at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:437)
            at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:350)
            at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
            at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
            at org.jboss.system.ServiceController.install(ServiceController.java:225)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



            DO u know how to configure the cloudscape data source?

            • 3. Re: how to configure cloudscape data source in JBOSS running
              Adrian Brock Master

              I don't, try posting your db deployment.
              I can't see an example deployment in
              docs/examples/jca for cloudscape

              You should be able to copy one and change
              the properties. The most interesting ones
              are on the managed connection factory.

              Regards,
              Adrian

              • 4. Re: how to configure cloudscape data source in JBOSS running
                cliffwei Newbie

                Thank you very much for your advice

                Here is the *-ds.xml file I am using :

                <?xml version="1.0" encoding="UTF-8"?>
                <!-- Datasources used for Petstore -->

                <local-tx-datasource>
                <jndi-name>jdbc/petstore/PetStoreDB</jndi-name>
                <connection-url>jdbc:rmi://localhost:1099/jdbc:cloudscape:PetStoreDB</connection-url>
                <driver-class>COM.cloudscape.core.RmiJdbcDriver</driver-class>
                <user-name>dba</user-name>
                sql
                </local-tx-datasource>
                <local-tx-datasource>
                <jndi-name>jdbc/opc/OPCDB</jndi-name>
                <connection-url>jdbc:rmi://localhost:1099/jdbc:cloudscape:OPCDB</connection-url>
                <driver-class>COM.cloudscape.core.RmiJdbcDriver</driver-class>
                <user-name>dba</user-name>
                sql
                </local-tx-datasource>
                <local-tx-datasource>
                <jndi-name>jdbc/supplier/SupplierDB</jndi-name>
                <connection-url>jdbc:rmi://localhost:1099/jdbc:cloudscape:SupplierDB</connection-url>
                <driver-class>COM.cloudscape.core.RmiJdbcDriver</driver-class>
                <user-name>dba</user-name>
                sql
                </local-tx-datasource>


                and also I modified the login-conf.xml file and add

                <application-policy name="CloudscapeDbRealm">

                <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required">
                <module-option name="jdbc/petstore/PetStoreDB" />
                <module-option name="userName">dba</module-option>
                <module-option name="password">sql</module-option>
                <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=jdbc/petstore/PetStoreDB</module-option>
                </login-module>

                </application-policy>
                <application-policy name="CloudscapeDbRealmSupplier">

                <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required">
                <module-option name="jdbc/supplier/SupplierDB" />
                <module-option name="userName">dba</module-option>
                <module-option name="password">sql</module-option>
                <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=jdbc/supplier/SupplierDB</module-option>
                </login-module>

                </application-policy>

                <application-policy name="CloudscapeDbRealmOPC">

                <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule" flag="required">
                <module-option name="jdbc/opc/OPCDB" />
                <module-option name="userName">dba</module-option>
                <module-option name="password">sql</module-option>
                <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=jdbc/opc/OPCDB</module-option>
                </login-module>

                </application-policy>

                Do you think it is OK?

                But I get strange errors like this:

                [EntityContainer] Starting
                16:30:46,622 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/local/opc/po/PurchaseOrder,service=EJB
                java.lang.NoSuchMethodError: c8e.dv.e.(Lc8e/dv/g;)V
                at c8e.dv.g.(Unknown Source)
                at c8e.cf.b.(Unknown Source)
                at c8e.cf.a.(Unknown Source)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
                at java.lang.Class.newInstance0(Class.java:308)
                at java.lang.Class.newInstance(Class.java:261)
                at COM.cloudscape.core.MonitorBoot.start(Unknown Source)
                at COM.cloudscape.core.JDBCBoot.boot(Unknown Source)
                at COM.cloudscape.core.JDBCDriver.boot(Unknown Source)
                at COM.cloudscape.core.JDBCDriver.(Unknown Source)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


                • 5. Re: how to configure cloudscape data source in JBOSS running
                  Adrian Brock Master

                  I'm not familiar with cloudscape but that
                  doesn't look correct.

                  1099 is where jboss's JNDI is bound.

                  Regards,
                  Adrian