Bugs item #643673, was opened at 2002-11-25 15:40
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=643673&group_id=22866
Category: JBossServer
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Alvaro Mota Goncalves (alvaromota)
Assigned to: Nobody/Anonymous (nobody)
Summary: ClassCastException
Initial Comment:
SO - Linux RedHat
JVM 1.3.1-06 Sun , 1.3.1 - Blackdown , 1.4.1 Sun
JBOSS Server 3.0.4 and 3.0.3
A session Bean packaged in a jar file (Session01.jar)
is calling
one entity bean packaged in another jar file
(Entity01.jar) .
Works great.
I have one client in Tomcat in another machine.
If I hot-deploy Session01.jar, it's work. But hot-deploy
Entity01
get
20:34:59,449 ERROR [LogInterceptor] RuntimeException:
java.lang.ClassCastException: $Proxy156
at
com.da.motion.testeAlvaro.model.statelessEJB.SManterTesteEJB.find
All(SManterTes
teEJB.java:75)
The solution is to hot-deploy Entity01 and Session01 in
sequence works fine.
Thanks
Alvaro
----------------------------------------------------------------------
>Comment By: Alvaro Mota Goncalves (alvaromota)
Date: 2002-11-25 18:17
Message:
Logged In: YES
user_id=354157
Hi Mr. Scott
-->Deployments with explicit references to each other must be
deployed as a unit so that the Java type system remains
consistent.
How is possible to make an unexplicit reference to Entity Local
in another ejb-jar.file(Entity01.jar).?
Session --> Entity
The source code is:
private ECepTituloHome getHome() {
ECepTituloHome home = null;
try {
//Implementar o getHome Local para o JBOSS
InitialContext jndi = new InitialContext();
// delete all organizations
home = (ECepTituloHome)
jndi.lookup("ejb/entityEJB/ECepTituloBeanRef");
}
catch (Exception e) {
System.err.println(e.getMessage());
}
finally {
return home;
}
}
The client lookup source code is:
private SManterTesteHome getHome() {
SManterTesteHome home = null;
try {
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "alvaro.rededc.com.br:1099");
Context jndi = new InitialContext(env);
Object ref =
jndi.lookup("ejb/statelessEJB/SManterTesteBeanRef");
home = (SManterTesteHome) PortableRemoteObject.narrow(ref,
SManterTesteHome.class);
}
catch (Exception e) {
System.out.println("A" + e.getMessage());
e.printStackTrace();
}
finally {
return home;
}
}
Thanks
Alvaro
----------------------------------------------------------------------
Comment By: Alvaro Mota Goncalves (alvaromota)
Date: 2002-11-25 18:07
Message:
Logged In: YES
user_id=354157
My enviroment is the following.
1 ) a remote client in a linux machine
2) JBOSS in another machine, Session Fa�ade --> Entity Bean
3 ) Oracle 8.i RDMS
in server/default/deploy/ i have :
- One Remote SLSB in Session01.jar
- One Local Entity in Entity02.jar
First Scenario:
- I change SLSB and make redeploy coping and overwriting
Session01.jar
it works.
Second Scenario:
- I change Entity and make redeploy coping and overwriting
Entity01.jar
I get an error:
ClassCastException $Proxy
- I redeploy Session
it works.
i attached the server log in this message.
What's UCL?
Thanks
Alvaro
----------------------------------------------------------------------
Comment By: Bill Burke (patriot1burke)
Date: 2002-11-25 17:51
Message:
Logged In: YES
user_id=176497
Thanks for clarifying.
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-11-25 17:42
Message:
Logged In: YES
user_id=175228
All that says is that the $Proxy156 does not implement the
interface the proxy is being cast to. This is expected if you
redeploy the entity bean and perform a finder call from the
session bean that has an explicit reference to the previous
version of the entity interface. Unless there is an example
that shows the session bean has no explicit references to
the entity interfaces the redeployment described is not valid.
----------------------------------------------------------------------
Comment By: Bill Burke (patriot1burke)
Date: 2002-11-25 17:32
Message:
Logged In: YES
user_id=176497
Re-opening.
Look at the stack trace. The CCE is around $Proxy156. Is there
something going on between UCL and dynamically generated
classes via java.lang.reflect.Proxy?
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-11-25 16:26
Message:
Logged In: YES
user_id=175228
Deployments with explicit references to each other must be
deployed as a unit so that the Java type system remains
consistent. The type of a class is its fully qualified name +
the class loader that loaded it. You cannot arbitrary redeploy
components and introduce a new type and expect previously
deployed components to continue to work unless the
interaction between the components is completely stateless
with respect to the classes shared between deployments.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=643673&group_id=22866
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development