6 Replies Latest reply on Aug 21, 2012 2:31 PM by wdfink

    Datasource is not started - how do you start it?

    pugsherpa

      Using Jboss 7.1.1.Final

       

      {code}

      ....

      INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool --- 29) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.driver.OracleDriver (version 10.2)

      ....

      INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775 New missing/unsatisfied dependencies:
           service jboss.cached-connection-manager (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.connector.config (missing) dependents: [service jboss.raactivator.hornetq-ra]
           service jboss.connector.transactionintegration (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.ironjacamar.connection-validator (missing) dependents: [service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.ironjacamar.idle-remover (missing) dependents: [service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.ironjacamar.mdr (missing) dependents: [service jboss.raactivator.hornetq-ra]
           service jboss.jdbc-driver.registry (missing) dependents: [service jboss.jdbc-driver.oracle, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.management_repository (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]
           service jboss.raregistry (missing) dependents: [service jboss.raactivator.hornetq-ra]
           service jboss.rarepository (missing) dependents: [service jboss.ejb.utilities, service jboss.raactivator.hornetq-ra]

      INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-ear-4.8.0-SNAPSHOT.ear"INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-webapp-4.8.0-SNAPSHOT-pki.war"

      INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-webapp-4.8.0-SNAPSHOT-nonpki.war"

      INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-rest-webapp-4.8.0-SNAPSHOT.war"

      INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-ejb-4.8.0-SNAPSHOT.jar"

      INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for persistenceUnit

      INFO [fishstore.view.Bootstrap] (MSC service thread 1-6) Loading app config.....

      INFO [fishstore.view.Bootstrap] (MSC service thread 1-7) Loading app config.....

      INFO [fishstore.view.Bootstrap] (MSC service thread 1-7) Could not load app config!: javax.naming.NameNotFoundException: Error looking up fishstore/LoginDataSource, service service jboss.naming.context.java.jboss.fishstore.LoginDataSource is not started

           at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:126)

           at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)

           at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)

           at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:123)

           at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)

           at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_27]

           at fishstore.view.Bootstrap.loadAppConfig(Bootstrap.java:96) [fishstore-classes-4.8.0-SNAPSHOT.jar]

           at fishstore.view.Bootstrap.contextInitialized(Bootstrap.java:80) [fishstore-classes-4.8.0-SNAPSHOT.jar]

           at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

           at org.apache.catalina.core.StandardContext.start(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

           at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar]

      .....

       

      {code}

       

      If I take the ear out of the deployment directory, I can get to the web console.

      But in the console, I see the datasource, I can click the "Test Connection" button and it says it executes successfully.  It says that it is enabled (well, there is a check in that column, so I assume that means it is enabled).

       

      What does this mean - not started?  How do I start it?

       

      Here is the relevant portion of the standalone.xml:

       

      {code:xml}
      <datasources>
           <datasource jndi-name="java:jboss/fishstore/LoginDataSource" pool-name="LoginDataSource" enabled="true" use-java-context="true">
                <connection-url>valid connection url</connection-url>
                <driver>oracle</driver>
                <security>
                     <user-name>user</user-name>
                     <password>pw</password>
                </security>
           </datasource>
           <datasource jndi-name="java:jboss/fishstore/fishstoreDataSource" pool-name="fishstoreDataSource" enabled="true" use-java-context="true">
                <connection-url>valid connection url</connection-url>
                <driver>oracle</driver>
                <security>
                     <user-name>user</user-name>
                     <password>pw</password>
                </security>
           </datasource>
           <drivers>
                <driver name="oracle" module="com.oracle.jdbc14">
                     <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                </driver>
           </drivers>
      </datasources>

      {code}

        • 1. Re: Datasource is not started - how do you start it?
          pugsherpa

          Sorry for the bad copy-paste - it won't let me edit so here are the relevant sections again:

           

          server.log:

           

          {code}

          ....

          INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool --- 29) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.driver.OracleDriver (version 10.2)

          ....

          INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

          JBAS014775 New missing/unsatisfied dependencies:    

               service jboss.cached-connection-manager (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.connector.config (missing) dependents: [service jboss.raactivator.hornetq-ra]    

               service jboss.connector.transactionintegration (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.ironjacamar.connection-validator (missing) dependents: [service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.ironjacamar.idle-remover (missing) dependents: [service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.ironjacamar.mdr (missing) dependents: [service jboss.raactivator.hornetq-ra]    

               service jboss.jdbc-driver.registry (missing) dependents: [service jboss.jdbc-driver.oracle, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.management_repository (missing) dependents: [service jboss.raactivator.hornetq-ra, service jboss.data-source.java:jboss/fishstore/fishstoreDataSource, service jboss.data-source.java:jboss/fishstore/LoginDataSource]    

               service jboss.raregistry (missing) dependents: [service jboss.raactivator.hornetq-ra]    

               service jboss.rarepository (missing) dependents: [service jboss.ejb.utilities, service jboss.raactivator.hornetq-ra]

          INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-ear-4.8.0-SNAPSHOT.ear"INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-webapp-4.8.0-SNAPSHOT-pki.war"

          INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-webapp-4.8.0-SNAPSHOT-nonpki.war"

          INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-rest-webapp-4.8.0-SNAPSHOT.war"

          INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "fishstore-ejb-4.8.0-SNAPSHOT.jar"

          INFO [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011401: Read persistence.xml for persistenceUnit

          INFO [fishstore.view.Bootstrap] (MSC service thread 1-6) Loading app config.....

          INFO [fishstore.view.Bootstrap] (MSC service thread 1-7) Loading app config.....

          INFO [fishstore.view.Bootstrap] (MSC service thread 1-7) Could not load app config!: javax.naming.NameNotFoundException: Error looking up fishstore/LoginDataSource, service service jboss.naming.context.java.jboss.fishstore.LoginDataSource is not started

               at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:126)

               at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)

               at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178)

               at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:123)

               at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)

               at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_27]

               at fishstore.view.Bootstrap.loadAppConfig(Bootstrap.java:96) [fishstore-classes-4.8.0-SNAPSHOT.jar]

               at fishstore.view.Bootstrap.contextInitialized(Bootstrap.java:80) [fishstore-classes-4.8.0-SNAPSHOT.jar]

               at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

               at org.apache.catalina.core.StandardContext.start(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

               at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar]

          .....

           

          {code}

           

           

          standalone-full.xml:

          {code:xml}


          <datasources>


               <datasource jndi-name="java:jboss/fishstore/LoginDataSource" pool-name="LoginDataSource" enabled="true" use-java-context="true">


                    <connection-url>valid connection url</connection-url>


                    <driver>oracle</driver>


                    <security>


                         <user-name>user</user-name>


                         <password>pw</password>


                    </security>


               </datasource>


               <datasource jndi-name="java:jboss/fishstore/fishstoreDataSource" pool-name="fishstoreDataSource" enabled="true" use-java-context="true">


                    <connection-url>valid connection url</connection-url>


                    <driver>oracle</driver>


                    <security>


                         <user-name>user</user-name>


                         <password>pw</password>


                    </security>


               </datasource>


               <drivers>


                    <driver name="oracle" module="com.oracle.jdbc14">


                         <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>


                    </driver>


               </drivers>


          </datasources>


          {code}

           

           

          The lookup code in  fishstore.view.Bootstrap.java:

           

           

          {code}

          Properties props = System.getProperties();

          InitialContext ctx = new InitialContext(props);

           

          DataSource ds = (DataSource) ctx.lookup("java:jboss/fishstore/LoginDataSource");

           

          {code}

          • 2. Re: Datasource is not started - how do you start it?
            jbertram

            Can you provide enough information and/or bits so that I could reproduce this problem on my own box?  I don't have access to an Oracle instance so if you could reproduce this using HSQLDB or PostgreSQL or something that would be great.

            • 3. Re: Datasource is not started - how do you start it?
              pugsherpa

              Sorry, I can't get you any files.  I'd have to hand-type everything in from scratch (like I did with everything you see here).  I know that doesn't make sense to you but I'm not trying to be difficult. 

               

              Maybe you can help me understand what it's trying to do.

              Why is it calling the datasource JNDI entry a "service"  and what does it mean when a "service" is not available or not started?

               

              What does it mean when these services are missing?  How do I find them so that they aren't missing anymore? 

               

              {code}

              JBAS014775 New missing/unsatisfied dependencies:    

                   service jboss.cached-connection-manager (missing)

                   service jboss.connector.config (missing)  

                   service jboss.connector.transactionintegration (missing)

                   service jboss.ironjacamar.connection-validator (missing)     

                   service jboss.ironjacamar.idle-remover (missing)  

                   service jboss.ironjacamar.mdr (missing)   

                   service jboss.jdbc-driver.registry (missing

                   service jboss.management_repository (missing)

                   service jboss.raregistry (missing)

              {code}

               

               

              Is this statement right?

              service is to module as class file is to jar file


              How do I find which modules are required to provide the services that are listed as missing?

              How do I know which services a module provides?

              If a module does not provide a service, what does?

              • 4. Re: Datasource is not started - how do you start it?
                jbertram

                Sorry, I can't get you any files.  I'd have to hand-type everything in from scratch (like I did with everything you see here).  I know that doesn't make sense to you but I'm not trying to be difficult.

                I understand.  I've worked with other users in secure environments like this.  It makes support difficult but not impossible. 

                 

                Unfortunately I'm not an expert in JBoss MSC, so I can't answer all of your questions.  I just try to help out where I can.

                 

                What does it mean when these services are missing?  How do I find them so that they aren't missing anymore?

                 

                JBAS014775 New missing/unsatisfied dependencies:     
                     service jboss.cached-connection-manager (missing) 
                     service jboss.connector.config (missing)   
                     service jboss.connector.transactionintegration (missing) 
                     service jboss.ironjacamar.connection-validator (missing)      
                     service jboss.ironjacamar.idle-remover (missing)   
                     service jboss.ironjacamar.mdr (missing)    
                     service jboss.jdbc-driver.registry (missing
                     service jboss.management_repository (missing)
                     service jboss.raregistry (missing) 

                 

                I believe all of these are are available by default in standalone.xml coming from the various subsystems (and their required modules) which support JCA JDBC datasources.  I don't know of a way to figure out what specific subsystem creates which specific services other than looking at the source code.

                 

                Is this statement right?

                service is to module as class file is to jar file


                How do I find which modules are required to provide the services that are listed as missing?

                How do I know which services a module provides?

                If a module does not provide a service, what does?

                That statement is not right.  A module is just a collection of JARs and hence classes.  They are units for classloading, nothing more.  They don't provide services in and of themselves.  Subsystems create services.

                • 5. Re: Datasource is not started - how do you start it?
                  nickarls

                  Is there nothing in the log that could indicate why the servers dependencies are not satisfied?

                  • 6. Re: Datasource is not started - how do you start it?
                    wdfink

                    As Justin said the services should be all available, so the dependencies are follow up errors.

                     

                    What if you start a fresh 7.1.1, you will have a clean error-free start.

                    - add the oracle driver to the config drivers section

                      check the message "JBAS010403: Deploying JDBC-compliant" I know it is in your log

                    - add one data source

                      check that is deployed error-free

                    - add pool-element and prefill the pool with one connection

                      it will fail if the credentials or other required resources are wrong

                     

                    See wiki for this.

                     

                    BTW I'm not sure ATM whether the datasources jndi-name must have the prefix java:jboss/ or java:jboss/datasources you might try the second also