cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peeths <anoop_...@yahoo.co.in>
Subject cocoon with ejb
Date Tue, 21 Jun 2005 18:32:05 GMT
hi,


i'm getting a class cast exception wen i deployed an
ejb in cocoon , 

i'm calling the bean from a js file data.js by 
   
   var query = new Packages.hibernate.logging.Query();
and the bean client is 

package hibernate.logging;

import java.rmi.RemoteException;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;

import org.hibernate.Session;

import com.openize.TestStatelessSessionHome;
import com.openize.TestStatelessSessionRemote;

/**
 * 
 */

/**
 * @author peeths
 *
 */
public class Query {

	public String find(String user, String
password,Session session){
	try
	{
		Properties p=new Properties();
	
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
		p.put(Context.PROVIDER_URL,"jnp://localhost:1099");
		Context ctx=new InitialContext(p);
	
		System.out.println("find function called");
	
		TestStatelessSessionHome
home=(TestStatelessSessionHome)ctx.lookup("ejb/TestStatelessSession");
		TestStatelessSessionRemote
remote=(TestStatelessSessionRemote)home.create();
		String value =
remote.Validate(user,password,session);
		
		return value;
		}
		catch (Exception e) 
		{
			e.printStackTrace();
		}
		return "true";
	}
	
	}

when running the bean as normal ejb its working but
when i integrated in cocoon it showing tis error , can
u please help me 




java.lang.ClassCastException:
org.apache.naming.resources.FileDirContext
        at
org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:185)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
       at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
        at
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.apache.catalina.core.StandardContext.init(StandardContext.java:5441)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
        at
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:336)
        at
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:83)
        at
org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:370)
       at
org.jboss.web.WebModule.startModule(WebModule.java:62)
        at
org.jboss.web.WebModule.startService(WebModule.java:40)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
        at
sun.reflect.GeneratedMethodAccessor2.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
        at $Proxy0.start(Unknown Source)
        at
org.jboss.system.ServiceController.start(ServiceController.java:416)
        at
sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy24.start(Unknown Source)
        at
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:362)
        at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
        at
sun.reflect.GeneratedMethodAccessor36.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy8.deploy(Unknown Source)
        at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
        at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
        at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
        at
sun.reflect.GeneratedMethodAccessor2.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
        at $Proxy0.start(Unknown Source)
        at
org.jboss.system.ServiceController.start(ServiceController.java:416)
        at
sun.reflect.GeneratedMethodAccessor5.invoke(Unknown
Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy4.start(Unknown Source)
        at
org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
        at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
        at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:693)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
java.lang.reflect.Method.invoke(Method.java:585)
        at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
        at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
        at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
        at
org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
        at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
        at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
        at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
        at $Proxy5.deploy(Unknown Source)
        at
org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:396)
        at
org.jboss.system.server.ServerImpl.start(ServerImpl.java:293)
        at org.jboss.Main.boot(Main.java:151)
        at org.jboss.Main$1.run(Main.java:405)
        at java.lang.Thread.run(Thread.java:595)




regards 
Peeths


		
_______________________________________________________
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message