Newsgroup: it.comp.java
Titolo: [HELP] java.lang.ClassNotFoundException: webservice.server.Parameter (no security manager: RMI class loader disabled)

im  having problem accessing to an EJB from a servlet
<code : class used in the servlet >
      import javax.naming.*;
      import webservice.EJB.Database.*;
      import java.util.*;
      import org.jdom.*;
      import java.sql.*;
      import java.text.*;
      import java.util.Vector;
      import java.util.Locale;
      import javax.ejb.*;
      import java.rmi.RemoteException;
      import javax.rmi.PortableRemoteObject;
      import javax.sql.RowSet;
      .........
      ..........
      querystmt = ContentParser.getSQLStatement(queryElement);
      Vector params = querystmt.getParameters(); **this vector contains
several Parameter obj**
      DatabaseEngine db = sm.getDatabaseEngine(); ** this is the EJB**
      try{
          resultSet = db.executeQuery(querystmt.getSQL(), params,
sm.getServerLocale());**here i got the exception**
      }catch(RemoteException e){
          e.printStackTrace();
      }
<code : Parameter.class >
    package webservice.server;
    import java.io.Serializable;
    public class Parameter implements Serializable{
        String myClass;
        String value;
        public Parameter(String myClass, String value) {
            this.myClass = myClass;
            this.value = value;
        }
        public String getParamClass(){
              return this.myClass;
        }
        public String getValue(){
              return this.value;
        }
    }
the parameter class is also inside the EJB Database package
this is the stack trace of the exception thrown
<***************************************************************************
****************>
ApplicationDispatcher[/webservice]: Servlet.service() for servlet
AgentsHandler threw exception
java.lang.reflect.UndeclaredThrowableException:
java.lang.ClassNotFoundException: webservice.server.Parameter (no security
manager: RMI class loader disabled)
 at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
 at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
 at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown
Source)
 at
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericPr
oxy.java:357)
 at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless
SessionProxy.java:123)
 at $Proxy3.executeQuery(Unknown Source)
 at webservice.server.QueryBean.populate(QueryBean.java:56)
 at webservice.server.AgentsHandler.processRequest(AgentsHandler.java:149)
 at webservice.server.AgentsHandler.doPost(AgentsHandler.java:85)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:679)
 at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch
er.java:403)
 at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher
.java:355)
 at
webservice.server.AgentsConnector.processRequest(AgentsConnector.java:20)
 at webservice.server.AgentsConnector.doPost(AgentsConnector.java:28)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 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:201)
 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.StandardContext.invoke(StandardContext.java:2344)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 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.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
:163)
 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:
1011)
 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
 at java.lang.Thread.run(Thread.java:484)
****************************************************************************
*****************
for debugging im using jbuilder 6
and before this i've tested the databaseEJB with a test client and it works
fine
i think there is something missing in the web server conf (tomcat) or in my
servlet
im a newbie

