4 Replies Latest reply on Aug 24, 2009 6:04 AM by stanley1610

    JBoss DataSources Down

      I have a Local Tx Datasource for PostgreSQL. When I deployed the EJB with PU, the Datasource is registered but the status is down.

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
       <persistence-unit name="DukeBankEjbPU" transaction-type="JTA">
       <jta-data-source>java:/DukeBankPostgreSQL</jta-data-source>
       <exclude-unlisted-classes>false</exclude-unlisted-classes>
       </persistence-unit>
      </persistence>
      persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <datasources>
       <local-tx-datasource>
       <jndi-name>DukeBankPostgreSQL</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/dukebank</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>postgres</user-name>
       <password>password</password>
       <min-pool-size>5</min-pool-size>
       <max-pool-size>20</max-pool-size>
       <idle-timeout-minutes>5</idle-timeout-minutes>
       </local-tx-datasource>
      </datasources>
      jboss-ds.xml

      Please help. Thanks.

        • 1. Re: JBoss DataSources Down
          jaikiran

           

          the Datasource is registered but the status is down.


          Which exact version of JBoss AS? How do you deploy the application and the datasource? And where are you seeing the "status"?

          • 2. Re: JBoss DataSources Down

            Version: 5.1.0.GA

            I saw the status at
            JBossAS Servers : JBoss AS 5 (default) : Resources : Datasources : Summary

            the Persistence was automatically deployed to Datasource when I deployed my EJB 3.0. The EJB is up while the Persistence is down.

            The files persistence.xml and jboss-ds.xml locate at the JAR\META-INF.

            • 3. Re: JBoss DataSources Down
              peterj

              Took me a bit of doing to get the status to say down, but it appears that what it means is that an app attempted to get a database connection but the connection failed. So either the connection URL or user/password are incorrect. There should be an exception in the log that tells you what went wrong.

              • 4. Re: JBoss DataSources Down

                I double checked the username and the password. All are correct.

                I deleted the jboss-ds.xml and manually created the Datasource in JBoss Web Admin Console. It is UP~.

                It sounded great but the nightmare hasn't ended. When I deployed the WAR file, it showed the context DukeBankWeb DOWN.

                The log:

                java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                
                *** DEPLOYMENTS IN ERROR: Name -> Error
                
                vfszip:/C:/jboss/server/default/deploy/DukeBankWeb.war/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: persistence.unit:unitName=#DukeBankEjbPU
                
                
                DEPLOYMENTS IN ERROR:
                 Deployment "vfszip:/C:/jboss/server/default/deploy/DukeBankWeb.war/" is in error due to the following reason(s): java.lang.IllegalStateException: persistence.unit:unitName=#DukeBankEjbPU is already installed.
                
                 at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:313)
                 at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:190)
                 at org.jboss.profileservice.management.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:231)
                 at org.jboss.profileservice.management.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:88)
                 at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:120)
                 at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.java:181)
                 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:597)
                 at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:482)
                 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                 at java.lang.Thread.run(Thread.java:619)
                Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                
                *** DEPLOYMENTS IN ERROR: Name -> Error
                
                vfszip:/C:/jboss/server/default/deploy/DukeBankWeb.war/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: persistence.unit:unitName=#DukeBankEjbPU
                
                
                DEPLOYMENTS IN ERROR:
                 Deployment "vfszip:/C:/jboss/server/default/deploy/DukeBankWeb.war/" is in error due to the following reason(s): java.lang.IllegalStateException: persistence.unit:unitName=#DukeBankEjbPU is already installed.
                
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
                 at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
                 at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
                 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
                 at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:265)
                 at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:177)
                 at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
                 at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
                 at org.jboss.remoting.Client.invoke(Client.java:1724)
                 at org.jboss.remoting.Client.invoke(Client.java:629)
                 at org.jboss.profileservice.management.upload.remoting.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:305)
                 ... 15 more
                


                What is my problem? How can I solve it?