10 Replies Latest reply on Feb 21, 2005 10:13 AM by lucaiacono

    JNDI ... Help please

    lucaiacono

      Hi,

      Does anyone know what org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName" mean ?
      I'm trying to register a new datasource but I've had no joy. Here is my sapdb-ds.xml. Can you tell me if there is anything wrong with it ?

      <?xml version="1.0" encoding="UTF-8" ?>
      - <server>
      - <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=SapdbDS">
       <!-- <attribute name="SecurityDomainJndiName">SapdbRealm</attribute> -->
      - <depends optional-attribute-name="ManagedConnectionFactoryName">
      - <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=SapdbDS">
       <attribute name="JndiName">EnacDS</attribute>
      - <attribute name="ManagedConnectionFactoryProperties">
      - <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:sapdb://10.0.0.173/GESTELDB</config-property>
       <config-property name="DriverClass" type="java.lang.String">com.sap.dbtech.jdbc.DriverSapDB</config-property>
      - <!-- set these only if you want only default logins, not through JAAS
       -->
       <config-property name="UserName" type="java.lang.String">ENACSA</config-property>
       <config-property name="Password" type="java.lang.String">ENACSA</config-property>
       </properties>
       </attribute>
      - <!-- Below here are advanced properties
       -->
      - <!-- hack
       -->
       <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
       </mbean>
       </depends>
      - <depends optional-attribute-name="ManagedConnectionPool">
      - <!-- embedded mbean
       -->
      - <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=SapdbDS">
       <attribute name="MinSize">0</attribute>
       <attribute name="MaxSize">101</attribute>
       <attribute name="BlockingTimeoutMillis">5000</attribute>
       <attribute name="IdleTimeoutMinutes">5</attribute>
      -
       <attribute name="Criteria">ByContainer</attribute>
       </mbean>
       </depends>
       <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
       <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
       <attribute name="TransactionManager">java:/TransactionManager</attribute>
      - <!-- make the rar deploy! hack till better deployment
       -->
       <depends>jboss.jca:service=RARDeployer</depends>
       </mbean>
       </server>

      This matter is rather urgent, so you're help will be very much appreciated.
      cheers
      luca

        • 1. Re: JNDI ... Help please
          darranl

          Which version of JBoss are you using? This is the old way of defining datasources.

          • 2. Re: JNDI ... Help please
            lucaiacono

            3.2.6 is the one I have installed. What's more I'm using SapDB as a datasource.

            • 3. Re: JNDI ... Help please
              darranl

              If you look in the folder 'jboss-3.2.6\docs\examples\jca' you should find an example sap configuration in the file 'sapdb-ds.xml'.

              • 4. Re: JNDI ... Help please
                lucaiacono

                I have seen the conf files you're talking about, however there are no mbean tags in those. Do you suggest I should take those as templates anyhow?

                • 5. Re: JNDI ... Help please
                  darranl

                  The MBean approach of deploying resources was for JBoss 3.0.x, as you are using 3.2.6 you should be using the -ds.xml files.

                  • 6. Re: JNDI ... Help please
                    lucaiacono

                    ok, thanks for tip, I'll give it a shot.
                    cheers

                    • 7. Re: JNDI ... Help please
                      lucaiacono

                      one more question: How do I translate the rest of the tags, ie.

                      
                       <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
                       </mbean>
                       </depends>
                      - <depends optional-attribute-name="ManagedConnectionPool">
                      - <!-- embedded mbean
                       -->
                      - <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=SapdbDS">
                       <attribute name="MinSize">0</attribute>
                       <attribute name="MaxSize">101</attribute>
                       <attribute name="BlockingTimeoutMillis">5000</attribute>
                       <attribute name="IdleTimeoutMinutes">5</attribute>
                      -
                       <attribute name="Criteria">ByContainer</attribute>
                       </mbean>
                       </depends>
                       <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
                       <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
                       <attribute name="TransactionManager">java:/TransactionManager</attribute>
                      - <!-- make the rar deploy! hack till better deployment
                       -->
                       <depends>jboss.jca:service=RARDeployer</depends>
                       </mbean>
                      

                      cheers

                      • 8. Re: JNDI ... Help please
                        darranl

                        At this point you really need to forget everything that you have seen before, the -ds.xml examples work as they are except for requiring the correct URL, username and password.

                        The main purpose of the -ds.xml files is that they simplify the deployment process for resources so the majority of information contained in the old deployment descriptors is no longer required.

                        • 9. Re: JNDI ... Help please
                          darranl

                          Once you have your datasource deployed and working you can look at the dtd for -ds.xml files, this can be found in 'jboss-3.2.6\docs\dtd' and will show you the extra values you can set.

                          • 10. Re: JNDI ... Help please
                            lucaiacono

                            you have been most helpful, thank you very much
                            cheers
                            luca