Bugs item #521058, was opened at 2002-02-21 08:53
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=521058&group_id=22866
Category: JBossServer
Group: v3.0 Rabbit Hole
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Georg Schmid (giorgio42)
Assigned to: Scott M Stark (starksm)
Summary: Argument type mismatch after redeploy
Initial Comment:
Bug:
Deploy hello.jar, then undeploy, then redeploy it
again.
After the redeployment calling the hello method
with a string parameter still works, but passing
a HelloData instance as parameter in the howdy()
method results in an IllegalArgumentException:
2002-02-21 17:36:19,188 INFO
[org.jboss.ejb.EJBDeployer]
Undeploying:file:/D:/apps/jboss/jboss-
3.0.0beta/deploy/hello.jar
2002-02-21 17:36:19,188 INFO
[org.jboss.deployment.MainDeployer] could not delete
directory file:/D:/apps/jboss/jboss-
3.0.0beta/tmp/deploy/70.hello.jar restart will delete
it
2002-02-21 17:36:19,188 INFO
[org.jboss.deployment.MainDeployer] Undeployed
file:/D:/apps/jboss/jboss-3.0.0beta/deploy/hello.jar
2002-02-21 17:36:39,392 INFO
[org.jboss.deployment.MainDeployer] Deploying:
file:/D:/apps/jboss/jboss-3.0.0beta/deploy/hello.jar
2002-02-21 17:36:39,517 INFO
[org.jboss.ejb.EJBDeployer] Deploying HelloWorld
2002-02-21 17:36:44,236 ERROR
[org.jboss.invocation.jrmp.server.JRMPInvoker]
operation failed
java.rmi.ServerException: argument type mismatch;
nested exception is:
java.lang.IllegalArgumentException: argument
type mismatch
java.lang.IllegalArgumentException: argument type
mismatch
at java.lang.reflect.Method.invoke(Native
Method)
at
org.jboss.ejb.StatelessSessionContainer$ContainerInterc
eptor.invoke(StatelessSessionContainer.java:642)
at
org.jboss.ejb.plugins.StatelessSessionInstanceIntercept
or.invoke(StatelessSessionInstanceInterceptor.java:77)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:167)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
at
org.jboss.ejb.StatelessSessionContainer.invoke
(StatelessSessionContainer.java:308)
at org.jboss.ejb.Container.invoke
(Container.java:630)
at
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1555)
at
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:364)
at java.lang.reflect.Method.invoke(Native
Method)
at sun.rmi.server.UnicastServerRef.dispatch
(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown
Source)
at java.security.AccessController.doPrivileged
(Native Method)
at sun.rmi.transport.Transport.serviceCall
(Unknown Source)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages
(Unknown Source)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Context: RH from CVS (less than one hour old)
jdk1.3.1_02 from Sun
JBoss-3.0.0beta CVSTag=Rel_3_0_0_3
Default config
OS-System: Windows NT 4.0,x86
This happens on Windows NT as well as on Solaris.
(On Solaris removing the jar during undeployment works,
on WindowsNT never).
The only way I have found to get around this
is to restart the server.
Georg
----------------------------------------------------------------------
>Comment By: Georg Schmid (giorgio42)
Date: 2002-02-27 07:51
Message:
Logged In: YES
user_id=437570
Scott,
thanks a lot for fixing this so quickly!! (just checked)
The fun is returning... :-)
Georg
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-02-26 21:43
Message:
Logged In: YES
user_id=175228
The MarshalledInvocation class now uses its own
MarshalledValue rather than the rmi MarshalledObject to
ensure class and proxy resolution occurs through the
context class loader.
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-02-26 11:25
Message:
Logged In: YES
user_id=175228
I added debugging to the java.lang.Class.forName method to
catch where the obsolete class was coming from and it is
due to the MarshalledObject resolution of the HelloData
object coming in with the method invocation. The call stack
is:
2002-02-26 11:06:37,828 INFO [STDOUT] Class.forName
(HelloData,boolean,CL=org.jboss.system.UnifiedClassLoader@86
eaae86{ url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/lib/jboss.jar/30.jboss.jar }),
CL=org.jboss.system.UnifiedClassLoader@d1fc5387{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar/64.hello.jar }
2002-02-26 11:06:37,843 ERROR [STDERR] java.lang.Exception:
Stack trace
2002-02-26 11:06:37,843 ERROR [STDERR] at
java.lang.Thread.dumpStack(Thread.java:993)
2002-02-26 11:06:37,843 ERROR [STDERR] at
java.lang.Class.forName(Class.java:205)
2002-02-26 11:06:37,843 ERROR [STDERR] at
java.io.ObjectInputStream.resolveClass
(ObjectInputStream.java:654)
2002-02-26 11:06:37,843 ERROR [STDERR] at
sun.rmi.server.MarshalInputStream.resolveClass
(MarshalInputStream.java:121)
2002-02-26 11:06:37,843 ERROR [STDERR] at
java.io.ObjectInputStream.inputClassDescriptor
(ObjectInputStream.java:918)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.readObject
(ObjectInputStream.java:366)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.readObject
(ObjectInputStream.java:236)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.inputObject
(ObjectInputStream.java:1186)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.readObject
(ObjectInputStream.java:386)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.inputArray
(ObjectInputStream.java:1142)
2002-02-26 11:06:37,859 ERROR [STDERR] at
java.io.ObjectInputStream.readObject
(ObjectInputStream.java:374)
2002-02-26 11:06:37,875 ERROR [STDERR] at
java.io.ObjectInputStream.readObject
(ObjectInputStream.java:236)
2002-02-26 11:06:37,875 ERROR [STDERR] at
java.rmi.MarshalledObject.get(MarshalledObject.java:138)
2002-02-26 11:06:37,875 ERROR [STDERR] at
org.jboss.invocation.MarshalledInvocation.getValue
(MarshalledInvocation.java:281)
2002-02-26 11:06:37,875 ERROR [STDERR] at
org.jboss.invocation.Invocation.getArguments
(Invocation.java:167)
2002-02-26 11:06:37,875 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor
.invoke(StatelessSessionContainer.java:649)
2002-02-26 11:06:37,875 ERROR [STDERR] at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.in
voke(StatelessSessionInstanceInterceptor.java:77)
2002-02-26 11:06:37,875 ERROR [STDERR] at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions
(TxInterceptorCMT.java:167)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.StatelessSessionContainer.invoke
(StatelessSessionContainer.java:308)
2002-02-26 11:06:37,890 ERROR [STDERR] at
org.jboss.ejb.Container.invoke(Container.java:668)
2002-02-26 11:06:37,906 ERROR [STDERR] at
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1555)
2002-02-26 11:06:37,906 ERROR [STDERR] at
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
2002-02-26 11:06:37,906 ERROR [STDERR] at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:364)
2002-02-26 11:06:37,906 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Native Method)
2002-02-26 11:06:37,906 ERROR [STDERR] at
sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:241)
2002-02-26 11:06:37,906 ERROR [STDERR] at
sun.rmi.transport.Transport$1.run(Transport.java:152)
2002-02-26 11:06:37,906 ERROR [STDERR] at
java.security.AccessController.doPrivileged(Native Method)
2002-02-26 11:06:37,921 ERROR [STDERR] at
sun.rmi.transport.Transport.serviceCall(Transport.java:148)
2002-02-26 11:06:37,921 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:465)
2002-02-26 11:06:37,921 ERROR [STDERR] at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(TCPTransport.java:706)
2002-02-26 11:06:37,921 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:484)
The ObjectInputStream.resolveClass method does not use the
thread context class loader. Rather, it uses the first non-
null class loader on the call stack which in this case will
be the class loader for the
org.jboss.invocation.MarshalledInvocation class. This is
the class loader associated with the jboss.jar and this
does not change across deployments of the bean. Therefore,
the VM is again returning the cached class data rather than
asking the class loader for the class again.
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-02-26 09:27
Message:
Logged In: YES
user_id=175228
With the latest changes to unique the tmp/deploy file
copied in from the original, the class loaders dumped out
at the time of exception now show a difference:
2002-02-26 09:28:58,500 ERROR
[org.jboss.ejb.StatelessSessionContainer] Method
DeclaringClassCL:
org.jboss.system.UnifiedClassLoader@66e10648{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar/65.hello.jar }
2002-02-26 09:28:58,515 ERROR
[org.jboss.ejb.StatelessSessionContainer] MethodArgType[0]:
class org.jboss.test.hello.interfaces.HelloData
2002-02-26 09:28:58,515 ERROR
[org.jboss.ejb.StatelessSessionContainer] MethodArgType[0]
ClassLoader: org.jboss.system.UnifiedClassLoader@66e10648{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar/65.hello.jar }
2002-02-26 09:28:58,515 ERROR
[org.jboss.ejb.StatelessSessionContainer] BeanCL:
org.jboss.system.UnifiedClassLoader@66e10648{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar/65.hello.jar }
2002-02-26 09:28:58,531 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]:
org.jboss.test.hello.interfaces.HelloData@104e0d
2002-02-26 09:28:58,531 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]
ClassLoader: org.jboss.system.UnifiedClassLoader@d1fc5387{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar/64.hello.jar }
2002-02-26 09:28:58,531 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]
instanceof: MethodArgType[0] false
The HelloData class is being loaded from the previous
deployment class loader.
----------------------------------------------------------------------
Comment By: Scott M Stark (starksm)
Date: 2002-02-26 08:22
Message:
Logged In: YES
user_id=175228
The HelloData class is not seen to be an instance of the
bean method's argument signature type even though they have
the same class loader instance. If I catch the
IllegalArgumentException and dump out the ejb method sig
classes and classloaders they match the incoming argument
data, and yet, the arg data is not seen to be an instance
of the signature class.
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] Failed to invoke
method: public java.lang.String
org.jboss.test.hello.ejb.HelloBean.howdy
(org.jboss.test.hello.interfaces.HelloData)
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] Method
DeclaringClassCL:
org.jboss.system.UnifiedClassLoader@bd89e22d{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar }
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] MethodArgType[0]:
class org.jboss.test.hello.interfaces.HelloData
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] MethodArgType[0]
ClassLoader: org.jboss.system.UnifiedClassLoader@bd89e22d{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar }
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] BeanCL:
org.jboss.system.UnifiedClassLoader@bd89e22d{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar }
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]:
org.jboss.test.hello.interfaces.HelloData@538974
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]
ClassLoader: org.jboss.system.UnifiedClassLoader@bd89e22d{
url=file:/D:/usr/local/src/cvsroot/Main/jboss-
all/build/output/jboss-
3.0.0beta2/tmp/deploy/D/usr/local/src/cvsroot/Main/jboss-
all/testsuite/output/lib/hello.jar }
2002-02-26 08:27:17,312 ERROR
[org.jboss.ejb.StatelessSessionContainer] arg[0]
instanceof: MethodArgType[0] false
----------------------------------------------------------------------
Comment By: David Jencks (d_jencks)
Date: 2002-02-26 05:15
Message:
Logged In: YES
user_id=60525
I think this is the "remote" version of the problem with
classloaders seen in 516684 and 519699. If so it should be
fixed only when we run on jbossmx. Any other opinions?
david jencks
----------------------------------------------------------------------
Comment By: Georg Schmid (giorgio42)
Date: 2002-02-23 06:09
Message:
Logged In: YES
user_id=437570
The easiest way to reproduce this error is to
run the test suite a second time without restarting
the server. After the second run has completed:
testsuite\output\log>grep -n IllegalArgumentException
*.log|wc -l
10
Some BeanUnitTestCase suffers from the same problem.
This really gives me the breaks with JBoss, because
I have to restart the server each time I need to
redeploy an EJB.
Any ideas? Any help?
If someone is willing to point me in the right direction
I'll attack this myself (have to), but currently
I have no clue what could cause these exceptions.
(I've been working all day with JBoss
for the last two and a half month, making transitions
from 2.4.4 to 3.0alpha to 3.0beta. Now that my project
is approaching production mode, JBoss seems kind of messed
up.
And the 3.0alpha from the first half of January looked
so good... but with all the changes in jbosscmp-jdbc.xml
I could not go back even if I had a backup
of that version.
Sigh.
Georg
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=521058&group_id=22866
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development