1 2 Previous Next 24 Replies Latest reply: Feb 10, 2012 4:07 PM by Ramazan YILDIRIM RSS

    How to configure Oracle with my application in jboss 5.0

    Anand Kumar Novice

      Hi,

       

      I have a web application which is currently working good under Tomcat 5.5 along with Oracle as database to connect along with connection pooling but now i want to move this application to Jboss 5.0.

       

      So What should i have to configure again the same application in Jboss with oracle as database.

       

      When i am adding the database file to the server as oracel-ds.xml file it is giving the following errors

       

      16:40:40,890 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      vfsfile:/C:/jboss-5.0.0.GA/server/default/deploy/oracle-ds.xml -> java.lang.IllegalStateException: jboss.jca:service=OracleXAExceptionFormatter is already installed.
      
      vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/datanet.war -> org.xml.sax.SAXException: The document type declaration for root element type "web-app" must end with '>'. @ vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/datanet.war/WEB-INF/web.xml[7,19]
      
      
      16:40:40,906 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      16:40:40,937 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      

       

      I have gone through the sites and goolge but could not find any relavent information on it.

       

      1. What Should be the contents of jboss-web.xml file and where it should be stored in jboss server directory

       

      2. What Should be the contents of web.xml file and where it should be stored in jboss server directory

       

      3.What Should be the contents of context.xml file and where it should be stored in jboss server directory

       

      4.What Should be the contents of server.xml file and where it should be stored in jboss server directory

       

      5.how should the datasource be configured i.e oracelds.xml with the above files and where it should be stored in jboss server directory

       

       

       

       

       

      Please help me or give some pointers to solve my problem....

       

      Thanks in advance for help

       

        • 2. Re: How to configure Oracle with my application in jboss 5.0
          Anand Kumar Novice

          Thank you for your reply

           

          I have gone through that document and tried to install it but i have been facing problems :

           

          While install jboss i did not specify any Database for use and it took by default Hypersonic database and configured it.

           

          But now i want to configure Oracle database to Jboss. So i have created a file called Oracle-ds.xml as specified in the above document and try to start the server again but it did not start up and raised number of errors that are related to database oracle.

           

          Now i want to change this configuration from Hypersonic to Oracle database. So what are the files that i have to change in order to configure to Oracle?

           

          I have tried to modify the file hsqldb-ds.xml but it was of no use at all.

           

          here is error list that comes after modify

           

          12:27:53,093 INFO  [EjbModule] Deploying Timer
          12:27:53,109 WARN  [EjbModule] EJB configured to bypass security. Please verify if this is intended. Bean=Timer Deployment=vfsfile:/C:/jboss-5.0.0.GA/server/default/deploy/jbpm/jbpm-enterprise.jar/
          12:27:54,093 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:module="jbpm-enterprise.jar",service=EjbModule state=Create mode=Manual requiredState=Installed
          org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/JbpmDS was not deployed or type-mapping was not configured.
               at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1105)
               at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:427)
               at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:368)
               at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:172)
               at org.jboss.ejb.EjbModule.startService(EjbModule.java:495)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
               at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
               at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
               at $Proxy36.start(Unknown Source)
               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
               at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
               at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
               at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
               at org.jboss.system.ServiceController.start(ServiceController.java:460)
               at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
               at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
               at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
               at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
               at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
               at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
               at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
               at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
               at org.jboss.Main.boot(Main.java:209)
               at org.jboss.Main$1.run(Main.java:547)
               at java.lang.Thread.run(Unknown Source)
          12:27:54,093 INFO  [EjbModule] Undeployed Timer
          12:27:54,093 INFO  [EjbModule] Undeployed CommandReceiver
          12:27:54,093 INFO  [ProxyFactory] Unbind EJB Home 'CommandExecutor' from jndi 'jbpm/CommandExecutor'
          12:27:54,093 INFO  [EjbModule] Undeployed CommandExecutor
          12:27:54,109 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss-5.0.0.GA/server/default/deploy/jbpm/jbpm-enterprise.jar/ state=PreReal mode=Manual requiredState=Real
          org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/JbpmDS was not deployed or type-mapping was not configured.
               at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1105)
               at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:427)
               at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:368)
               at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:172)
               at org.jboss.ejb.EjbModule.startService(EjbModule.java:495)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
               at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
               at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
               at $Proxy36.start(Unknown Source)
               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
               at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
               at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
               at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
               at org.jboss.system.ServiceController.start(ServiceController.java:460)
               at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
               at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
               at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
               at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
               at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
               at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
               at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
               at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
               at org.jboss.Main.boot(Main.java:209)
               at org.jboss.Main$1.run(Main.java:547)
               at java.lang.Thread.run(Unknown Source)
          12:27:54,156 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
          
          *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
          
          jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
           -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}
          
          jboss.jca:name=JmsXA,service=ManagedConnectionFactory
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
          
          jboss.jca:name=JmsXA,service=ManagedConnectionPool
           -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}
          
          jboss.jca:name=JmsXA,service=TxCM
           -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}
          
          jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
           -> jboss.messaging:service=PostOffice{Create:Configured}
          
          jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
           -> jboss.messaging:service=PostOffice{Create:Configured}
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
          
          jboss.messaging.connectionfactory:service=ConnectionFactory
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
           -> jboss.messaging:service=PostOffice{Create:Configured}
          
          jboss.messaging.destination:name=DLQ,service=Queue
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
           -> jboss.messaging:service=PostOffice{Create:Configured}
          
          jboss.messaging.destination:name=ExpiryQueue,service=Queue
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
           -> jboss.messaging:service=PostOffice{Create:Configured}
          
          jboss.messaging:service=PostOffice
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
          
          jboss.mq.destination:name=JbpmCommandQueue,service=Queue
           -> jboss.mq:service=DestinationManager{Create:Configured}
          
          jboss.mq:service=DestinationManager
           -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
          
          
          *** CONTEXTS IN ERROR: Name -> Error
          
          jboss.messaging:service=ServerPeer -> java.lang.IllegalStateException: Failed to execute transaction | **ERROR**
          
          vfsfile:/C:/jboss-5.0.0.GA/server/default/deploy/jbpm/jbpm-oracle-ds.xml -> java.lang.IllegalStateException: jboss.jca:service=OracleXAExceptionFormatter is already installed.
          
          vfsfile:/C:/jboss-5.0.0.GA/server/default/deploy/jbpm/jbpm-enterprise.jar/ -> org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/JbpmDS was not deployed or type-mapping was not configured.
          
          jboss.ejb:service=EJB3TimerService -> org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
           [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
          ]]
          
          
          12:27:54,171 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
          12:27:54,203 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
          12:27:54,203 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 1m:30s:94ms
          
           
          

           

          Please provide me more help in this regard..

          • 3. Re: How to configure Oracle with my application in jboss 5.0
            jaikiran pai Master

            akstifr wrote:

             


             

            Now i want to change this configuration from Hypersonic to Oracle database. So what are the files that i have to change in order to configure to Oracle?

             

            Follow this http://community.jboss.org/wiki/UsingotherDatabases

            • 4. Re: How to configure Oracle with my application in jboss 5.0
              Anand Kumar Novice

              Thank you for your reply

               

              Even after doing that i am unable to connect to Oracle database. I have placed driver file i.e ojdbc14.jar file in lib folder of default configuration.

               

              It is giving the following errors:

               

              14:26:02,015 INFO  [ProxyFactory] Bound EJB Home 'CommandExecutor' to jndi 'jbpm/CommandExecutor'
              14:26:02,078 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'Timer' to jndi 'java:jbpm/Timer'
              14:26:02,078 WARN  [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@94d3fb(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@180babf destination=queue/JbpmCommandQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
              javax.naming.NameNotFoundException: queue not bound
                   at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
                   at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
                   at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
                   at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
                   at javax.naming.InitialContext.lookup(Unknown Source)
                   at org.jboss.util.naming.Util.lookup(Util.java:222)
                   at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
                   at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
                   at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
                   at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
                   at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
                   at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
                   at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
                   at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                   at java.lang.Thread.run(Unknown Source)
              14:26:02,140 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
              
              *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
              
              jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
               -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}
              
              jboss.jca:name=JmsXA,service=ManagedConnectionFactory
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
              
              jboss.jca:name=JmsXA,service=ManagedConnectionPool
               -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}
              
              jboss.jca:name=JmsXA,service=TxCM
               -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}
              
              jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
               -> jboss.messaging:service=PostOffice{Create:Configured}
              
              jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
               -> jboss.messaging:service=PostOffice{Create:Configured}
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
              
              jboss.messaging.connectionfactory:service=ConnectionFactory
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
               -> jboss.messaging:service=PostOffice{Create:Configured}
              
              jboss.messaging.destination:name=DLQ,service=Queue
               -> jboss.messaging:service=PostOffice{Create:Configured}
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
              
              jboss.messaging.destination:name=ExpiryQueue,service=Queue
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
               -> jboss.messaging:service=PostOffice{Create:Configured}
              
              jboss.messaging:service=PostOffice
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
              
              jboss.mq.destination:name=JbpmCommandQueue,service=Queue
               -> jboss.mq:service=DestinationManager{Create:Configured}
              
              jboss.mq:service=DestinationManager
               -> jboss.messaging:service=ServerPeer{Create:**ERROR**}
              
              
              *** CONTEXTS IN ERROR: Name -> Error
              
              jboss.messaging:service=ServerPeer -> java.lang.IllegalStateException: Failed to execute transaction | **ERROR**
              
              jboss.ejb:service=EJB3TimerService -> org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: ORA-00942: table or view does not exist
               [See nested exception: java.sql.SQLException: ORA-00942: table or view does not exist
              ]]
              
              
              14:26:02,140 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
              14:26:02,171 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
              14:26:02,171 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 1m:37s:328ms
              14:26:12,078 INFO  [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@94d3fb(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@180babf destination=queue/JbpmCommandQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
              14:26:12,078 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@94d3fb(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@180babf destination=queue/JbpmCommandQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
              

               

              still unable to connect it...

               

              Is it we necessary to create any predefined scheme before connecting as error seems to me like this table or view does not exit

               

              Help me in connecting to Oracle

              • 5. Re: How to configure Oracle with my application in jboss 5.0
                Peter Johnson Master

                First let me ask you this: do you want to completely replace Hypersonic with Oracle, or do you just want to use Oracle for your applications? (You do know that JBoss AS can run just fine using multiple databases, right?) Are you using messaging? If not, I would suggest leaving Hypersonic as it is and just adding an Oracle data source. In this case all you need to do is make sure that the <jndi-name> entry is not DefaultDS.

                 

                If you are using messaging and want messaging to use Oracle, then you should read:

                http://community.jboss.org/message/204473

                That post is about MySQL but the steps for Oracle are very similar. Pay particular attention to all of the files that were changed...

                 

                Other than messaging there are a few other services that use Hypersonic, but those usually don't require extra effort to switch. And the errors that you are getting show that your messaging configuration is not correct.

                • 6. Re: How to configure Oracle with my application in jboss 5.0
                  Anand Kumar Novice

                  Thank you once again

                   

                  I want to totally replace Hypersonic database with Oracle database because here we use only Oracle database.

                   

                  10:21:17,843 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'Timer' to jndi 'java:jbpm/Timer'
                  10:21:17,843 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
                  java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
                       at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
                       at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
                       at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
                       at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRoles
                  

                   

                   

                  Even after going through the above link and configure Oracle as said in that, but still i am unable to configure it and now it is giving error as same as it was stated in that link:

                   

                  10:21:17,906 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                  
                  *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
                  
                  jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
                   -> jboss.jca:name=JmsXA,service=TxCM{Create:Configured}
                  
                  jboss.jca:name=JmsXA,service=ManagedConnectionFactory
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                  
                  jboss.jca:name=JmsXA,service=ManagedConnectionPool
                   -> jboss.jca:name=JmsXA,service=ManagedConnectionFactory{Create:Configured}
                  
                  jboss.jca:name=JmsXA,service=TxCM
                   -> jboss.jca:name=JmsXA,service=ManagedConnectionPool{Create:Configured}
                  
                  jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                   -> jboss.messaging:service=PostOffice{Create:Configured}
                  
                  jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
                   -> jboss.messaging:service=PostOffice{Create:Configured}
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                  
                  jboss.messaging.connectionfactory:service=ConnectionFactory
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                   -> jboss.messaging:service=PostOffice{Create:Configured}
                  
                  jboss.messaging.destination:name=DLQ,service=Queue
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                   -> jboss.messaging:service=PostOffice{Create:Configured}
                  
                  jboss.messaging.destination:name=ExpiryQueue,service=Queue
                   -> jboss.messaging:service=PostOffice{Create:Configured}
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                  
                  jboss.messaging:service=PostOffice
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                  
                  jboss.messaging:service=ServerPeer
                   -> jboss.messaging:service=PersistenceManager{Create:**ERROR**}
                   -> jboss.messaging:service=JMSUserManager{Create:**ERROR**}
                  
                  jboss.mq.destination:name=JbpmCommandQueue,service=Queue
                   -> jboss.mq:service=DestinationManager{Create:Configured}
                  
                  jboss.mq:service=DestinationManager
                   -> jboss.messaging:service=ServerPeer{Create:Configured}
                  
                  
                  *** CONTEXTS IN ERROR: Name -> Error
                  
                  jboss.messaging:service=JMSUserManager -> **ERROR** | java.lang.SecurityException: Unauthenticated caller:null
                  
                  jboss.messaging:service=PersistenceManager -> **ERROR** | java.lang.SecurityException: Unauthenticated caller:null
                  
                  jboss:service=KeyGeneratorFactory,type=HiLo -> java.lang.SecurityException: Unauthenticated caller:null
                  
                  
                  10:21:17,921 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
                  10:21:17,984 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                  10:21:17,984 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 55s:453ms
                  10:21:27,859 INFO  [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7b682f(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@185cb87 destination=queue/JbpmCommandQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
                  10:21:27,859 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@7b682f(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@185cb87 destination=queue/JbpmCommandQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=30000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=10)
                  javax.naming.NameNotFoundException: queue not bound
                       at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
                       at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
                       at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
                       at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
                       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
                       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
                       at javax.naming.InitialContext.lookup(Unknown Source)
                       at org.jboss.util.naming.Util.lookup(Util.java:222)
                       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
                       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
                       at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
                       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
                       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
                       at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
                       at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
                       at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
                       at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                       at java.lang.Thread.run(Unknown Source)
                  
                   
                  

                   

                  What should i have to do now???

                  • 7. Re: How to configure Oracle with my application in jboss 5.0
                    Peter Johnson Master

                    You posted two things: #1 - an error stack trace and #2 - the deployment report (yes, after the deployment report there is another error tsack trace regarding looking up "queue", but we will ignore that for now.)

                     

                    First, I have no idea how you got the error statck trace (item #1). There is no file that need to be changed to convert from Hypersonic to Oracle that would result in such a message. This tells me that you changes more things than what need to be changed.

                     

                    Second, the deployment report (#2) rarely gives any clues as to why the deployment failed, only that it did. There should be excpetion stack traces (other than item #1) that appear earlier that will explain what happened.

                     

                    At this point, I would like for you to start from scratch. That is, get a clean install of JBoss AS. Make sure it runs without any issues. Then I want you to deploy your oracle-ds.xml file. Make sure that you change the <jndi-name> entry to be something other than DefaultDS. No NOT remove hsqldb-ds.xml - for now we will run with both databases. Then write a simple servlet that gets a database connection and performs some query. Deploy and run that servlet. If you run into errors, post the source code for the servlet, the orcale-ds.xml file and any stack traces that show up in the console log. (Make sure that you have a suffiently large buffer in your Command Prompt - I set mine to 9000 lines. You don;t want any lines scrolling off of the buffer.)

                     

                    If all of that works, let me know and we will then attempt to replace Hypersonic with Oracle.

                     

                    Oh, and answer this question: will you be using messaging?

                    • 8. Re: How to configure Oracle with my application in jboss 5.0
                      Anand Kumar Novice

                      Thank you once again for your reply

                       

                      As you told, i have started from the scratch and installed jboss 5.0 again on the system and created a file called Oracle-ds.xml and placed in the deploy folder.

                       

                      I have created Oracle-ds.xml from http://community.jboss.org/wiki/SetUpAOracleDataSource using Local-TX syntax and started Jboss server.

                       

                      It worked fine and i was able to see that Oracle has been incoperted in Jboss by using jboss.jdbc in the jmx-console.

                       

                      But the problem came now that i was unable to run my application in Jboss 5.0 and it was giving errors like in the console window when i am running the application which has a login form as it startup:

                       

                      11:59:37,718 INFO  [ProxyFactory] Bound EJB Home 'CommandExecutor' to jndi 'jbpm/CommandExecutor'
                      11:59:37,750 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'Timer' to jndi 'java:jbpm/Timer'
                      11:59:37,812 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
                      11:59:37,828 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                      11:59:37,843 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 1m:47s:656ms
                      11:59:43,437 INFO  [BirtService] Service created: org.eclipse.birt.report.engine.api.impl.ReportEngine@1725c61
                      12:00:35,281 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
                      java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
                           at org.jboss.security.auth.spi.Util.loadProperties(Util.java:198)
                           at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
                           at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
                           at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
                           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                           at java.lang.reflect.Method.invoke(Unknown Source)
                           at javax.security.auth.login.LoginContext.invoke(Unknown Source)
                           at javax.security.auth.login.LoginContext.access$000(Unknown Source)
                           at javax.security.auth.login.LoginContext$4.run(Unknown Source)
                           at java.security.AccessController.doPrivileged(Native Method)
                           at javax.security.auth.login.LoginContext.invokePriv(Unknown Source)
                           at javax.security.auth.login.LoginContext.login(Unknown Source)
                           at org.jboss.security.plugins.auth.JaasSecurityManagerBase.defaultLogin(JaasSecurityManagerBase.java:552)
                           at org.jboss.security.plugins.auth.JaasSecurityManagerBase.authenticate(JaasSecurityManagerBase.java:486)
                           at org.jboss.security.plugins.auth.JaasSecurityManagerBase.isValid(JaasSecurityManagerBase.java:365)
                           at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:160)
                           at org.jboss.web.tomcat.security.JBossWebRealm.authenticate(JBossWebRealm.java:384)
                           at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:258)
                           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:417)
                           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
                           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
                           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                           at java.lang.Thread.run(Unknown Source)
                      12:00:35,343 INFO  [STDOUT] null
                      12:00:35,343 INFO  [STDOUT] java.lang.RuntimeException: Unable to aquire data source
                      
                       
                      

                       

                      it states that it is Unable to acquire data source from oracle which my application uses it.

                       

                      I will be using the messaging along with mail configuration also.

                       

                      Is there any predefined Database Schema, by which we can only access the database or any other format ??

                       

                      Is it compulsory to define jboss-web.xml ? as my application does not have it but it has web.xml file .

                       

                      If yes, then what should be its contents as i am using HTTP security for login form??

                       

                      I have gone through this link which was little useful but i am confused to use or not to use and where from this properties files will comes??

                       

                      http://www.coderanch.com/t/90486/JBoss/Failed-load-users-passwords-role

                       

                      Even after adding jboss-web.xml with the contents as

                       

                      <?xml version="1.0" encoding="ISO-8859-1"?>
                       
                      <jboss-web>
                         
                           <security-domain>datanet</security-domain>
                      
                      </jboss-web>
                      
                       
                      

                       

                      and in the login-config.xml ---- what should  i have to add in it as my roles and usernames are in database ??

                       

                      Can i use Oracle Realm in place of Application policy?? how to use it if yes in login-config.xml??

                       

                      Now what should i have to do ??

                      • 9. Re: How to configure Oracle with my application in jboss 5.0
                        Peter Johnson Master

                        Wow, this seems to be going off in 100 different directions at once.

                         

                        If you go back and read my prior post, I asked you to develop and deploy a simple servlet that accesses the database. It appears that you deployed your application. Please, let's work on one problem at a time. You stated that your database contains the login credentials, so let's get the database set up first. OK?

                         

                        First, just because there were no errors with deploying orcacle-ds.xml and it showed up in the jmx console does not mean that the database is configured correctly. JBoss AS will not open any connections to the database until some code accesses it. Thus my request for a simple servlet that does just that. So I ask once again that you write a simple servlet to access the database and deploy and run that servlet. Do NOT deploy your application!

                        • 10. Re: How to configure Oracle with my application in jboss 5.0
                          Anand Kumar Novice

                          Thank you once again for your reply

                           

                          As you said, developed a test jsp to access the database and it is working fine.

                           

                          code for test.jsp is given here

                           

                          <%@page contentType="text/html"
                           import="java.util.*,javax.naming.*,javax.sql.DataSource,java.sql.*"
                           %>
                           <%
                           
                           DataSource ds = null;
                           Connection con = null;
                           PreparedStatement pr = null;
                           InitialContext ic;
                           try {
                           ic = new InitialContext();
                           ds = (DataSource)ic.lookup( "java:OracleDS" );
                           con = ds.getConnection();
                           pr = con.prepareStatement("select role_name from roles");
                           ResultSet rs = pr.executeQuery();
                           out.println("Loading the data from Database.........");
                           while (rs.next()) {
                           out.println("<br> " +rs.getString("role_name") );
                           }
                           out.println("Closing the data from Database.........");
                           rs.close();
                           pr.close();
                           }catch(Exception e){
                           out.println("Exception thrown " +e);
                           }finally{
                           if(con != null){
                           con.close();
                           }
                          } %>
                          
                          

                           

                          But still my application is unable  to make the connection to the database...

                           

                          Now what shall i do to make it run??

                          • 11. Re: How to configure Oracle with my application in jboss 5.0
                            Peter Johnson Master

                            Good, now that you know your database connections are correct, let's work on your application.

                             

                            I believe you application is a WAR, is that correct? Could you post the contents of the WAR? If it is an archive, use "jar -tf  datanet.war". If it is an exploded directory, use "dir datanet.war /s /b". Post the results.

                             

                            Post the the full contents of the jboss-web.xml file. Post the web.xml file, all of it is it is not too long, or just the security sections and the <resource-ref> sections if it is long or if you do not want to post all of it.

                             

                            If you modified any of the JBoss AS configuration files, post the changes that you made (not the whole file, just the changes).

                            • 12. Re: How to configure Oracle with my application in jboss 5.0
                              Anand Kumar Novice

                              Thank you once again for your reply

                               

                              I am using WAR file. The contents of jboss-web.xml is

                               

                              <?xml version="1.0" encoding="ISO-8859-1"?>
                               
                              <jboss-web>
                                 
                                   <security-domain>java:/jaas/datanet</security-domain>
                              
                              </jboss-web>
                              
                               
                              

                               

                              and the contents of web.xml is:

                               

                              <?xml version="1.0" encoding="ISO-8859-1"?>
                              <web-app xmlns="http://java.sun.com/xml/ns/javaee"
                                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                 xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                                 version="2.5">
                                   <security-constraint>
                                        <display-name>Security Constraint</display-name>
                                             <web-resource-collection>
                                                  <web-resource-name>Datanet Protected Area</web-resource-name>
                                                  <url-pattern>/personal/*</url-pattern>
                                                  .......
                                                              .......
                                                              .......
                                                              .......
                                                              <url-pattern>/index.jsp</url-pattern>
                                                               <http-method>GET</http-method>
                                                  <http-method>POST</http-method>           
                                             </web-resource-collection>
                                             <auth-constraint>
                                                  <role-name>member</role-name>
                                                <role-name>admin</role-name>
                                                  <role-name>nsfmember</role-name>          
                                             </auth-constraint>
                                             <user-data-constraint><transport-guarantee>NONE</transport-guarantee></user-data-constraint>
                                   </security-constraint>
                              
                                   
                                   <login-config>
                                        <auth-method>FORM</auth-method>
                                             <realm-name>datanet</realm-name>
                                                  <form-login-config>
                                                       <form-login-page>/login.jsp</form-login-page>
                                                     <form-error-page>/error.jsp</form-error-page>
                                                  </form-login-config>
                                   </login-config>
                              
                                   
                                   
                                   <security-role>
                                        <role-name>member</role-name>
                                   </security-role>
                                   ...............
                                        .............
                                        .............
                                        .............
                                        .............
                                        .............
                                   <security-role>
                                        <role-name>nsfmember</role-name>          
                                   </security-role>
                              
                               
                              

                               

                              There are some more security-constraint also.

                               

                              In the login-config.xml which is present in /default/config, add the following application policy

                               

                              <application-policy name="datanet">
                                  <authentication>
                                    <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
                                      flag="required">
                                      <module-option name="connectionURL">jdbc:oracle:thin:@158.144.71.242:1521:dbatest</module-option>
                                   ............
                                        ..........
                                        ..........
                                      <module-option name="userTable">wb_login</module-option>
                                      <module-option name="userNameCol">username</module-option>
                                   <module-option name="userRoleTable">user_roles</module-option>
                                      <module-option name="roleNameCol">role_name</module-option>
                                    </login-module>
                                  </authentication>
                                </application-policy>
                              

                               

                              but still unable to connect it.....

                               

                              Now what i have to do ????

                              • 13. Re: How to configure Oracle with my application in jboss 5.0
                                Peter Johnson Master

                                Where did you get these from:

                                 

                                <module-option name="userTable">wb_login</module-option>
                                        <module-option name="userNameCol">username</module-option>
                                     <module-option name="userRoleTable">user_roles</module-option>
                                        <module-option name="roleNameCol">role_name</module-option>

                                 

                                There are no such properties for the DatabaseServerLoginModule class. You need to use principalsQuery and rolesQuery. See this:

                                http://community.jboss.org/wiki/DatabaseServerLoginModule

                                • 14. Re: How to configure Oracle with my application in jboss 5.0
                                  Anand Kumar Novice

                                  Thank you once again for your reply

                                   

                                  Even after changing the entries in the application policy in the file login-config.xml, still i am unable to connect to the database and

                                   

                                  contents of that file after changing are:

                                   

                                  <application-policy name="datanet">
                                      <authentication>
                                        <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
                                          flag="required">
                                            <module-option name = "dsJndiName">java:/OracleDS</module-option>
                                            <module-option name = "principalsQuery">SELECT PASSWD FROM WB_LOGIN WHERE USERNAME=?</module-option>
                                          <module-option name = "rolesQuery">SELECT ROLE_NAME, 'Roles' FROM USER_ROLES WHERE USERNAME=?</module-option>
                                        </login-module>
                                      </authentication>
                                    </application-policy>
                                  

                                   

                                  It is give the same old error as i stated previously:

                                   

                                  10:10:54,234 INFO  [STDOUT] java.lang.RuntimeException: Unable to aquire data source

                                  10:10:54,234 INFO  [STDOUT] Setting details for the user is::nihita

                                  10:10:54,234 INFO  [STDOUT] null

                                  10:10:54,234 INFO  [STDOUT] null

                                   

                                  Now still what i have to do to connect it and run the application??

                                  1 2 Previous Next