[ http://jira.jboss.com/jira/browse/JBAS-793?page=history ]
     
Scott M Stark closed JBAS-793:
------------------------------

    Resolution: Done

jboss allows for a non-traditional dodmain based class loading model. 
If you want isolation it needs to be configured. Changes have been introduced 
to simply adding isolated behavior so look into the 4.0.x series and its 
updated support.

http://www.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

> ClassCastException with PortableRemoteObject.narrow using jb
> ------------------------------------------------------------
>
>          Key: JBAS-793
>          URL: http://jira.jboss.com/jira/browse/JBAS-793
>      Project: JBoss Application Server
>         Type: Bug
>     Versions: JBossAS-3.2.6 Final
>     Reporter: SourceForge User
>     Assignee: Scott M Stark
>     Priority: Critical

>
>
> SourceForge Submitter: kgilpin .
>  I have 2 EJB applications which are each deployed with
> a jboss-app.xml file so that they will have separate
> classloader hierarchies. The reason for this is that
> the two applications share some common JAR files such
> as some base utilities, Hibernate beans, and 3rd party
> ones such as struts.
> Both applications have an EJB session bean which
> implements the same home and session interfaces. These
> beans register themselves in JNDI, and a common UI
> finds them in a generic manner and exposes a UI for
> invoking them (the session interface is IScriptRemote).
> The problem occurs when the first application looks up
> the IScriptRemote from the second application in the
> following code. A ClassCastException occurs on the last
> line you see here. Before I created the jboss-app.xml
> files, no exception occurred (but I had other problems
> with LinkerErrors).
> InitialContext ic = J2EEUtil.getInitialContext(port,
> principal, credentials);
> try {
> NamingEnumeration e = ic.listBindings(JNDI_SCRIPT_ROOT);
> while ( e.hasMoreElements() ) {
> Binding binding = (Binding)e.next();
> Object obj = binding.getObject();
> LOG.debug("Got object ", obj, " from binding ", binding);
> try {
> if ( obj instanceof EJBHome ) {
> IScriptRemoteHome home =
> (IScriptRemoteHome)PortableRemoteObject.narrow(obj,
> IScriptRemoteHome.class);
> The reported exception is:
> 15:24:30,609 WARN [Repository] Exception processing
> binding ReloadMetadataScriptHome:
> $Proxy44:ikp/script/ReloadMetadataScriptHomeHome
> java.lang.ClassCastException
> at
> com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
> at
> javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
> at com.ipi.script.Repository.findAll(Repository.java:102)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to