[jboss-user] [JNDI/Naming/Network] - ClassCastException with proxy

srinivasan544 do-not-reply at jboss.com
Fri Jun 22 06:49:39 EDT 2007


Hi 

Im using EJB3 with Jboss-4.0.4.GA app server. I have deployed an ear file containing -jar file -> a stateless session bean, 
          and war file -> servlet. 

In the servlet class when I look up the bean. The look up is successful, but when I cast it to bean interface the following exception is thrown. 

03:39:34,999 ERROR [STDERR] java.lang.ClassCastException: $Proxy380
  | 03:39:35,000 ERROR [STDERR]     at com.test.util.MyServiceLocator.locateMyService(MyServiceLocator.java:44)
  | 03:39:35,000 ERROR [STDERR]     at com.test.web.command.impl.MyCommandProcessor.execute(MyCommandProcessor.java:56)
  | 03:39:35,000 ERROR [STDERR]     at com.test.web.controller.MyController.processExecute(MyController.java:109)
  | 03:39:35,000 ERROR [STDERR]     at com.test.web.controller.MyController.doGet(MyController.java:75)
  | 03:39:35,000 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
  | 03:39:35,000 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 03:39:35,000 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 03:39:35,000 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 03:39:35,000 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | 03:39:35,001 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 03:39:35,001 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 03:39:35,001 ERROR [STDERR]     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 03:39:35,002 ERROR [STDERR]     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 03:39:35,002 ERROR [STDERR]     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 03:39:35,002 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:613)

Please help me to resolve the problem.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056810#4056810

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056810



More information about the jboss-user mailing list