[jboss-user] [EJB 3.0] - Problem with jboss-4.0.4.GA doing lookup for EJB3.0

vedgunjan do-not-reply at jboss.com
Tue Aug 8 04:23:49 EDT 2006


Hi Experts,
Im using jboss-4.0.4.GA and trying to lookup for ejb from the web client.It throws exception while doing a look up for the remote service.
I have run the patch also.
The same remote is looked up properly in the jboss-4.0.4.CR2 
Here's the exception 
------------------------------------------------------------------------------
java.lang.ClassCastException: cannot assign instance of org.jboss.ejb3.proxy.EJBMetaDataImpl to field org.jboss.ejb3.session.BaseSessionRemoteProxy.ejbMetaData of type javax.ejb.EJBMetaData in instance of org.jboss.ejb3.stateless.StatelessRemoteProxy
13:21:33,745 ERROR [STDERR] 	at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:1977)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1157)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1918)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
13:21:33,761 ERROR [STDERR] 	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
13:21:33,777 ERROR [STDERR] 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
13:21:33,777 ERROR [STDERR] 	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
13:21:33,777 ERROR [STDERR] 	at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
13:21:33,777 ERROR [STDERR] 	at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
13:21:33,777 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
13:21:33,777 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
13:21:33,777 ERROR [STDERR] 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
13:21:33,777 ERROR [STDERR] 	at com.yagnaiq.core.service.impl.YagnaIQServiceLocator.getRequirementService(YagnaIQServiceLocator.java:50)
13:21:33,777 ERROR [STDERR] 	at com.yagnaiq.backing.beans.RequirementAnalyzerBean.createQuestionSet(RequirementAnalyzerBean.java:234)
13:21:33,777 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:21:33,777 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
13:21:33,792 ERROR [STDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:21:33,792 ERROR [STDERR] 	at java.lang.reflect.Method.invoke(Method.java:585)
13:21:33,792 ERROR [STDERR] 	at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
13:21:33,792 ERROR [STDERR] 	at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
13:21:33,792 ERROR [STDERR] 	at javax.faces.component.UICommand.broadcast(UICommand.java:106)
13:21:33,792 ERROR [STDERR] 	at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
13:21:33,792 ERROR [STDERR] 	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
13:21:33,792 ERROR [STDERR] 	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
13:21:33,792 ERROR [STDERR] 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
13:21:33,792 ERROR [STDERR] 	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
13:21:33,792 ERROR [STDERR] 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
13:21:33,808 ERROR [STDERR] 	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
13:21:33,808 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
13:21:33,808 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
13:21:33,824 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
13:21:33,824 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
13:21:33,824 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
13:21:33,824 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
13:21:33,824 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
13:21:33,824 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
13:21:33,824 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
13:21:33,824 ERROR [STDERR] 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
13:21:33,824 ERROR [STDERR] 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
13:21:33,824 ERROR [STDERR] 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
13:21:33,839 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:595)
---------------------------------------------------------
The lookup code is:
Hashtable environment = new Hashtable();
		environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
		environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
		environment.put(Context.PROVIDER_URL, "jnp://localhost:1099"); // remote machine IP
		InitialContext context = new InitialContext(environment);
		requirementService = (RequirementService)context.lookup("/RequirementServiceImpl/remote"); //ejb-name
    	System.out.println("-->> lookup object successfully");
	}
	catch (NamingException e)
	{
		e.getMessage();
		e.getCause();
	e.printStackTrace();
	}
	catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

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

Can any one suggest me as to what must be the possible reason and what is the solution for it.

Thanks
Ved

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

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



More information about the jboss-user mailing list