Bugs item #563120, was opened at 2002-05-31 18:45
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=563120&group_id=22866

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: JD Brennan (jazzdevotee)
Assigned to: Nobody/Anonymous (nobody)
Summary: ClassCastException after redeploy

Initial Comment:
Linux (2.2 kernel)
JDK 1.4

=========================================
=======================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/jboss-3.0.0

  JAVA: /opt/j2sdk1.4.0/bin/java

  JAVA_OPTS: -server -Dprogram.name=run.sh

  CLASSPATH: /opt/jboss-
3.0.0/bin/run.jar:/opt/j2sdk1.4.0/lib/tools.jar

=========================================
=======================================

15:15:05,459 INFO  [Server] JBoss Release: JBoss-
3.0.0 CVSTag=JBoss_3_0_0

Steps:

1) call a bean that serializes object X that implements 
interface Y somewhere (I store it in a mysql database).

2) call a bean that deserializes the object and casts
it to the interface Y.

3) redeploy the ejb jar file that contains the bean (hot 
redeploy.  Don't restart JBoss.

4) repeat step 2

Excepted: Same result as Step 2
Actual: ClassCastException


----------------------------------------------------------------------

Comment By: Steve Harvey (sgharvey)
Date: 2002-08-12 03:09

Message:
Logged In: YES 
user_id=593359

Fixed in 3.0.1?

I had the same problem, with a SLSB trying to cast the
result of a JNDI lookup into an EB home type, throwing CCE
after redeployment.  I added reflection code to the SLSB to
examine the class loader delegation chain for both the IF
class and looked up object.  The IF class CL was a
UnifiedClassLoader instance with its originating jar as
repository, but the looked up object had a copy of
jnpserver.jar as the repository for its UCL instance. Upon
redeployment, only the IF class CL got a new UCL instance.

Upon switching to the IBM 1.3 JDK from Sun's 1.4, I
witnessed the same behaviour, minus the CCE being thrown.

Then I noticed that JBoss-3.0.1 was out and tried it and the
problem went totally away, no CCE, and both CL instances
identical.

This was all on Linux 2.2 .

----------------------------------------------------------------------

Comment By: Kenny Smith (subsstuff1)
Date: 2002-06-04 18:07

Message:
Logged In: YES 
user_id=548391

hell no spoke to soon - problem still exists, disguised as a 
different exception:

----
00:03:26,130 ERROR [STDERR] 
java.lang.ClassCastException
00:03:26,130 ERROR [STDERR]     at 
com.sun.corba.se.internal.javax.rmi.PortableR
emoteObject.narrow(PortableRemoteObject.java:293)
00:03:26,140 ERROR [STDERR]     at 
javax.rmi.PortableRemoteObject.narrow(Portabl
eRemoteObject.java:134)
00:03:26,150 ERROR [STDERR]     at 
com.foo.account.AccountUtil.getHome(Unknown Source)
00:03:26,160 ERROR [STDERR]     at 
com.foo.account.AccountRegistryBean.createAccount
(Unknown Source)
00:03:26,170 ERROR [STDERR]     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
00:03:26,180 ERROR [STDERR]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccessorImpl.java:39)
00:03:26,190 ERROR [STDERR]     at 
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
00:03:26,200 ERROR [STDERR]     at 
java.lang.reflect.Method.invoke(Method.java:3
24)
00:03:26,210 ERROR [STDERR]     at 
org.jboss.ejb.StatelessSessionContainer$Conta
inerInterceptor.invoke(StatelessSessionContainer.java:664)
00:03:26,220 ERROR [STDERR]     at 
org.jboss.resource.connectionmanager.CachedCo
nnectionInterceptor.invoke
(CachedConnectionInterceptor.java:186)
00:03:26,230 ERROR [STDERR]     at 
org.jboss.ejb.plugins.StatelessSessionInstanc
eInterceptor.invoke
(StatelessSessionInstanceInterceptor.java:77)
00:03:26,240 ERROR [STDERR]     at 
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:96)
00:03:26,250 ERROR [STDERR]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:167)
00:03:26,260 ERROR [STDERR]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
00:03:26,270 ERROR [STDERR]     at 
org.jboss.ejb.plugins.SecurityInterceptor.inv
oke(SecurityInterceptor.java:129)
00:03:26,280 ERROR [STDERR]     at 
org.jboss.ejb.plugins.LogInterceptor.invoke(L
ogInterceptor.java:166)
00:03:26,300 ERROR [STDERR]     at 
org.jboss.ejb.StatelessSessionContainer.invok
e(StatelessSessionContainer.java:313)
00:03:26,310 ERROR [STDERR]     at 
org.jboss.ejb.Container.invoke(Container.java
:705)
00:03:26,320 ERROR [STDERR]     at 
org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:491)
00:03:26,330 ERROR [STDERR]     at 
org.jboss.invocation.jrmp.server.JRMPInvoker.
invoke(JRMPInvoker.java:362)
00:03:26,340 ERROR [STDERR]     at 
sun.reflect.GeneratedMethodAccessor30.invoke(
Unknown Source)
00:03:26,350 ERROR [STDERR]     at 
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
00:03:26,360 ERROR [STDERR]     at 
java.lang.reflect.Method.invoke(Method.java:3
24)
00:03:26,370 ERROR [STDERR]     at 
sun.rmi.server.UnicastServerRef.dispatch(Unic
astServerRef.java:261)
00:03:26,380 ERROR [STDERR]     at 
sun.rmi.transport.Transport$1.run(Transport.j
ava:148)
00:03:26,390 ERROR [STDERR]     at 
java.security.AccessController.doPrivileged(N
ative Method)
00:03:26,390 ERROR [STDERR]     at 
sun.rmi.transport.Transport.serviceCall(Trans
port.java:144)
00:03:26,400 ERROR [STDERR]     at 
sun.rmi.transport.tcp.TCPTransport.handleMess
ages(TCPTransport.java:460)
00:03:26,410 ERROR [STDERR]     at 
sun.rmi.transport.tcp.TCPTransport$Connection
Handler.run(TCPTransport.java:701)
00:03:26,440 ERROR [STDERR]     at java.lang.Thread.run
(Thread.java:536)


----------------------------------------------------------------------

Comment By: Kenny Smith (subsstuff1)
Date: 2002-06-04 17:34

Message:
Logged In: YES 
user_id=548391

just installed JBoss 3.0.0 (2002.05.31) - problem gone

----------------------------------------------------------------------

Comment By: Bob Cotton (bcotton969)
Date: 2002-06-04 12:07

Message:
Logged In: YES 
user_id=424902

I'm seeing this too. Works ok with sun's 1.3.1_03, fails on 1.4
Linux, 2.4.16. 

I'm working from an exploded .ear directory and touching the
applications.xml file.

- Bob

----------------------------------------------------------------------

Comment By: Kenny Smith (subsstuff1)
Date: 2002-06-04 12:01

Message:
Logged In: YES 
user_id=548391

here is stacktrace, hope it helps:
------


17:59:42,599 ERROR [STDERR] 
java.lang.ClassCastException
17:59:42,619 ERROR [STDERR]     at 
com.sun.corba.se.internal.javax.rmi.PortableR
emoteObject.narrow(PortableRemoteObject.java:293)
17:59:42,639 ERROR [STDERR]     at 
javax.rmi.PortableRemoteObject.narrow(Portabl
eRemoteObject.java:134)
17:59:42,659 ERROR [STDERR]     at 
com.foo.core.AccountBean.createAccount(Unknown Source)
17:59:42,680 ERROR [STDERR]     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(
Native Method)
17:59:42,710 ERROR [STDERR]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccessorImpl.java:39)
17:59:42,730 ERROR [STDERR]     at 
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
17:59:42,750 ERROR [STDERR]     at 
java.lang.reflect.Method.invoke(Method.java:3
24)
17:59:42,770 ERROR [STDERR]     at 
org.jboss.ejb.StatelessSessionContainer$Conta
inerInterceptor.invoke(StatelessSessionContainer.java:664)
17:59:42,800 ERROR [STDERR]     at 
org.jboss.resource.connectionmanager.CachedCo
nnectionInterceptor.invoke
(CachedConnectionInterceptor.java:147)
17:59:42,820 ERROR [STDERR]     at 
org.jboss.ejb.plugins.StatelessSessionInstanc
eInterceptor.invoke
(StatelessSessionInstanceInterceptor.java:77)
17:59:42,840 ERROR [STDERR]     at 
org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:96)
17:59:42,860 ERROR [STDERR]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:167)
17:59:42,890 ERROR [STDERR]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
17:59:42,910 ERROR [STDERR]     at 
org.jboss.ejb.plugins.SecurityInterceptor.inv
oke(SecurityInterceptor.java:129)
17:59:42,930 ERROR [STDERR]     at 
org.jboss.ejb.plugins.LogInterceptor.invoke(L
ogInterceptor.java:166)
17:59:42,950 ERROR [STDERR]     at 
org.jboss.ejb.StatelessSessionContainer.invok
e(StatelessSessionContainer.java:313)
17:59:42,980 ERROR [STDERR]     at 
org.jboss.ejb.Container.invoke(Container.java
:706)
17:59:43,000 ERROR [STDERR]     at 
org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:491)
17:59:43,020 ERROR [STDERR]     at 
org.jboss.invocation.jrmp.server.JRMPInvoker.
invoke(JRMPInvoker.java:364)
17:59:43,040 ERROR [STDERR]     at 
sun.reflect.GeneratedMethodAccessor72.invoke(
Unknown Source)
17:59:43,070 ERROR [STDERR]     at 
sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
17:59:43,090 ERROR [STDERR]     at 
java.lang.reflect.Method.invoke(Method.java:3
24)
17:59:43,130 ERROR [STDERR]     at 
sun.rmi.server.UnicastServerRef.dispatch(Unic
astServerRef.java:261)
17:59:43,160 ERROR [STDERR]     at 
sun.rmi.transport.Transport$1.run(Transport.j
ava:148)
17:59:43,180 ERROR [STDERR]     at 
java.security.AccessController.doPrivileged(N
ative Method)
17:59:43,200 ERROR [STDERR]     at 
sun.rmi.transport.Transport.serviceCall(Trans
port.java:144)
17:59:43,220 ERROR [STDERR]     at 
sun.rmi.transport.tcp.TCPTransport.handleMess
ages(TCPTransport.java:460)
17:59:43,250 ERROR [STDERR]     at 
sun.rmi.transport.tcp.TCPTransport$Connection
Handler.run(TCPTransport.java:701)
17:59:43,270 ERROR [STDERR]     at java.lang.Thread.run
(Thread.java:536)



----------------------------------------------------------------------

Comment By: Kenny Smith (subsstuff1)
Date: 2002-06-04 11:44

Message:
Logged In: YES 
user_id=548391

Same problem here:
redeploy then classcastexception

JBoss 3.0RC2, JVM1.4, winXP
after jboss restart, ok

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-06-04 10:45

Message:
Logged In: NO 

I have similar problem (and the same setup: jboss3.0.0, linux, 
jdk1.4.0)
I'm using JavaBean in application scope for JSP and when I 
redeploy I get ClassCastException. After restart jboss works OK.


----------------------------------------------------------------------

Comment By: Marius Kotsbak (mkotsbak)
Date: 2002-05-31 19:28

Message:
Logged In: YES 
user_id=366650

The problem often disappear when restarting jboss, but I
havent't seen it at all at IBMs 1.3 VM, just sun's 1.4, as
you here. Therefore it can be a VM-bug, or jboss using the
VM in a wrong way.

I think this is the same bug as my #562972.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=563120&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to