1 Reply Latest reply on Jul 30, 2002 5:56 AM by marcus1981

    Newbie - Hilfe bei Datasource-Zugriff

    marcus1981

      Hallo all!


      Ich bin momentan dabei eine J2EE-Applikation auf JBoss 3.0 & Tomcat 4.0.3(?) zum Laufen zu bringen,
      derzeit mit der Hypersonic SQL-DB (bei Jboss dabei).
      Soweit funktioniert alles, Suchen, Hinzufügen und Ändern von "Daten", unter Verwendung von Servlets/Sessions.

      Das einzigste was bis jetzt noch nicht funktioniert ist das LÖSCHEN von Einträgen.
      Dort wird dann immer "Keine Datasource 'aboDbPoolRO' gefunden" ausgeworfen.

      Vielleicht habt ihr ja ne Idde, woran's liegen könnte? Ich bin fast am Verzweifeln :-(

      Nachfolgend poste ich meine config-files und einen Auszug aus dem Server-Log.

      jboss.xml:
      "

      false
      <container-configurations>
      <container-configuration>
      <container-name>Logging Configuration</container-name>
      <call-logging>true</call-logging>
      <container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
      <container-interceptors>
      org.jboss.ejb.plugins.LogInterceptor
      org.jboss.ejb.plugins.TxInterceptorCMT
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
      org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
      org.jboss.ejb.plugins.TxInterceptorBMT
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.ejb.plugins.SecurityInterceptor
      </container-interceptors>
      <instance-cache>org.jboss.ejb.plugins.StatefulSessionInstanceCache</instance-cache>
      <persistence-manager>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager</persistence-manager>
      <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
      <container-invoker-conf>
      4444
      False
      </container-invoker-conf>
      <container-cache-conf>
      <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
      <cache-policy-conf>
      <min-capacity>1</min-capacity>
      <max-capacity>1</max-capacity>
      <overager-period>300</overager-period>
      <max-bean-age>600</max-bean-age>
      <resizer-period>400</resizer-period>
      <max-cache-miss-period>60</max-cache-miss-period>
      <min-cache-miss-period>1</min-cache-miss-period>
      <cache-load-factor>0.75</cache-load-factor>
      </cache-policy-conf>
      </container-cache-conf>
      </container-configuration>
      </container-configurations>
      <enterprise-beans>

      <ejb-name>AboSessionBean</ejb-name>
      <jndi-name>session.AboSessionHome</jndi-name>


      <ejb-name>DataSessionBean</ejb-name>
      <jndi-name>session/DataSessionHome</jndi-name>


      <ejb-name>ZeitschriftSessionBean</ejb-name>
      <jndi-name>session.ZeitschriftSessionHome</jndi-name>


      <ejb-name>BenutzerSessionBean</ejb-name>
      <jndi-name>session.BenutzerSessionHome</jndi-name>


      <ejb-name>AbonnementEntityBean</ejb-name>
      <jndi-name>entity.AbonnementEntityHome</jndi-name>


      <ejb-name>BenutzerEntityBean</ejb-name>
      <jndi-name>entity.BenutzerEntityHome</jndi-name>


      <ejb-name>ZeitschriftEntityBean</ejb-name>
      <jndi-name>entity.ZeitschriftEntityHome</jndi-name>


      <ejb-name>KeyEntityBean</ejb-name>
      <jndi-name>entity.KeyEntityHome</jndi-name>

      </enterprise-beans>

      "

      hsqldb-service.xml:
      "
      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->

      <!-- $Id: hsqldb-service.xml,v 1.2.2.4 2002/05/25 21:43:49 patriot1burke Exp $ -->




      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for default hsql dbs -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- ==================================================================== -->



      <!-- Include a login module configuration named HsqlDbRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "HsqlDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">sa</module-option>
      <module-option name = "userName">sa</module-option>
      <module-option name = "password"></module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=aboDbPoolRO</module-option>
      </login-module>

      </application-policy>

      NOTE: the application-policy name attribute must match
      SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.
      -->
      <!--uncomment out this line if you are using the DB2DbRealm above
      HsqlDbRealm
      -->

      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      aboDbPoolRO



      <config-property name="ConnectionURL" type="java.lang.String">jdbc:hsqldb:hsql://localhost:1476</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.hsqldb.jdbcDriver</config-property>
      <config-property name="UserName" type="java.lang.String">sa</config-property>
      <config-property name="Password" type="java.lang.String"></config-property>



      <!--Below here are advanced properties -->
      <!--hack-->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      jboss:service=Hypersonic




      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager

      java:/TransactionManager

      <!--make the rar deploy! hack till better deployment-->
      jboss.jca:service=RARDeployer




      <!-- Moved to end to test anonymous depends -->


      1476
      true
      default
      false



      "

      und Auszug aus standartjaws.xml (benutze keine eigene jaws.xml!):
      "
      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jbosscmp-jdbc PUBLIC
      "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
      "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">

      <!-- ===================================================================== -->
      <!-- -->
      <!-- Standard Jaws Configuration -->
      <!-- -->
      <!-- ===================================================================== -->

      <!-- $Id: standardjaws.xml,v 1.27.2.2 2002/05/21 14:51:41 starksm Exp $ -->


      aboDbPoolRO
      <type-mapping>Hypersonic SQL</type-mapping>
      false
      ...
      "

      und zu guter letzt die Startup- sowie Fehlermeldung des Servers:
      "
      10:00:46,222 INFO [LocalTxConnectionManager] Creating
      10:00:46,662 INFO [LocalTxConnectionManager] Created
      10:00:46,706 INFO [LocalTxConnectionManager] Starting
      10:00:48,396 INFO [aboDbPoolRO] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI name 'java:/aboDbPoolRO'
      [...]
      10:03:41,838 INFO [STDOUT] Tue Jul 30 10:03:41 CEST 2002:DataSessionBean::checkForeignKeysForDelete(String, long, String): Der uebergebene Ressourcenname 'java:/aboDbPoolRO' des Read-Only Datenbankpools exisitiert nicht: Connector::getDatasource(String): Keine Datasource vorhanden mit dem Namen: 'java:/aboDbPoolRO' !
      "

      Ich weiß, dass ist verdammt viel Text, aber ich wäre dankbar, wenn sich jemand meines Problemes annehmen könnte, daich selber noch in Ausbildung zum fachinformatiker (AW) bin und erst seit kurzem mit JBoss arbeite. Hinweiß: selibge J2EE-Applikation lief bereits einwandfrei unter Weblogic 5.2.

      Vielen Dank für eure Hilfe im Vorraus.

      Freundliche Grüße

      Marcus Jäger
      Anwendungsentwicklung
      Business Unit Information

      MATERNA GmbH
      Information & Communications
      Theodor-Heuss-Straße 59 * 61118 Bad Vilbel * Germany
      Marcus.Jaeger@materna.de
      http://www.materna.com * http://www.materna.de

        • 1. Re: Newbie - Hilfe bei Datasource-Zugriff - english Version!
          marcus1981

          Hello all!

          I is to be brought for a moment, besides, a J2EE-Applikation on JBoss to 3.0 and Tomcat 4/0/3 (?) to the running, at present with the Hypersonic SQL-DB (with Jboss).
          So far everything functions: searches, Add and changing of "data", under use of Sessions.
          Till present the only thing what doesn't function yet this DELETE of entries. Then the server says: "no Datasource 'aboDbPoolRO' is found ".

          Perhaps you have an idea what it could lie with? I am almost in despairing:-(

          In the following I poste my config-files and an extract from the server-log.
          jboss.xml:
          "

          false
          <container-configurations>
          <container-configuration>
          <container-name>Logging Configuration</container-name>
          <call-logging>true</call-logging>
          <container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
          <container-interceptors>
          org.jboss.ejb.plugins.LogInterceptor
          org.jboss.ejb.plugins.TxInterceptorCMT
          org.jboss.ejb.plugins.MetricsInterceptor
          org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
          org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor
          org.jboss.ejb.plugins.TxInterceptorBMT
          org.jboss.ejb.plugins.MetricsInterceptor
          org.jboss.ejb.plugins.SecurityInterceptor
          </container-interceptors>
          <instance-cache>org.jboss.ejb.plugins.StatefulSessionInstanceCache</instance-cache>
          <persistence-manager>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager</persistence-manager>
          <transaction-manager>org.jboss.tm.TxManager</transaction-manager>
          <container-invoker-conf>
          4444
          False
          </container-invoker-conf>
          <container-cache-conf>
          <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
          <cache-policy-conf>
          <min-capacity>1</min-capacity>
          <max-capacity>1</max-capacity>
          <overager-period>300</overager-period>
          <max-bean-age>600</max-bean-age>
          <resizer-period>400</resizer-period>
          <max-cache-miss-period>60</max-cache-miss-period>
          <min-cache-miss-period>1</min-cache-miss-period>
          <cache-load-factor>0.75</cache-load-factor>
          </cache-policy-conf>
          </container-cache-conf>
          </container-configuration>
          </container-configurations>
          <enterprise-beans>

          <ejb-name>AboSessionBean</ejb-name>
          <jndi-name>session.AboSessionHome</jndi-name>


          <ejb-name>DataSessionBean</ejb-name>
          <jndi-name>session/DataSessionHome</jndi-name>


          <ejb-name>ZeitschriftSessionBean</ejb-name>
          <jndi-name>session.ZeitschriftSessionHome</jndi-name>


          <ejb-name>BenutzerSessionBean</ejb-name>
          <jndi-name>session.BenutzerSessionHome</jndi-name>


          <ejb-name>AbonnementEntityBean</ejb-name>
          <jndi-name>entity.AbonnementEntityHome</jndi-name>


          <ejb-name>BenutzerEntityBean</ejb-name>
          <jndi-name>entity.BenutzerEntityHome</jndi-name>


          <ejb-name>ZeitschriftEntityBean</ejb-name>
          <jndi-name>entity.ZeitschriftEntityHome</jndi-name>


          <ejb-name>KeyEntityBean</ejb-name>
          <jndi-name>entity.KeyEntityHome</jndi-name>

          </enterprise-beans>

          "

          hsqldb-service.xml:
          "
          <?xml version="1.0" encoding="UTF-8"?>

          <!-- ===================================================================== -->
          <!-- -->
          <!-- JBoss Server Configuration -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: hsqldb-service.xml,v 1.2.2.4 2002/05/25 21:43:49 patriot1burke Exp $ -->




          <!-- ==================================================================== -->
          <!-- New ConnectionManager setup for default hsql dbs -->
          <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
          <!-- ==================================================================== -->



          <!-- Include a login module configuration named HsqlDbRealm.
          Update your login-conf.xml, here is an example for a
          ConfiguredIdentityLoginModule:

          <application-policy name = "HsqlDbRealm">

          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
          <module-option name = "principal">sa</module-option>
          <module-option name = "userName">sa</module-option>
          <module-option name = "password"></module-option>
          <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=aboDbPoolRO</module-option>
          </login-module>

          </application-policy>

          NOTE: the application-policy name attribute must match
          SecurityDomainJndiName, and the
          module-option name = "managedConnectionFactoryName"
          must match the object name of the ConnectionManager you are configuring here.
          -->
          <!--uncomment out this line if you are using the DB2DbRealm above
          HsqlDbRealm
          -->

          <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->


          aboDbPoolRO



          <config-property name="ConnectionURL" type="java.lang.String">jdbc:hsqldb:hsql://localhost:1476</config-property>
          <config-property name="DriverClass" type="java.lang.String">org.hsqldb.jdbcDriver</config-property>
          <config-property name="UserName" type="java.lang.String">sa</config-property>
          <config-property name="Password" type="java.lang.String"></config-property>



          <!--Below here are advanced properties -->
          <!--hack-->
          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
          jboss:service=Hypersonic




          <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->


          0
          50
          5000
          15
          <!--criteria indicates if Subject (from security domain) or app supplied
          parameters (such as from getConnection(user, pw)) are used to distinguish
          connections in the pool. Choices are
          ByContainerAndApplication (use both),
          ByContainer (use Subject),
          ByApplication (use app supplied params only),
          ByNothing (all connections are equivalent, usually if adapter supports
          reauthentication)-->
          ByContainer


          <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

          <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager

          java:/TransactionManager

          <!--make the rar deploy! hack till better deployment-->
          jboss.jca:service=RARDeployer




          <!-- Moved to end to test anonymous depends -->


          1476
          true
          default
          false



          "

          und Auszug aus standartjaws.xml (benutze keine eigene jaws.xml!):
          "
          <?xml version="1.0" encoding="UTF-8"?>

          <!DOCTYPE jbosscmp-jdbc PUBLIC
          "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
          "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">

          <!-- ===================================================================== -->
          <!-- -->
          <!-- Standard Jaws Configuration -->
          <!-- -->
          <!-- ===================================================================== -->

          <!-- $Id: standardjaws.xml,v 1.27.2.2 2002/05/21 14:51:41 starksm Exp $ -->


          aboDbPoolRO
          <type-mapping>Hypersonic SQL</type-mapping>
          false
          ...
          "

          und zu guter letzt die Startup- sowie Fehlermeldung des Servers:
          "
          10:00:46,222 INFO [LocalTxConnectionManager] Creating
          10:00:46,662 INFO [LocalTxConnectionManager] Created
          10:00:46,706 INFO [LocalTxConnectionManager] Starting
          10:00:48,396 INFO [aboDbPoolRO] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI name 'java:/aboDbPoolRO'
          [...]
          10:03:41,838 INFO [STDOUT] Tue Jul 30 10:03:41 CEST 2002:DataSessionBean::checkForeignKeysForDelete(String, long, String): The handed over resources name ' java:/ aboDbPoolRO ' of the Read-Only data bank pools is not correct: Connector:: getDatasource (String): no Datasource exist with the name 'java:/aboDbPoolRO' des Read-Only "

          I know that is damned a lot of text, but I would be grateful if somebody could take care of my problem, because I'm still in education to fachinformatiker (AW) and work only for short with JBoss. Of indication: the J2EE-Application ran already perfectly under Weblogic 5.2.

          Many thanks for your help.

          Sincerely yours

          Marcus Jäger
          Anwendungsentwicklung
          Business Unit Information

          MATERNA GmbH
          Information & Communications
          Theodor-Heuss-Straße 59 * 61118 Bad Vilbel * Germany
          Marcus.Jaeger@materna.de
          http://www.materna.com * http://www.materna.de