5 Replies Latest reply on Aug 15, 2003 8:49 AM by Jon Barnett

    No Attribute found with name: JndiName

    Newbie

      Hello!

      I am trying to port an application from JBoss 3.0.0
      to 3.2.2RC2, I am having problems configuring a
      service. I get the below exception, can someone
      point me to a fix?

      08:32:15,117 INFO [ServiceConfigurator] Problem configuring service jboss.jca:service=LocalTxDS,name=SecureDS
      org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:338)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:443)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:356)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:443)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:356)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
      at org.jboss.system.ServiceController.install(ServiceController.java:225)
      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:776)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:631)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:534)
      08:32:15,568 INFO [ServiceConfigurator] Problem configuring service jboss.jca:service=LocalTxCM,name=SecureDS
      org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.jca
      ervice=LocalTxCM,name=SecureDS; - nested throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName'
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:478)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:363)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
      at org.jboss.system.ServiceConfigurator.processDependency(ServiceConfigurator.java:443)
      at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:356)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:176)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:118)
      at org.jboss.system.ServiceController.install(ServiceController.java:225)
      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:776)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:631)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.setAttribute(ReflectedMBeanDispatcher.java:190)
      at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:504)
      at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:474)
      ... 63 more
      08:32:15,618 INFO [MainDeployer] Deployed package: file:/C:/softkastle11/server/sk/deploy/herz-service.xml
      08:32:15,618 INFO [MainDeployer] Starting deployment of package: file:/C:/softkastle11/server/sk/deploy/management/ejb-management.jar
      08:32:16,939 INFO [EjbModule] Creating
      08:34:17,172 INFO [EjbModule] Deploying MEJB
      08:34:17,252 INFO [StatelessSessionContainer] Creating
      08:34:17,273 INFO [StatelessSessionInstancePool] Creating
      08:34:17,273 INFO [StatelessSessionInstancePool] Created
      08:34:17,293 INFO [StatelessSessionContainer] Created
      08:34:17,293 INFO [EjbModule] Created
      08:34:17,303 INFO [EjbModule] Starting
      08:34:17,303 INFO [StatelessSessionContainer] Starting
      08:34:17,443 INFO [StatelessSessionInstancePool] Starting
      08:34:17,443 INFO [StatelessSessionInstancePool] Started
      08:34:17,453 INFO [StatelessSessionContainer] Started
      08:34:17,453 INFO [EjbModule] Started
      08:34:17,463 INFO [EJBDeployer] Deployed: file:/C:/softkastle11/server/sk/deploy/management/ejb-management.jar
      08:34:17,503 INFO [MainDeployer] Deployed package: file:/C:/softkastle11/server/sk/deploy/management/ejb-management.jar
      08:34:17,513 INFO [MainDeployer] Starting deployment of package: file:/C:/softkastle11/server/sk/deploy/jmx-console.war/
      08:34:17,763 INFO [EmbeddedCatalinaService41] deploy, ctxPath=/jmx-console, warUrl=file:/C:/softkastle11/server/sk/deploy/jmx-console.war/
      08:34:18,404 INFO [Engine] ContextConfig[/jmx-console]: Added certificates -> request attribute Valve
      08:34:18,474 WARN [EmbeddedCatalinaService41] Unable to invoke setDelegate on class loader:org.jboss.web.catalina.WebCtxLoader$ENCLoader@b49b19
      08:34:18,474 INFO [Engine] StandardManager[/jmx-console]: Seeding random number generator class java.security.SecureRandom
      08:34:18,484 INFO [Engine] StandardManager[/jmx-console]: Seeding of random number generator has been completed
      08:34:18,494 INFO [Engine] StandardWrapper[/jmx-console:default]: Loading container servlet default
      08:34:18,494 INFO [Engine] StandardWrapper[/jmx-console:invoker]: Loading container servlet invoker

        • 1. Re: No Attribute found with name: JndiName
          Jon Barnett Master

          Did you change the datasource template for 3.2.x? It is different (and simpler) than the 3.0.x configuration. Check the examples in docs/examples/jca and choose an appropriate one for your datasource.

          In 3.2.x, JBoss recognises a datasource configuration from the name. It must be called something ending with *-ds.xml. The configuration file still goes into the deploy directory.

          Those are the only traps for migrating datasource definitions over to 3.2.x.

          • 2. Re: No Attribute found with name: JndiName
            Newbie

            I also tried the code straight from the documentation, with the same error, thanks for any help.


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

            DefaultDS


            <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"/>


            ...

            ...

            • 3. Re: Fixed problem
              Newbie

              Excellent help Jon!

              I used the cicsr9s-service.xml as an example and changed my service file name from -service.xml to
              -ds.xml server came up with no hiccups.

              Appreciate the help.

              • 4. Re: Fixed problem
                antman79 Newbie

                Hi Ray I'm trying to connect to mysql and am having a problem that seems similar. What was the advice Jon gave you?

                Ant

                • 5. Re: Fixed problem
                  Jon Barnett Master

                  I'm assuming you are using JBoss 3.2.x or higher.

                  Use the mysql-ds.xml template from your 3.2.x distribution - located in docs/examples/jca of the JBoss 3.2.x binary distribution. This is copied into your deploy directory and must be called something ending with *-ds.xml. This is so JBoss understands this is a datasource definition and treats it accordingly.

                  Modify the JNDI name and your connection parameters accordingly in the file. Note, that the format is different to the older 3.0.x *-service.xml datasource definitions. Put your MySQL driver JAR in the server/instance/lib of your distribution, where instance is the run-time instance - usually default. YMMV.