Discussions

EJB programming & troubleshooting: jboss jndi problem

  1. jboss jndi problem (2 messages)

    jboss jndiview Global JNDI Namespace +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair) +- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate) +- UserTransactionSessionFactory (proxy: $Proxy42 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory) +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef) +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef) +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair) +- topic (class: org.jnp.interfaces.NamingContext) | +- testDurableTopic (class: org.jboss.mq.SpyTopic) | +- testTopic (class: org.jboss.mq.SpyTopic) | +- securedTopic (class: org.jboss.mq.SpyTopic) +- queue (class: org.jnp.interfaces.NamingContext) | +- A (class: org.jboss.mq.SpyQueue) | +- testQueue (class: org.jboss.mq.SpyQueue) | +- ex (class: org.jboss.mq.SpyQueue) | +- DLQ (class: org.jboss.mq.SpyQueue) | +- D (class: org.jboss.mq.SpyQueue) | +- C (class: org.jboss.mq.SpyQueue) | +- B (class: org.jboss.mq.SpyQueue) +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction) +- jmx (class: org.jnp.interfaces.NamingContext) | +- invoker (class: org.jnp.interfaces.NamingContext) | | +- RMIAdaptor (proxy: $Proxy36 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) +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef) +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef) we can ses it "TopicConnectionFactory" but when i code as following public static void main(String[] args)throws javax.naming.NamingException { Context ctx=null; TopicConnectionFactory conFactory=null; TopicConnection con=null; TopicSession session=null; Topic topic=null; try { Properties p = new Properties( ); p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, " org.jboss.naming:org.jnp.interfaces"); p.put(Context.PROVIDER_URL, "jnp://localhost:1099"); ctx= new javax.naming.InitialContext(p); System.out.println("ctx:"+ctx); conFactory=(TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); System.out.println("Factory:"+conFactory); Enumeration enumeration = ctx.listBindings(""); for(;enumeration.hasMoreElements();) System.out.println(enumeration.nextElement().toString()); conFactory=(TopicConnectionFactory)ctx.lookup("ConnectionFactory"); topic=(Topic)ctx.lookup("topic/testTopic"); con=conFactory.createTopicConnection(); session=con.createTopicSession(false,Session.AUTO_ACKNOWLEDGE); TopicPublisher pub=session.createPublisher(topic); TextMessage msg=session.createTextMessage("first mestaage at :"+new Date() ); pub.send(msg); } catch(Exception e) { System.out.println(e.getMessage()); } finally { if (con != null) { try { con.close(); } catch (JMSException e) {} } } } output: ctx:javax.naming.InitialContext@157f0dc null when u replace "TopicConnectionFactory" by "topic/testTopic" output: ctx:javax.naming.InitialContext@157f0dc javax.naming.Reference u can get refernce both "TopicConnectionFactory" and "topic/testTopic" are in Global JNDI Namespace list how can i get TopicConnectionFactory reference? plz help me, thanks

    Threaded Messages (2)

  2. problem in weblogic server[ Go to top ]

    hi ,how should i solve this, *************************************************************************** The WebLogic Server did not start up properly. java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class incompatible: stream classdesc serialVersionUID = 7043855487133450673, local class serialVersionUID = 8644704819898565848 at java.io.ObjectStreamClass.initNonProxy(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readArray(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.defaultReadFields(Unknown Source) at java.io.ObjectInputStream.readSerialData(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at weblogic.management.internal.TypesHelper.getMBeanInfo(TypesHelper.java:261) at weblogic.management.internal.TypesHelper.getAdminOrConfigMBeanInfo(TypesHelper.java:366) at weblogic.management.internal.ConfigurationMBeanImpl.(ConfigurationMBeanImpl.java:129) at weblogic.management.AdminServer.(AdminServer.java:59) at weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:245) at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:771) at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:670) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:344) at weblogic.Server.main(Server.java:32) --------------- nested within: ------------------ weblogic.management.configuration.ConfigurationException: - with nested exception: [java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class incompatible: stream classdesc serialVersionUID = 7043855487133450673, local class serialVersionUID = 8644704819898565848] at weblogic.management.internal.TypesHelper.getMBeanInfo(TypesHelper.java:266) at weblogic.management.internal.TypesHelper.getAdminOrConfigMBeanInfo(TypesHelper.java:366) at weblogic.management.internal.ConfigurationMBeanImpl.(ConfigurationMBeanImpl.java:129) at weblogic.management.AdminServer.(AdminServer.java:59) at weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:245) at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:771) at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:670) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:344) at weblogic.Server.main(Server.java:32) --------------- nested within: ------------------ weblogic.management.configuration.ConfigurationError - with nested exception: [weblogic.management.configuration.ConfigurationException: - with nested exception: [java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class incompatible: stream classdesc serialVersionUID = 7043855487133450673, local class serialVersionUID = 8644704819898565848]] at weblogic.management.internal.TypesHelper.getAdminOrConfigMBeanInfo(TypesHelper.java:377) at weblogic.management.internal.ConfigurationMBeanImpl.(ConfigurationMBeanImpl.java:129) at weblogic.management.AdminServer.(AdminServer.java:59) at weblogic.management.AdminServerAdmin.initialize(AdminServerAdmin.java:245) at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:771) at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:670) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:344) at weblogic.Server.main(Server.java:32) *************************************************************************** regards fuze
  3. Did you manage to solve this one?[ Go to top ]

    I have a similar problem getting null back from a JNDI lookup of jboss. This time with a Connection Factory for a ResourceAdapter. Did you figure it out?