This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA" Watch "Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA" New topic
Author

Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA

don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
Hello all, i am very new to JBoss and EJB, I am trying to deploy sample HelloWorld Bean(ejb2_1) in JBoss 4.2.1GA, and i am getting no ClassLoaders found for my particular bean.......


Is jboss.xml also required for deployment inside META-INF or only ejb-jar.xml is sufficient...........
Help required is very urgent..........N thanks in advance......
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Lohith,

Welcome to JavaRanch

Please post the exception stacktrace that you are seeing. I guess, you are getting ClassNotFoundException. Do you have the classes available in the application package which you are deploying?


[My Blog] [JavaRanch Journal]
don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
Originally posted by Jaikiran Pai:
Lohith,

Welcome to JavaRanch

Please post the exception stacktrace that you are seeing. I guess, you are getting ClassNotFoundException. Do you have the classes available in the application package which you are deploying?


Yes I have packaged it in a folder called samples N wrote a META-INF/ejb-jar.xml, created a jar of it and copied it to jboss/server/default/deploy

i will get a Exception:ClassNotFound for ClassLoadersNot found for samples.HelloBean
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Originally posted by Lohith S:
i will get a Exception:ClassNotFound for ClassLoadersNot found for samples.HelloBean


This means that the class could not be found in the package. Follow the steps below and post the output here:

1) From the command prompt go to the deploy folder of your server
2) Run the following command:



Replace myapp.jar, in the above command, with the name of your application package file.
don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
It got deployed..........somehow.....

Now where should the client program be
I tried to run it(HelloWorldClient) which is outside the samples.....

[lohith@dev15 jboss]$ java HelloWorldClient
javax.naming.NameNotFoundException: HelloWorld not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
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:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:530)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at HelloWorldClient.main(HelloWorldClient.java:20)
Exception: HelloWorld not bound
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

What is the jndi name of the bean that you have deployed? If you aren't sure, check the JNDI tree. Here's how you can do it:

- Go to http://localhost:8080/jmx-console
- Search for service=JNDIView
- Click on that link
- On the page that comes up click on the Invoke button beside the list() method
- The page that comes up will show the contents of the JNDI tree.

Look for your bean in this jndi tree and see what's the jndi name it's bound to. If you have trouble understanding the JNDI tree output, just post it here (remember to enclose the output in the code block, by using the Code button in the message window).
don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
I did as you told.........

and this was what i saw.....


JBoss
JMX MBean Operation Result list()
Back to Agent View Back to MBean View Reinvoke MBean Operation

Web Applications

java:comp namespace of the jmx-console.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the console-mgr.sar/web-console.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the jbossmq-httpil.sar/jbossmq-httpil.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)


java:comp namespace of the jbossws.sar/jbossws-context.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the http-invoker.sar/invoker.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)


java:comp namespace of the jboss-web.deployer/ROOT.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


Ejb Module: HelloWorld.jar

java:comp namespace of the HelloWorldEJB bean:

+- env (class: org.jnp.interfaces.NamingContext)


java: Namespace

+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- comp.original (class: javax.namingMain.Context)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- Mail (class: javax.mail.Session)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)


Global JNDI Namespace

+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy48 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)
+- HelloWorldEJB (proxy: $Proxy59 implements interface samples.HelloWorldHome,interface javax.ejb.Handle)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- 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)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy49 implements interface org.jboss.console.manager.PluginManagerMBean)
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
I did as you told.........

and this was what i saw.....


JBoss
JMX MBean Operation Result list()
Back to Agent View Back to MBean View Reinvoke MBean Operation

Web Applications

java:comp namespace of the jmx-console.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the console-mgr.sar/web-console.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the jbossmq-httpil.sar/jbossmq-httpil.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jbossmq/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jbossmq] (class: javax.naming.LinkRef)


java:comp namespace of the jbossws.sar/jbossws-context.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


java:comp namespace of the http-invoker.sar/invoker.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)


java:comp namespace of the jboss-web.deployer/ROOT.war application:

+- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
+- env (class: org.jnp.interfaces.NamingContext)
| +- security (class: org.jnp.interfaces.NamingContext)
| | +- realmMapping[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- subject[link -> java:/jaas/other/subject] (class: javax.naming.LinkRef)
| | +- securityMgr[link -> java:/jaas/other] (class: javax.naming.LinkRef)
| | +- security-domain[link -> java:/jaas/other] (class: javax.naming.LinkRef)


Ejb Module: HelloWorld.jar

java:comp namespace of the HelloWorldEJB bean:

+- env (class: org.jnp.interfaces.NamingContext)


java: Namespace

+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- comp.original (class: javax.namingMain.Context)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- Mail (class: javax.mail.Session)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)


Global JNDI Namespace

+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy48 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)
+- HelloWorldEJB (proxy: $Proxy59 implements interface samples.HelloWorldHome,interface javax.ejb.Handle)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy14 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- 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)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy49 implements interface org.jboss.console.manager.PluginManagerMBean)
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

+- HelloWorldEJB (proxy: $Proxy59 implements interface samples.HelloWorldHome,interface javax.ejb.Handle)


So your lookup string should be:

don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
Thanks I did it, but how to run the client.....
When i tried to run the client program....

Can please provide a way to do this in a proper way......from first.....
I am fed up of this R&D, when a sample Hello World EJB is taking so long, i have to deploy my BPEL engine code to JBoss..........i am really worried...
[root@dev15 jboss]# java HelloWorldClient

javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.util.id.GUID; local class incompatible: stream classdesc serialVersionUID = 3289509836244263718, local class serialVersionUID = 6926421946503004889]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:649)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at HelloWorldClient.main(HelloWorldClient.java:20)
Caused by: java.io.InvalidClassException: org.jboss.util.id.GUID; local class incompatible: stream classdesc serialVersionUID = 3289509836244263718, local class serialVersionUID = 6926421946503004889
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.invocation.InvokerInterceptor.readExternal(InvokerInterceptor.java:125)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.proxy.Interceptor.readExternal(Interceptor.java:66)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:111)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:552)
... 3 more
Exception: null
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10069
    
163

Looks like you have the incorrect versions of JBoss jars in the client's classpath. The jars should be the same as the one's that are on the server. You can copy the jbossall-client.jar from the JBOSS_HOME\client folder and place it in the Helloworld client's classpath. Make sure that you dont have jars of different JBoss version the client's classpath.

I am fed up of this R&D, when a sample Hello World EJB is taking so long, i have to deploy my BPEL engine code to JBoss..........i am really worried...


You have to be patient. There will be many examples on the net for deploying a similar application. But all of them will require similar configuring. You just have to be patient and make sure that you understand the steps which you are doing.
don lohith
Greenhorn

Joined: Oct 24, 2007
Posts: 16
Hey Thanks a lot man...........I copied all the jar's under jboss/client to my classpath for checking..........it worked......Thanks for the forum....However i will contact the forum.....for my next ventures.........
 
 
subject: Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA