2 Replies Latest reply on Feb 16, 2004 6:27 AM by mandarjboss

    Datasource in JBoss3.2

    mandarjboss

      Here is a whole problem.
      I am trying to create a datasource in JBoss for PostgreSQL.
      According to standard procedure these are the following steps.

      1. Copy JBoss_Home/docs/examples/jca/Postgreds.xml to your deployment directory(i.e HOME/server/default/deploy)

      2.Customize the ".xml" file as per your configuration.


      <local-tx-datasource>
      <jndi-name>PostgresDS</jndi-name>
      <connection-url>jdbc:postgresql://19.2.168.100.18:5432/xyz</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>xyz</user-name>
      xyz
      </local-tx-datasource>

      3. Make correesponding changes in
      "D:\jboss\server\default\conf\standardjbosscmp-jdbc.xml"


      java:/PostgresDS
      <datasource-mapping>PostgreSQL</datasource-mapping>
      .........

      and that's it! You have successfully configured the datasource.

      Now the problem is..there is one more file called
      "Postgres-jdbc2-service.xml"
      The server is also searching this file only,,,,,,,,,,,,
      whenever we are trying to lookup datasource.Can't understand what the
      problem is!


        • 1. Re: Datasource in JBoss3.2
          jashwin

          In fact its your persistence manager that is searching for this file. So, what you can do;
          Drop the postgres-jdbc2-service.xml found in the docs\examples\jms into the deploy\jms directory, you may have to delete hsqldb-jdbc2-service.xml or simply rename the following line; if need be, i cant remember well.
          <depends optional-attribute-name="ConnectionManager">jboss.jca:service=LocalTxCM,name=DefaultDS

          Also, i noticed that there might be an error in your connection url: '192.'

          • 2. Re: Datasource in JBoss3.2
            mandarjboss

            Hi JAshwin
            Thanx for replying but it is not working .Also there is no problem with database url.It is only a typing mistake,Actually it is 192.168.100.18.
            I followed the steps u have dictated but now it is giving me the fdollowing error.

            .....default/deploy/QuestionBankApp.ear
            17:50:19,596 INFO [EjbModule] Creating
            17:50:19,606 INFO [EjbModule] Deploying QuestionBean
            17:50:19,766 INFO [EjbModule] Deploying ChoiceBean
            17:50:19,786 INFO [EntityContainer] Creating
            17:50:19,806 INFO [EntityInstancePool] Creating
            17:50:19,806 INFO [EntityInstancePool] Created
            17:50:19,826 INFO [EntityContainer] Created
            17:50:19,836 INFO [EntityContainer] Creating
            17:50:19,836 INFO [EntityInstancePool] Creating
            17:50:19,836 INFO [EntityInstancePool] Created
            17:50:19,846 INFO [EntityContainer] Created
            17:50:19,846 INFO [EjbModule] Created
            17:50:19,846 INFO [EjbModule] Starting
            17:50:19,856 INFO [EntityContainer] Starting
            17:50:21,228 INFO [EntityInstancePool] Starting
            17:50:21,228 INFO [EntityInstancePool] Started
            17:50:21,228 INFO [EntityContainer] Started
            17:50:21,228 INFO [EntityContainer] Starting
            17:50:22,199 INFO [EntityInstancePool] Starting
            17:50:22,199 INFO [EntityInstancePool] Started
            17:50:22,199 INFO [EntityContainer] Started
            17:50:22,199 INFO [EjbModule] Started
            17:50:22,199 INFO [EJBDeployer] Deployed: file:/D:/jboss/server/default/tmp/dep
            loy/tmp60099QuestionBankApp.ear-contents/QuestionEJB.jar
            17:50:22,390 INFO [EmbeddedTomcatService] deploy, ctxPath=/QuestionBank, warUrl
            =file:/D:/jboss/server/default/tmp/deploy/tmp60099QuestionBankApp.ear-contents/Q
            uestionWEB.war/
            17:50:22,420 INFO [EmbeddedTomcatService] ClusteredHTTPSessionService not found

            17:50:22,420 ERROR [EmbeddedTomcatService] Failed to setup clustering, clusterin
            g disabled
            17:50:22,700 INFO [Engine] ContextConfig[/QuestionBank]: Added certificates ->
            request attribute Valve
            17:50:22,750 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
            loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@148bd9d
            17:50:22,750 INFO [Engine] StandardManager[/QuestionBank]: Seeding random numbe
            r generator class java.security.SecureRandom
            17:50:22,750 INFO [Engine] StandardManager[/QuestionBank]: Seeding of random nu
            mber generator has been completed
            17:50:22,770 INFO [Engine] StandardWrapper[/QuestionBank:default]: Loading cont
            ainer servlet default
            17:50:22,770 INFO [Engine] StandardWrapper[/QuestionBank:invoker]: Loading cont
            ainer servlet invoker
            17:50:23,121 INFO [EARDeployer] Started J2EE application: file:/D:/jboss/server
            /default/deploy/QuestionBankApp.ear
            17:50:23,121 INFO [MainDeployer] Deployed package: file:/D:/jboss/server/defaul
            t/deploy/QuestionBankApp.ear
            17:50:23,121 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:
            [org.jboss.deployment.DeploymentInfo@43f3cfff { url=file:/D:/jboss/server/defaul
            t/deploy/postgres-jdbc2-service.xml }
            deployer: org.jboss.deployment.SARDeployer@12a0f6c
            status: Deployment FAILED reason: create operation failed for package file:/D:
            /jboss/server/default/deploy/postgres-jdbc2-service.xml; - nested throwable: (or
            g.jboss.deployment.DeploymentException: Trying to install an already registered
            mbean: jboss.mq:service=DestinationManager)
            state: FAILED
            watch: file:/D:/jboss/server/default/deploy/postgres-jdbc2-service.xml
            lastDeployed: 1076934012576
            lastModified: 1076934014000
            mbeans:
            ]MBeans waiting for classes:

            MBeans waiting for other MBeans:


            17:50:23,141 INFO [URLDeploymentScanner] Started
            17:50:23,231 INFO [MainDeployer] Deployed package: file:/D:/jboss/server/defaul
            t/conf/jboss-service.xml
            17:50:23,241 INFO [Server] JBoss (MX MicroKernel) [3.2.2RC3 (build: CVSTag=JBos
            s_3_2_2_RC3 date=200308241317)] Started in 38s:485ms