Hello, 

I am trying to migrate from Jboss4.0.2 to 4.0.5GA but am having jndi problems. 

My application is deployed with three files in the $jboss/server/default/deploy:

- application.ear
- application.war
- application-ds.xml

The war contains all the client jars it needs to access the ear file which has 
its datasource defined in the *-ds.xml file.

When I run a TestCase which tries to access the ear services, I have no 
problems.  i.e:

            Object objRef = new 
InitialContext().lookup(LocalizationSessionFacadeHome.JNDI_NAME);
  |             LocalizationSessionFacadeHome sessionHome = 
(LocalizationSessionFacadeHome) PortableRemoteObject.narrow(objRef, 
LocalizationSessionFacadeHome.class);
  | 
  |             return sessionHome.create();
  | 

but when the web application (war) tries to access my ear services, I get the 
following error: 

anonymous wrote : 16:05:51,406 ERROR [STDERR] Caused by: 
java.lang.ClassCastException
  | 16:05:51,406 ERROR [STDERR]     at 
com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java
  | :229)
  | 16:05:51,406 ERROR [STDERR]     at 
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
  | 16:05:51,406 ERROR [STDERR]     at 
org.mdarad.global.ServiceLocatorBase.getLocalizationFacade(ServiceLocatorBase.java:33
  | 77)
  | 16:05:51,406 ERROR [STDERR]     ... 27 more
  | 16:05:51,406 ERROR [STDERR] Caused by: java.lang.ClassCastException: 
$Proxy566
  | 16:05:51,406 ERROR [STDERR]     at 
com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java
  | :212)
  | 16:05:51,406 ERROR [STDERR]     ... 29 more
  | 

It has to be some sort of configuration I need to set up in order to get this 
to work but I can't figure out which one. 

Any help would be greatly appreciated.

Thanks,

François

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980177#3980177

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980177

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to