7 Replies Latest reply on Aug 16, 2008 1:31 AM by jaikiran

    failed on all configuration, but ok on default configuration

    gan.gary

      I have a hibernate, when I deploy in "default" configuration, everything is ok; but when deply to "all" configuration, i get:

      2008-08-08 09:41:15,799 INFO [org.hibernate.impl.SessionFactoryImpl] building session factory
      2008-08-08 09:41:16,549 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      2008-08-08 09:41:16,549 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
      ...
      2008-08-08 10:38:40,985 ERROR [STDERR] javax.naming.NameNotFoundException: queue not bound
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
      2008-08-08 10:38:40,985 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
      2008-08-08 10:38:40,985 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)


      I thought is something similar to:
      http://jaitechwriteups.blogspot.com/2007/10/why-do-i-get-namenotfoundexception.html

      but I can found my JNDI there. Anyone?

        • 1. Re: failed on all configuration, but ok on default configura
          gan.gary

          Sorry, i think I was wrong.
          When it's in "default" mode, it created automatically

          11:27:02,213 WARN [MessagingContainer] Could not find the queue destination-jnd
          i-name=queue/AAA/BBB
          11:27:02,213 WARN [MessagingContainer] destination not found: queue/AAA/BBB reason: javax.naming.NameNotFoundException: AAA not bound
          11:27:02,213 WARN [MessagingContainer] creating a new temporary destination: queue/AAA/BBB
          11:27:02,229 INFO [flexflow/TestResults] Bound to JNDI name: queue/AAA/BBB

          but not in "all" mode. Any idea why?

          • 2. Re: failed on all configuration, but ok on default configura
            gan.gary

            anyone?

            • 3. Re: failed on all configuration, but ok on default configura
              jaikiran

              I don't know whether its expected for the "all" configuration to not create a temporary queue if it does not exist. But, how about creating/configuring your queue for the MDB instead of relying on the server to create a temporary queue? Here's a chapter from the JBoss guide which shows how to create queues:

              http://docs.jboss.org/jbossas/admindevel326/html/ch6.chapt.html#d0e12644

              • 4. Re: failed on all configuration, but ok on default configura
                gan.gary

                H iJakiran, you meant this?

                Example 6.8. The MDB jboss.xml descriptor
                
                <?xml version="1.0"?>
                <jboss>
                 <enterprise-beans>
                 <message-driven>
                 <ejb-name>TextMDB</ejb-name>
                 <destination-jndi-name>queue/B</destination-jndi-name>
                 <resource-ref>
                 <res-ref-name>jms/QCF</res-ref-name>
                 <jndi-name>ConnectionFactory</jndi-name>
                 </resource-ref>
                 </message-driven>
                 </enterprise-beans>
                </jboss>


                but why I only found this: "standardjboss.xml"? And there's no comment sample in that file, can i assume it's first level child element after "jboss" element?

                • 5. Re: failed on all configuration, but ok on default configura
                  jaikiran

                  Nope.

                  I meant creating your queue through some file named my-destination-service.xml which can be placed in %JBOSS_HOME%\server\all\deploy-hasingleton\jms folder. The contents of this file can be something like this:

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <!-- $Id: jbossmq-destinations-service.xml 25907 2004-11-16 04:32:39Z ejort $ -->
                  
                  <!--
                   | This file defines the default Queues and Topics that JBossMQ
                   | ships with. The default Queues and Topics are used by the
                   | JBoss test suite and by the sample jms programs.
                   |
                   | You can add other destinations to this file, or you can create other
                   | *-service.xml files to contain your application's destinations.
                   -->
                  
                  <server>
                   <mbean code="org.jboss.mq.server.jmx.Queue"
                   name="jboss.mq.destination:service=Queue,name=AAA">
                   <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
                   </mbean>
                  
                  </server>
                  


                  • 6. Re: failed on all configuration, but ok on default configura
                    gan.gary

                    no, I still could not get it:

                    Global JNDI Namespace
                     +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
                     +- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
                     +- console (class: org.jnp.interfaces.NamingContext)
                     | +- PluginManager (proxy: $Proxy57 implements interface org.jboss.console.manager.PluginManagerMBean)
                     +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
                     +- HAPartition (class: org.jnp.interfaces.NamingContext)
                     | +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
                     +- HASessionState (class: org.jnp.interfaces.NamingContext)
                     | +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
                     +- JAXR (class: org.apache.ws.scout.registry.ConnectionFactoryImpl)
                     +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
                     +- invokers (class: org.jnp.interfaces.NamingContext)
                     | +- <my pc name> (class: org.jnp.interfaces.NamingContext)
                     | | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
                     +- jmx (class: org.jnp.interfaces.NamingContext)
                     | +- invoker (class: org.jnp.interfaces.NamingContext)
                     | | +- RMIAdaptor (proxy: $Proxy56 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
                     | +- rmi (class: org.jnp.interfaces.NamingContext)
                     | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
                     +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)


                    i am using :

                    <?xml version="1.0" encoding="UTF-8"?>
                    
                    <!-- $Id: jbossmq-destinations-service.xml 25907 2004-11-16 04:32:39Z ejort $ -->
                    
                    <!--
                     | This file defines the default Queues and Topics that JBossMQ
                     | ships with. The default Queues and Topics are used by the
                     | JBoss test suite and by the sample jms programs.
                     |
                     | You can add other destinations to this file, or you can create other
                     | *-service.xml files to contain your application's destinations.
                     -->
                    
                    <server>
                     <mbean code="org.jboss.mq.server.jmx.Queue"
                     name="jboss.mq.destination:service=Queue,name=AAA/BBB">
                     <depends optional-attributename="DestinationManager">jboss.mq:service=DestinationManager</depends>
                     </mbean>
                    
                    </server>


                    • 7. Re: failed on all configuration, but ok on default configura
                      jaikiran

                      I haven't used the "all" server much. So don't exactly know, if the queues are deployed. I don't have access to my system until next week. Let me see how it behaves on my system.