Scott,
I upgraded to jboss-3.0.4_tomcat-4.0.6, but I still have the exact same
problem. Everything works fine when I first start JBoss and deploy the
.ear, but as soon as I re-deploy the .ear, I get the ClassCastException.
This happens even when I remove the .jar and .ear files from the deploy
directory completely, then re-deploy them. Could this be a problem with my
web.xml and jboss-web.xml files, or is it unrelated? This strikes me as a
pretty serious problem -- see any solution?
The full error I am getting, if it helps, is:
java.lang.ClassCastException
at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemo
teObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at
com.pc.servlets.RegistrationServlet.doRequest(RegistrationServlet.java:40)
at com.pc.servlets.BaseServlet.doPost(BaseServlet.java:33)
at com.pc.servlets.BaseServlet.doGet(BaseServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:465)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:683)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:431)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:355)
at com.pc.servlets.RouterServlet.doRequest(RouterServlet.java:28)
at com.pc.servlets.BaseServlet.doPost(BaseServlet.java:33)
at com.pc.servlets.BaseServlet.doGet(BaseServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
:465)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:475)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
at java.lang.Thread.run(Thread.java:536)
From: "Scott M Stark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: [JBoss-user] ClassCastException on redeploy of .ear
Date: Sun, 3 Nov 2002 09:50:30 -0800
Organization: JBoss Group, LLC
Reply-To: [EMAIL PROTECTED]
This is a multi-part message in MIME format.
------=_NextPart_000_003B_01C2831E.71BE4E30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Bug in 3.0.0. Upgrade to 3.0.4.
xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx
----- Original Message -----=20
From: John Snyder=20
To: [EMAIL PROTECTED]=20
Sent: Sunday, November 03, 2002 9:31 AM
Subject: [JBoss-user] ClassCastException on redeploy of .ear
Hello all,
Using jboss-3.0.0_tomcat-4.0.3, I am trying to access a Session bean =
called Registration from within a servlet, both of which are part of an =
application called pc, deployed as pc.ear. Here is the code I'm using =
to do it:
=20
Context jndiContext =3D getInitialContext();
Object ref =3D jndiContext.lookup("RegistrationHomeRemote");
RegistrationHomeRemote registrationHome =3D (RegistrationHomeRemote)
PortableRemoteObject.narrow(ref,RegistrationHomeRemote.class);=20
RegistrationRemote registration =3D registrationHome.create();=20
registration.remove();
=20
Everything works fine when I start jboss fresh and deploy the ear. =
However, as soon as I make a change to any file and re-deploy the ear, I =
get a ClassCastException at the third line. I'm totally stumped - why =
would it work on initial deployment, then stop working on =
re-deployment??? Any help would be most appreciated.
=20
My deployment configuration files are as follows:
=20
ejb.jar:
<session>
<display-name>Registration</display-name>=20
<ejb-name>Registration</ejb-name>=20
<home>com.pc.ejb.session.interfaces.RegistrationHomeRemote</home>
<remote>com.pc.ejb.session.interfaces.RegistrationRemote</remote>
<ejb-class>com.pc.ejb.session.beans.RegistrationBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>=20
</session>
jboss.xml:
<session>
<ejb-name>Registration</ejb-name>
<jndi-name>RegistrationHomeRemote</jndi-name>
</session>
web.xml:
<servlet>
<servlet-name>RegistrationServlet</servlet-name>
<servlet-class>com.pc.servlets.RegistrationServlet</servlet-class>
</servlet>
<ejb-ref>
<ejb-ref-name>Registration</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>RegistrationHomeRemote</home>
<remote>RegistrationRemote</remote>
<ejb-link>Registration</ejb-link>
</ejb-ref>
jboss-web.xml:
<ejb-ref>
<ejb-ref-name>Registration</ejb-ref-name>
<jndi-name>pc/RegistrationHomeRemote</jndi-name>
</ejb-ref>
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user