This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

client lookup java.lang.ClassCastException: $Proxy0  RSS feed

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm trying to establish a connection from a client application and JBoss 4.2.2
(on my laptop with JBoss 4.0.5 works fine).

I get this error:

317 [main] DEBUG eu.virtualLab.util.dataMigrator.remote.dao.EjbFactory - [setEjbObj] Looking up the ejb interface from context...
317 [main] DEBUG eu.virtualLab.util.dataMigrator.remote.dao.EjbFactory - [setEjbObj] JNDI federfarma/PharmacyBean/remote
560 [main] FATAL eu.virtualLab.util.dataMigrator.remote.dao.EjbFactory - java.lang.ClassCastException: $Proxy0
561 [main] FATAL eu.virtualLab.util.dataMigrator.remote.dao.EjbFactory - eu.virtualLab.util.dataMigrator.remote.dao.EjbFactoryException: java.lang.ClassCastException: $Proxy0


the code


On JMX console

+- federfarma (class: org.jnp.interfaces.NamingContext)
| +- PharmacyBean (class: org.jnp.interfaces.NamingContext)
| | +- local (proxy: $Proxy86 implements interface it.federfarma.modena.pharmacy.ejb.PharmacyLocal,interface org.jboss.ejb3.JBossProxy)
| | +- remote (proxy: $Proxy84 implements interface it.federfarma.modena.pharmacy.ejb.PharmacyRemote,interface org.jboss.ejb3.JBossProxy)


Any help?
Thanks in advance
[ April 15, 2008: Message edited by: Alessandro Ilardo ]
 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, on my laptop, browsing the jmx-console I have got these interfaces


+- federfarma (class: org.jnp.interfaces.NamingContext)
| +- PharmacyBean (class: org.jnp.interfaces.NamingContext)
| | +- local (proxy: $Proxy88 implements interface it.federfarma.modena.pharmacy.ejb.PharmacyLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
| | +- remote (proxy: $Proxy86 implements interface it.federfarma.modena.pharmacy.ejb.PharmacyRemote,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)


Something that I missed to configure on JBoss 4.2?
 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I got it. I don't know if this is a bug or not (to me it looks like), but it seems that JBoss 4.2.2 is not backward compatible.

The J2EE EJBObject interface is not available.

Changing the class worked.
 
Veri Strora
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Alessandro.
I've the same problem in JBoss4.3.
How do you resolved it, please?
Veri
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Veri Strora:
Hi, Alessandro.
I've the same problem in JBoss4.3.
How do you resolved it, please?
Veri


Veri,

Let's continue this discussion in your other thread here
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!