2 Replies Latest reply on May 6, 2004 9:48 AM by hanssack

    java.lang.reflect.UndeclaredThrowableException

    b_boyle18

      Hey!

      I am getting an exception when I try to get to call a method from my JSP. My JSP calls a method in a session Bean -- getCandidate(ID). This method returns a Local reference to the Candidate EJB with the specified ID. This bit works because I have debugged it and I can see the candidate being retrieved. However, before I even attempt to return this CandidateLocal object to my JSP I get the following error. I know it has something got to do with calling it form my JSP because I call this method from another java class and there are no problems.

      This is the error.

      java.lang.reflect.UndeclaredThrowableException
       at $Proxy1.getCandidate(Unknown Source)
       at com.evote.actionObjects.SessionAccess.getCandLocal(SessionAccess.java:64)
       at org.apache.jsp.pages.voteConfirm$jsp._jspService(voteConfirm$jsp.java:93)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
       at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      Caused by: java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.EntityProxy (no security manager: RMI class loader disabled)
       at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368)
       at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159)
       at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
       at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
       at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
       at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
      .................etc


      THis is my JSP code for calling the session bean. Also the code to get the candidateLocal form my session Bean.

      CandidateLocal candLocal = null;
      candLocal = data.getCandidate(votePref.getCandidateId());
      

      public CandidateLocal getCandidate(String candId)
       {
       CandidateLocal candidateLocal = null;
       try {
       candidateLocal = candidateLocalHome.findByPrimaryKey(candId);
      
       } catch (FinderException e) {
       System.out.println("");
       e.printStackTrace();
       }
       return candidateLocal;
       }



      Id appreciate any help on hte problem if anyone has experienced this before.

      Cheers

      Chris