5 Replies Latest reply on Jul 31, 2003 4:32 AM by Bernd Zeitler

    connection configuration for jboss-3.0.6

    VS Mohan Rao undapalli Newbie

      Hi all,

      I am using jboss-3.0.6, I want to make a conection for oracle8i. please suggest me what steps should be follow...

      please reply this soon

      Regards,
      Mohan Rao

        • 1. Re: connection configuration for jboss-3.0.6
          Bernd Zeitler Expert

          Deploy a configuration file for your datasource. JBoss comes with example configurations, use oracle-ds.xml for your datasource and change the properties to fit your needs.
          Edit the XidFactory configuration to "Pad=true".
          When the datasource is deployed properly, you can do a JNDI lookup in your code and retrieve a connection from the datasource instance.

          Greetings,
          Frito

          • 2. Re: connection configuration for jboss-3.0.6
            VS Mohan Rao undapalli Newbie

            hello,
            Thanks for ur suggestion. but I am getting following error will u tell wat could be the reason...

            2003-07-31 11:17:20,342 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.0.6/server/default/deploy/user-service.xml
            2003-07-31 11:17:20,362 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.0.6/server/default/deploy/user-service.xml
            2003-07-31 11:17:20,372 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.0.6/server/default/deploy/jboss-local-jdbc.rar
            2003-07-31 11:17:20,523 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.0.6/server/default/deploy/jboss-local-jdbc.rar
            2003-07-31 11:17:20,533 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.0.6/server/default/deploy/jboss-xa.rar
            2003-07-31 11:17:20,573 INFO [org.jboss.resource.RARMetaData] Loading Minerva Resource Adapter for JDBC 2 XA drivers
            2003-07-31 11:17:20,583 INFO [org.jboss.resource.RARMetaData] Required license terms present. See deployment descriptor.
            2003-07-31 11:17:20,613 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Creating
            2003-07-31 11:17:20,673 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Created
            2003-07-31 11:17:20,683 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Starting
            2003-07-31 11:17:20,713 ERROR [org.jboss.resource.connectionmanager.XATxConnectionManager] Starting failed
            org.jboss.deployment.DeploymentException: expected one config-property-value tag
            at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:101)
            at org.jboss.resource.connectionmanager.RARDeployment.setMcfProperties(RARDeployment.java:787)
            at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnectionFactory(RARDeployment.java:560)
            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:517)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.startService(BaseConnectionManager2.java:382)
            at org.jboss.resource.connectionmanager.XATxConnectionManager.startService(XATxConnectionManager.java:162)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
            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:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
            at $Proxy4.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy9.start(Unknown Source)
            at org.jboss.resource.RARDeployer.start(RARDeployer.java:212)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
            at sun.reflect.GeneratedMethodAccessor10.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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy3.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
            at sun.reflect.GeneratedMethodAccessor4.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:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy2.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
            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:517)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
            at org.jboss.Main.boot(Main.java:148)
            at org.jboss.Main$1.run(Main.java:381)
            at java.lang.Thread.run(Thread.java:534)
            2003-07-31 11:17:20,753 WARN [org.jboss.system.ServiceController] Problem starting service jboss.jca:service=XATxCM,name=XAOracleDS
            org.jboss.deployment.DeploymentException: expected one config-property-value tag
            at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:101)
            at org.jboss.resource.connectionmanager.RARDeployment.setMcfProperties(RARDeployment.java:787)
            at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnectionFactory(RARDeployment.java:560)
            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:517)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.startService(BaseConnectionManager2.java:382)
            at org.jboss.resource.connectionmanager.XATxConnectionManager.startService(XATxConnectionManager.java:162)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
            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:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
            at $Proxy4.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            at org.jboss.system.ServiceController.start(ServiceController.java:433)
            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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy9.start(Unknown Source)
            at org.jboss.resource.RARDeployer.start(RARDeployer.java:212)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
            at sun.reflect.GeneratedMethodAccessor10.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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy3.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
            at sun.reflect.GeneratedMethodAccessor4.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:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:413)
            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:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy2.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
            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:517)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
            at org.jboss.Main.boot(Main.java:148)
            at org.jboss.Main$1.run(Main.java:381)
            at java.lang.Thread.run(Thread.java:534)
            2003-07-31 11:17:20,773 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.0.6/server/default/deploy/jboss-xa.rar
            2003-07-31 11:17:20,783 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.0.6/server/default/deploy/jms-ra.rar
            2003-07-31 11:17:20,863 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Creating
            2003-07-31 11:17:20,873 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Created
            2003-07-31 11:17:20,893 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Starting
            2003-07-31 11:17:20,923 INFO [org.jboss.security.plugins.JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@996cca
            2003-07-31 11:17:20,933 INFO [org.jboss.security.plugins.JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@b57e9a
            2003-07-31 11:17:20,943 INFO [org.jboss.security.plugins.JaasSecurityManagerService] Added JmsXARealm, org.jboss.security.plugins.SecurityDomainContext@18adae2 to map
            2003-07-31 11:17:21,053 INFO [org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.JmsXA] Bound connection factory for resource adapter 'JMS Adapter' to JNDI name 'java:/JmsXA'
            2003-07-31 11:17:21,053 INFO [org.jboss.resource.connectionmanager.XATxConnectionManager] Started
            2003-07-31 11:17:21,053 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/D:/jboss-3.0.6/server/default/deploy/jms-ra.rar
            2003-07-31 11:17:21,053 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.0.6/server/default/deploy/ejb-management.jar
            2003-07-31 11:17:22,035 INFO [org.jboss.ejb.EjbModule] Creating
            2003-07-31 11:17:22,075 INFO [org.jboss.ejb.EjbModule] Deploying MEJB
            2003-07-31 11:17:22,375 INFO [org.jboss.ejb.EjbModule] Created

            • 3. Re: connection configuration for jboss-3.0.6
              Bernd Zeitler Expert

              > Problem starting service jboss.jca:service=XATxCM,name=XAOracleDS
              > org.jboss.deployment.DeploymentException: expected one config-property-value tag

              Probably your -ds.xml describing your XAOracleDS is malformed. Check it yourself or attach it here. Did you use the xa-datasource-property with name "URL", "User" and "Password" ?

              Greetings,
              Frito

              • 4. Re: connection configuration for jboss-3.0.6
                VS Mohan Rao undapalli Newbie

                Thanks man.

                I have successfuly deployed all the beans but I am getting problem when use lookup method. I was written like ...
                public static void main(String[] args)
                {
                try{
                System.out.println("Hello World!");
                System.setProperty("java.naming.factory.initial",
                "org.jnp.interfaces.NamingContextFactory");
                System.setProperty("java.naming.provider.url", "wks33:1099");
                Context ctx = new InitialContext();

                System.out.println("got Initial Context");

                Object objref = ctx.lookup("eb/UserSession");
                System.out.println("Got Object");
                // UserSessionHome home = (UserSessionHome) PortableRemoteObject.narrow(objref, UserSessionHome.class);

                }catch(Exception e) { e.printStackTrace(); }
                }

                following exception getting..


                E:\javaExe>java ClientDemo
                Hello World!
                got Initial Context
                javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalExcepti
                on: error unmarshalling return; nested exception is:
                java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair
                (no security manager: RMI class loader disabled)]
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:462)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
                at javax.naming.InitialContext.lookup(Unknown Source)
                at ClientDemo.main(clientDemo.java:26)
                Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested excep
                tion is:
                java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValuePair
                (no security manager: RMI class loader disabled)
                at sun.rmi.server.UnicastRef.invoke(Unknown Source)
                at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
                ... 3 more
                Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.MarshalledValueP
                air (no security manager: RMI class loader disabled)
                at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
                at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
                at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
                at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
                at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
                at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
                at java.io.ObjectInputStream.readClassDesc(Unknown Source)
                at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
                at java.io.ObjectInputStream.readObject0(Unknown Source)
                at java.io.ObjectInputStream.readObject(Unknown Source)
                at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
                ... 6 more

                • 5. Re: connection configuration for jboss-3.0.6
                  Bernd Zeitler Expert

                  Include the jbossall-client.jar in your clients classpath.

                  Greetings,
                  Frito