8 Replies Latest reply on Jul 16, 2009 6:15 PM by Fabricio Raphael

    Error in a web application on JBoss: javax.servlet.ServletEx

    Fabricio Raphael Newbie

      The following page the error occurs during execution of a web application in JBoss:

      HTTP Status 500 -
      
      type Exception report
      
      message
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: Wrapper cannot find servlet class XXXServlet or a class it depends on
       org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:81)
       org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:177)
       org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
       org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
       org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
       org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
       org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
       org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       java.lang.Thread.run(Thread.java:619)
      
      root cause
      
      java.lang.ClassNotFoundException: XXXServlet
       java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       java.security.AccessController.doPrivileged(Native Method)
       java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       java.lang.ClassLoader.loadClass(ClassLoader.java:252)
       org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:81)
       org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:177)
       org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
       org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
       org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
       org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
       org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
       org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       java.lang.Thread.run(Thread.java:619)
      
      note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.
      Apache Tomcat/5.0.30
      


      I think that has something to do with web.xml descriptor.

      Contents of web.xml:
      <?xml version="1.0" encoding="ISO-8859-1"?>
      
      <!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
       "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
      
      <web-app>
       <servlet>
       <servlet-name>XXXServlet</servlet-name>
       <servlet-class>XXXServlet</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>XXXServlet</servlet-name>
       <url-pattern>/XXXServlet</url-pattern>
       </servlet-mapping>
       <welcome-file-list>
       <welcome-file>principal.jsp</welcome-file>
       </welcome-file-list>
      
       <resource-ref>
       ...
       </resource-ref>
      
       <session-config>
       <session-timeout>30</session-timeout>
       </session-config>
      
      </web-app>
      


      And to ensure that the XXXServlet.class is at the correct location, is displayed below of the output of command:
      jar -tf <folder-jboss_deploy>/.war

      ~$ jar -tf <folder-jboss_deploy>/xxx.war
      ...
      META-INF/ejb-jar.xml
      META-INF/jboss.xml
      WEB-INF/classes/XXXServlet.class
      WEB-INF/classes/com/jspsmart/upload/File.class
      WEB-INF/classes/com/jspsmart/upload/File.class.hacked
      WEB-INF/classes/com/jspsmart/upload/File.class.original
      WEB-INF/classes/com/jspsmart/upload/Files.class
      ...
      


      Someone could help me this problem?

      Now, thanks!

        • 1. Re: Error in a web application on JBoss: javax.servlet.Servl
          Peter Johnson Master

          Try placing XXXServlet in a package. Packageless servlets have been know not to work.

          • 2. Re: Error in a web application on JBoss: javax.servlet.Servl
            Fabricio Raphael Newbie

             

            "PeterJ" wrote:
            Try placing XXXServlet in a package. Packageless servlets have been know not to work.


            I did what you said. I placed XXXServlet in the package:
            com.trails.xxx.web

            So the code of the my web.xml is:
            <web-app>
             <servlet>
             <servlet-name>XXXServlet</servlet-name>
             <servlet-class>com.trails.xxx.web.XXXServlet</servlet-class>
             </servlet>
             <servlet-mapping>
             <servlet-name>XXXServlet</servlet-name>
             <url-pattern>/XXXServlet</url-pattern>
             </servlet-mapping>
             <welcome-file-list>
             <welcome-file>principal.jsp</welcome-file>
             </welcome-file-list>
            
             <resource-ref>
             ...
             </resource-ref>
            
             <session-config>
             <session-timeout>30</session-timeout>
             </session-config>
            </web-app>
            


            And the exception ocurred again:
            exception
            
            javax.servlet.ServletException: Wrapper cannot find servlet class com.trails.xxx.web.XXXServlet or a class it depends on
             org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:81)
             org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:177)
             org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
             org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
             org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
             org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
             org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
             org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
             java.lang.Thread.run(Thread.java:619)
            


            Did I make any mistake?
            Any other suggestions?

            • 3. Re: Error in a web application on JBoss: javax.servlet.Servl
              Peter Johnson Master

              In your first post you also listed the contents of the WAR file. I hope that the servlet is now at

              WEB-INF/classes/com/trails/xxx/web/XXXServlet.class

              By the way, you never posted the XXXServlet class source code. What other classes is XXServlet using? It could be that one of those classes is missing.

              • 4. Re: Error in a web application on JBoss: javax.servlet.Servl
                Fabricio Raphael Newbie

                 

                "PeterJ" wrote:
                In your first post you also listed the contents of the WAR file. I hope that the servlet is now at

                WEB-INF/classes/com/trails/xxx/web/XXXServlet.class

                By the way, you never posted the XXXServlet class source code. What other classes is XXServlet using? It could be that one of those classes is missing.


                Yes, the servlet is at: WEB-INF/classes/com/trails/xxx/web/XXXServlet.class

                ~$ jar -tf <folder-jboss_deploy>/xxx.war
                ...
                WEB-INF/classes/com/trails/xxx/util/XXXUtil.class
                WEB-INF/classes/com/trails/xxx/web/XXXConst.class
                WEB-INF/classes/com/trails/xxx/web/XXXServlet.class
                WEB-INF/classes/com/trails/xxx/web/XXXValueFormatter.class
                WEB-INF/classes/com/trails/xxx/web/CacheHolder.class
                ...
                



                Follow the code of the XXXServlet:

                package com.trails.xxx.web;
                import javax.servlet.ServletException;
                
                import org.apache.log4j.Category;
                
                import com.trails.xxx.web.collection.ActionContaCollection;
                import com.trails.xxx.web.collection.ActionPontosCriticosCollection;
                import com.trails.xxx.web.collection.AllowedOperationsCollection;
                import com.trails.xxx.web.collection.AssuntosParaConselhoCollection;
                import com.trails.xxx.web.collection.CenarioCollection;
                import com.trails.xxx.web.collection.ColunaRelatorioCollection;
                import com.trails.xxx.web.collection.ComentarioContaCollection;
                import com.trails.xxx.web.collection.ContaCollection;
                import com.trails.xxx.web.collection.EmpresaCollection;
                import com.trails.xxx.web.collection.EndividamentoCollection;
                import com.trails.xxx.web.collection.EstiloCollection;
                import com.trails.xxx.web.collection.FinanciamentoCollection;
                import com.trails.xxx.web.collection.GiveOperationCollection;
                import com.trails.xxx.web.collection.GiveRoleCollection;
                import com.trails.xxx.web.collection.GrupoContaCollection;
                import com.trails.xxx.web.collection.GrupoRelatorioCollection;
                import com.trails.xxx.web.collection.ListComentarioContaCollection;
                import com.trails.xxx.web.collection.OperationCollection;
                import com.trails.xxx.web.collection.OperationRoleCollection;
                import com.trails.xxx.web.collection.PaginaRelatorioCollection;
                import com.trails.xxx.web.collection.PapelCollection;
                import com.trails.xxx.web.collection.PasswordCollection;
                import com.trails.xxx.web.collection.PeriodoCollection;
                import com.trails.xxx.web.collection.PlanoCollection;
                import com.trails.xxx.web.collection.PlanoContaCollection;
                import com.trails.xxx.web.collection.PlanoContaRelatorioCollection;
                import com.trails.xxx.web.collection.PontosCriticosCollection;
                import com.trails.xxx.web.collection.PontosRelevantesCollection;
                import com.trails.xxx.web.collection.TipoPlanoCollection;
                import com.trails.xxx.web.collection.UserRoleCollection;
                import com.trails.xxx.web.collection.UsuarioCollection;
                import com.trails.xxx.web.command.XXXUpdateSession;
                import com.trails.xxx.web.command.CalculaPeriodoCommand;
                import com.trails.xxx.web.command.ConferirPeriodoCommand;
                import com.trails.xxx.web.command.DeletePeriodoCommand;
                import com.trails.xxx.web.command.DesoficializarPeriodoCommand;
                import com.trails.xxx.web.command.InserirValoresCommand;
                import com.trails.xxx.web.command.InternalTest;
                import com.trails.xxx.web.command.MostraValoresCommand;
                import com.trails.xxx.web.command.OficializarPeriodoCommand;
                import com.trails.xxx.web.command.ShortcutCommand;
                import com.trails.xxx.web.command.TrocaPasswordIdaCommand;
                import com.trails.xxx.web.command.TrocaPasswordVoltaCommand;
                import com.trails.xxx.web.command.VerificaPeriodoCommand;
                import com.trails.xxx.web.command.VerificaPlanoContaCommand;
                import com.trails.xxx.web.items.XXXCollectionTable;
                import com.trails.xxx.web.items.XXXPage;
                import com.trails.xxx.web.report.command.CalculateReportCommand;
                import com.trails.xxx.web.report.command.CalculateReportMonthCommand;
                import com.trails.xxx.web.report.command.GenerateReportCommand;
                import com.trails.xxx.web.report.command.ReportFormCommand;
                import com.trails.xxx.web.report.command.ResumoMenu;
                import com.trails.xxx.web.report.items.ReportFormIntervaloMensalItem;
                import com.trails.xxx.web.report.items.ReportFormMesItem;
                import com.trails.engine.web.collection.ValueObjectCollection;
                import com.trails.engine.web.command.DeleteCommand;
                import com.trails.engine.web.command.InsertCommand;
                import com.trails.engine.web.command.NullCommand;
                import com.trails.engine.web.command.PageCommand;
                import com.trails.engine.web.command.UpdateCommand;
                import com.trails.engine.web.items.DeleteForm;
                import com.trails.engine.web.items.ErrorPage;
                import com.trails.engine.web.items.InsertForm;
                import com.trails.engine.web.items.Page;
                import com.trails.engine.web.items.PageItem;
                import com.trails.engine.web.items.UpdateForm;
                import com.trails.engine.web.items.ViewForm;
                import com.trails.engine.web.servlet.OutputParameters;
                import com.trails.engine.web.servlet.PageServlet;
                
                public class XXXServlet extends PageServlet {
                 // Pega a instancia para o LOG4J
                 private static Category logger = Category.getInstance(XXXServlet.class);
                
                 public static final String APPLICATION_NAME = "XXX - Opportunity";
                 public static final String APPLICATION_STYLESHEET = "/estilo.css";
                
                 public XXXServlet() {
                 super();
                 // Adiciona acoes
                 addAction("view", XXXConst.ACTION_VIEW);
                 addAction("executeUpdateSession",
                 XXXConst.ACTION_EXECUTE_SESSION_UPDATE);
                 addAction("list", XXXConst.ACTION_LIST);
                 addAction("insert", XXXConst.ACTION_INSERT);
                 addAction("executeInsert", XXXConst.ACTION_EXECUTE_INSERT);
                 addAction("update", XXXConst.ACTION_UPDATE);
                 addAction("executeUpdate", XXXConst.ACTION_EXECUTE_UPDATE);
                 addAction("delete", XXXConst.ACTION_DELETE);
                 addAction("executeDelete", XXXConst.ACTION_EXECUTE_DELETE);
                 addAction("report", XXXConst.ACTION_REPORT);
                 addAction("executeReport", XXXConst.ACTION_EXECUTE_REPORT);
                 addAction("executeVerificarPlanoConta",
                 XXXConst.ACTION_EXECUTE_VERIFICAR_PLANO_CONTA);
                 addAction("executeVerificarPeriodo",
                 XXXConst.ACTION_EXECUTE_VERIFICAR_PERIODO);
                 addAction("executeCalculaPeriodo",
                 XXXConst.ACTION_EXECUTE_CALCULA_PERIODO);
                 addAction("calculateReport", XXXConst.ACTION_CALCULATE_REPORT);
                 addAction("executeCalculateReport",
                 XXXConst.ACTION_EXECUTE_CALCULATE_REPORT);
                 addAction("deletePeriodo", XXXConst.ACTION_DELETE_PERIODO);
                 addAction("viewMultiValue", XXXConst.ACTION_VIEW_MULTI_VALUE);
                 addAction("insertMultiValue", XXXConst.ACTION_INSERT_MULTI_VALUE);
                 addAction("test", XXXConst.ACTION_TEST);
                 addAction("resumo", XXXConst.ACTION_RESUMO);
                 addAction("executeConferirPeriodo",
                 XXXConst.ACTION_EXECUTE_CONFERIR_PERIODO);
                 addAction("oficializarPeriodo", XXXConst.ACTION_OFICIALIZAR_PERIODO);
                 addAction("executeOficializarPeriodo",
                 XXXConst.ACTION_EXECUTE_OFICIALIZAR_PERIODO);
                 addAction("executeDesoficializarPeriodo",
                 XXXConst.ACTION_EXECUTE_DESOFICIALIZAR_PERIODO);
                 addAction("executeTrocaSenhaIda",
                 XXXConst.ACTION_EXECUTE_TROCA_SENHA_IDA);
                 addAction("executeTrocaSenhaVolta",
                 XXXConst.ACTION_EXECUTE_TROCA_SENHA_VOLTA);
                 addAction("pdf", XXXConst.ACTION_EXECUTE_GERA_PDF);
                 addAction("shortcut", XXXConst.ACTION_SHORTCUT);
                 addAction("listShortcut", XXXConst.ACTION_LIST_SHORTCUT);
                 addAction("calculateReportMonth",
                 XXXConst.ACTION_CALCULATE_REPORT_MONTH);
                 addAction("executeCalculateReportMonth",
                 XXXConst.ACTION_EXECUTE_CALCULATE_REPORT_MONTH);
                
                 // Adiciona classes
                 addClass("Cenario", XXXConst.CLASS_CENARIO);
                 addClass("Conta", XXXConst.CLASS_CONTA);
                 addClass("Empresa", XXXConst.CLASS_EMPRESA);
                 addClass("GrupoConta", XXXConst.CLASS_GRUPO_CONTA);
                 addClass("Plano", XXXConst.CLASS_PLANO);
                 addClass("PlanoConta", XXXConst.CLASS_PLANO_CONTA);
                 addClass("PlanoContaRelatorio", XXXConst.CLASS_PLANO_CONTA_RELATORIO);
                 addClass("Periodo", XXXConst.CLASS_PERIODO);
                 addClass("TipoPlano", XXXConst.CLASS_TIPOPLANO);
                
                 addClass("Usuario", XXXConst.CLASS_USUARIO);
                 addClass("Papel", XXXConst.CLASS_PAPEL);
                 addClass("Operacao", XXXConst.CLASS_OPERACAO);
                 addClass("Allowed", XXXConst.CLASS_ALLOWED);
                 addClass("UserRole", XXXConst.CLASS_USERROLE);
                 addClass("GiveRole", XXXConst.CLASS_GIVEROLE);
                 addClass("OperationRole", XXXConst.CLASS_OPERATIONROLE);
                 addClass("GiveOperation", XXXConst.CLASS_GIVEOPERATION);
                 addClass("Password", XXXConst.CLASS_PASSWORD);
                
                 addClass("ColunaRelatorio", XXXConst.CLASS_COLUNARELATORIO);
                 addClass("GrupoRelatorio", XXXConst.CLASS_GRUPO_RELATORIO);
                 addClass("PaginaRelatorio", XXXConst.CLASS_PAGINARELATORIO);
                
                 addClass("Estilo", XXXConst.CLASS_ESTILO);
                
                 addClass("ListComentarioConta", XXXConst.CLASS_LISTCONTACOMENTARIO);
                 addClass("ComentarioConta", XXXConst.CLASS_CONTACOMENTARIO);
                 addClass("ActionConta", XXXConst.CLASS_ACAOCONTA);
                 addClass("AssuntosParaConselho", XXXConst.CLASS_ASSUNTOCONSELHO);
                 addClass("PontosCriticos", XXXConst.CLASS_PONTOSCRITICOS);
                 addClass("ActionPontosCriticos", XXXConst.CLASS_ACAOPONTOSCRITICOS);
                 addClass("PontosRelevantes", XXXConst.CLASS_PONTOSRELEVANTES);
                 addClass("Endividamento", XXXConst.CLASS_ENDIVIDAMENTO);
                 addClass("Financiamento", XXXConst.CLASS_FINANCIAMENTO);
                
                 addClass("Pdf", XXXConst.CLASS_PDF);
                 }
                
                 protected PageCommand getCommand(int actionDescriptor,
                 OutputParameters parameters) throws ServletException {
                 PageCommand command = null;
                 switch (actionDescriptor) {
                 case XXXConst.ACTION_EXECUTE_SESSION_UPDATE:
                 command = new XXXUpdateSession();
                 break;
                 case XXXConst.ACTION_EXECUTE_INSERT:
                 command = new InsertCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_UPDATE:
                 command = new UpdateCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_DELETE:
                 command = new DeleteCommand();
                 break;
                 case XXXConst.ACTION_VIEW_MULTI_VALUE:
                 command = new MostraValoresCommand();
                 break;
                 case XXXConst.ACTION_INSERT_MULTI_VALUE:
                 command = new InserirValoresCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_VERIFICAR_PLANO_CONTA:
                 command = new VerificaPlanoContaCommand();
                 break;
                 case XXXConst.ACTION_REPORT:
                 command = new ReportFormCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_REPORT:
                 command = new GenerateReportCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_VERIFICAR_PERIODO:
                 command = new VerificaPeriodoCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_CONFERIR_PERIODO:
                 command = new ConferirPeriodoCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_CALCULA_PERIODO:
                 command = new CalculaPeriodoCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_CALCULATE_REPORT:
                 command = new CalculateReportCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_CALCULATE_REPORT_MONTH:
                 command = new CalculateReportMonthCommand();
                 break;
                 case XXXConst.ACTION_DELETE_PERIODO:
                 command = new DeletePeriodoCommand();
                 break;
                 case XXXConst.ACTION_TEST:
                 command = new InternalTest(); // fixme
                 break;
                 case XXXConst.ACTION_OFICIALIZAR_PERIODO:
                 case XXXConst.ACTION_EXECUTE_OFICIALIZAR_PERIODO:
                 command = new OficializarPeriodoCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_TROCA_SENHA_IDA:
                 command = new TrocaPasswordIdaCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_DESOFICIALIZAR_PERIODO:
                 command = new DesoficializarPeriodoCommand();
                 break;
                 case XXXConst.ACTION_EXECUTE_TROCA_SENHA_VOLTA:
                 command = new TrocaPasswordVoltaCommand();
                 break;
                 case XXXConst.ACTION_RESUMO:
                 command = new ResumoMenu();
                 break;
                 case XXXConst.ACTION_EXECUTE_GERA_PDF:
                 // command = new GeneratePDFReportCommand();
                 break;
                 case XXXConst.ACTION_SHORTCUT:
                 command = new ShortcutCommand();
                 break;
                 default:
                 command = new NullCommand();
                 }
                 return command;
                 }
                
                 protected Page getPage(int actionDescriptor, OutputParameters parameters)
                 throws ServletException {
                 String styleSheet = parameters.getRequest().getContextPath()
                 + APPLICATION_STYLESHEET;
                 XXXPage page = new XXXPage(APPLICATION_NAME, styleSheet);
                 switch (actionDescriptor) {
                 case XXXConst.ACTION_LIST:
                 case XXXConst.ACTION_EXECUTE_INSERT:
                 case XXXConst.ACTION_EXECUTE_UPDATE:
                 case XXXConst.ACTION_EXECUTE_DELETE:
                 case XXXConst.ACTION_LIST_SHORTCUT:
                 XXXCollectionTable table = new XXXCollectionTable(0, 3, 3);
                 table.setStyle("table");
                 page.addItem(table);
                 break;
                 case XXXConst.ACTION_VIEW:
                 page.addItem(new ViewForm());
                 break;
                 case XXXConst.ACTION_INSERT:
                 page.addItem(new InsertForm());
                 break;
                 case XXXConst.ACTION_UPDATE:
                 page.addItem(new UpdateForm());
                 break;
                 case XXXConst.ACTION_DELETE:
                 page.addItem(new DeleteForm());
                 break;
                 case XXXConst.ACTION_CALCULATE_REPORT:
                 page.addItem(new ReportFormIntervaloMensalItem());
                 break;
                 case XXXConst.ACTION_CALCULATE_REPORT_MONTH:
                 page.addItem(new ReportFormMesItem());
                 break;
                 case XXXConst.ACTION_REPORT:
                 case XXXConst.ACTION_EXECUTE_REPORT:
                 case XXXConst.ACTION_EXECUTE_VERIFICAR_PLANO_CONTA:
                 case XXXConst.ACTION_EXECUTE_VERIFICAR_PERIODO:
                 case XXXConst.ACTION_EXECUTE_CONFERIR_PERIODO:
                 case XXXConst.ACTION_OFICIALIZAR_PERIODO:
                 case XXXConst.ACTION_EXECUTE_OFICIALIZAR_PERIODO:
                 case XXXConst.ACTION_EXECUTE_DESOFICIALIZAR_PERIODO:
                 case XXXConst.ACTION_EXECUTE_CALCULA_PERIODO:
                 case XXXConst.ACTION_EXECUTE_CALCULATE_REPORT:
                 case XXXConst.ACTION_EXECUTE_CALCULATE_REPORT_MONTH:
                 case XXXConst.ACTION_INSERT_MULTI_VALUE:
                 case XXXConst.ACTION_VIEW_MULTI_VALUE:
                 case XXXConst.ACTION_DELETE_PERIODO:
                 case XXXConst.ACTION_TEST:
                 case XXXConst.ACTION_SHORTCUT:
                 case XXXConst.ACTION_EXECUTE_SESSION_UPDATE:
                 case XXXConst.ACTION_RESUMO:
                 case XXXConst.ACTION_EXECUTE_TROCA_SENHA_IDA:
                 case XXXConst.ACTION_EXECUTE_TROCA_SENHA_VOLTA:
                 if (parameters.getResult().getResultData() != null)
                 page.addItem((PageItem) parameters.getResult().getResultData());
                 break;
                 case PageServlet.ACTION_NO_ACTION:
                 break;
                 }
                 return page;
                 }
                
                 protected ValueObjectCollection getCollection(int classDescriptor,
                 int actionDescriptor, boolean loadCollection,
                 OutputParameters parameters) throws ServletException {
                 ValueObjectCollection collection = null;
                
                 try {
                 switch (classDescriptor) {
                 case XXXConst.CLASS_CENARIO:
                 collection = new CenarioCollection();
                 break;
                 case XXXConst.CLASS_CONTA:
                 collection = new ContaCollection();
                 break;
                 case XXXConst.CLASS_EMPRESA:
                 collection = new EmpresaCollection();
                 break;
                 case XXXConst.CLASS_GRUPO_CONTA:
                 collection = new GrupoContaCollection();
                 break;
                 case XXXConst.CLASS_PLANO:
                 collection = new PlanoCollection();
                 break;
                 case XXXConst.CLASS_PLANO_CONTA:
                 collection = new PlanoContaCollection();
                 break;
                 case XXXConst.CLASS_PLANO_CONTA_RELATORIO:
                 collection = new PlanoContaRelatorioCollection();
                 break;
                 case XXXConst.CLASS_USUARIO:
                 collection = new UsuarioCollection();
                 break;
                 case XXXConst.CLASS_PAPEL:
                 collection = new PapelCollection();
                 break;
                 case XXXConst.CLASS_PERIODO:
                 collection = new PeriodoCollection();
                 break;
                 case XXXConst.CLASS_OPERACAO:
                 collection = new OperationCollection();
                 break;
                 case XXXConst.CLASS_TIPOPLANO:
                 collection = new TipoPlanoCollection();
                 break;
                 case XXXConst.CLASS_ALLOWED:
                 collection = new AllowedOperationsCollection();
                 break;
                 case XXXConst.CLASS_USERROLE:
                 collection = new UserRoleCollection();
                 break;
                 case XXXConst.CLASS_GIVEROLE:
                 collection = new GiveRoleCollection();
                 break;
                 case XXXConst.CLASS_OPERATIONROLE:
                 collection = new OperationRoleCollection();
                 break;
                 case XXXConst.CLASS_GIVEOPERATION:
                 collection = new GiveOperationCollection();
                 break;
                 case XXXConst.CLASS_ESTILO:
                 collection = new EstiloCollection();
                 break;
                 case XXXConst.CLASS_COLUNARELATORIO:
                 collection = new ColunaRelatorioCollection();
                 break;
                 case XXXConst.CLASS_PAGINARELATORIO:
                 collection = new PaginaRelatorioCollection();
                 break;
                 case XXXConst.CLASS_LISTCONTACOMENTARIO:
                 collection = new ListComentarioContaCollection();
                 break;
                 case XXXConst.CLASS_CONTACOMENTARIO:
                 collection = new ComentarioContaCollection();
                 break;
                 case XXXConst.CLASS_ASSUNTOCONSELHO:
                 collection = new AssuntosParaConselhoCollection();
                 break;
                 case XXXConst.CLASS_PONTOSCRITICOS:
                 collection = new PontosCriticosCollection();
                 break;
                 case XXXConst.CLASS_PONTOSRELEVANTES:
                 collection = new PontosRelevantesCollection();
                 break;
                 case XXXConst.CLASS_ACAOCONTA:
                 collection = new ActionContaCollection();
                 break;
                 case XXXConst.CLASS_ACAOPONTOSCRITICOS:
                 collection = new ActionPontosCriticosCollection();
                 break;
                 case XXXConst.CLASS_ENDIVIDAMENTO:
                 collection = new EndividamentoCollection();
                 break;
                 case XXXConst.CLASS_PASSWORD:
                 collection = new PasswordCollection();
                 break;
                 case XXXConst.CLASS_GRUPO_RELATORIO:
                 collection = new GrupoRelatorioCollection();
                 break;
                 case XXXConst.CLASS_FINANCIAMENTO:
                 collection = new FinanciamentoCollection();
                 break;
                 case PageServlet.CLASS_NO_CLASS:
                 break;
                 default:
                 throw new ServletException("Classe não definida");
                 }
                 } catch (Exception e) {
                 logger.debug("Excecao de construtor de ValueObjectCollection", e);
                 throw new ServletException(e.getMessage());
                 }
                
                 try {
                 if (collection != null)
                 collection.initialize(actionDescriptor, loadCollection,
                 parameters);
                 return collection;
                 } catch (Exception e) {
                 logger
                 .debug("Excecao de inicializacao de ValueObjectCollection",
                 e);
                 throw new ServletException(e.getMessage());
                 }
                 }
                
                 /**
                 * Obtem uma página de erro padrão.
                 *
                 * @return Retorna uma página de erro.
                 * @param parameters
                 * Parâmetros para processamento.
                 */
                 protected ErrorPage getErrorPage(OutputParameters parameters) {
                 String styleSheet = parameters.getRequest().getContextPath()
                 + APPLICATION_STYLESHEET;
                 return new XXXPage(APPLICATION_NAME, styleSheet);
                 }
                
                }
                


                • 5. Re: Error in a web application on JBoss: javax.servlet.Servl
                  Peter Johnson Master

                  You are importing a lot of custom classes. Where are those? They should be in a JAR file in the WEB-INF/lib directory.

                  • 6. Re: Error in a web application on JBoss: javax.servlet.Servl
                    Fabricio Raphael Newbie

                     

                    "PeterJ" wrote:
                    You are importing a lot of custom classes. Where are those? They should be in a JAR file in the WEB-INF/lib directory.


                    Yes Peter, the files .jar are at WEB-INF/lib, as displayed bellow:

                    ~$ jar -tf <folder-jboss_deploy>/xxx.war
                    META-INF/
                    META-INF/MANIFEST.MF
                    WEB-INF/
                    WEB-INF/web.xml
                    WEB-INF/classes/
                    WEB-INF/classes/com/
                    WEB-INF/classes/com/trails/
                    WEB-INF/classes/com/trails/xxx/
                    WEB-INF/classes/com/trails/xxx/util/
                    WEB-INF/classes/com/trails/xxx/web/
                    WEB-INF/classes/com/trails/xxx/web/collection/
                    WEB-INF/classes/com/trails/xxx/web/command/
                    WEB-INF/classes/com/trails/xxx/web/items/
                    WEB-INF/classes/com/trails/xxx/web/menu/
                    WEB-INF/classes/com/trails/xxx/web/report/
                    WEB-INF/classes/com/trails/xxx/web/report/command/
                    WEB-INF/classes/com/trails/xxx/web/report/doc/
                    WEB-INF/classes/com/trails/xxx/web/report/items/
                    WEB-INF/classes/com/trails/xxx/web/test/
                    WEB-INF/lib/
                    applets/
                    chartimages/
                    images/
                    images/empresas/
                    META-INF/ejb-jar.xml
                    META-INF/jboss.xml
                    WEB-INF/classes/com/trails/xxx/util/XXXUtil.class
                    WEB-INF/classes/com/trails/xxx/web/XXXConst.class
                    WEB-INF/classes/com/trails/xxx/web/XXXServlet.class
                    WEB-INF/classes/com/trails/xxx/web/XXXValueFormatter.class
                    WEB-INF/classes/com/trails/xxx/web/CacheHolder.class
                    WEB-INF/classes/com/trails/xxx/web/ClientInformation.class
                    WEB-INF/classes/com/trails/xxx/web/collection/AcaoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ActionContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ActionPontosCriticosCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/AllowedOperationsCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/AssuntosParaConselhoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/XXXCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/CenarioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ColunaRelatorioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ComentarioContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ComentariosCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/EmpresaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/EndividamentoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/EstiloCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/FinanciamentoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/GiveOperationCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/GiveRoleCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/GrupoContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/GrupoRelatorioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/ListComentarioContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/OperationCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/OperationRoleCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PaginaRelatorioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PapelCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PasswordCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PeriodoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PlanoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PlanoContaAbstratoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PlanoContaCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PlanoContaRelatorioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PontosCriticosCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/PontosRelevantesCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/TipoPlanoCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/UserRoleCollection.class
                    WEB-INF/classes/com/trails/xxx/web/collection/UsuarioCollection.class
                    WEB-INF/classes/com/trails/xxx/web/command/XXXPageCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/XXXUpdateSession.class
                    WEB-INF/classes/com/trails/xxx/web/command/CalculaPeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/ConferirPeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/DeletePeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/DesoficializarPeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/InserirValoresCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/InternalTest.class
                    WEB-INF/classes/com/trails/xxx/web/command/MostraValoresCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/OficializarPeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/ShortcutCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/TrocaPasswordIdaCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/TrocaPasswordVoltaCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/VerificaPeriodoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/command/VerificaPlanoContaCommand.class
                    WEB-INF/classes/com/trails/xxx/web/items/XXXBarRow.class
                    WEB-INF/classes/com/trails/xxx/web/items/XXXCollectionTable.class
                    WEB-INF/classes/com/trails/xxx/web/items/XXXHeaderRow.class
                    WEB-INF/classes/com/trails/xxx/web/items/XXXListCheckbox.class
                    WEB-INF/classes/com/trails/xxx/web/items/XXXPage.class
                    WEB-INF/classes/com/trails/xxx/web/menu/AbstractMenu.class
                    WEB-INF/classes/com/trails/xxx/web/menu/BoxedMenu.class
                    WEB-INF/classes/com/trails/xxx/web/menu/MenuBuilder.class
                    WEB-INF/classes/com/trails/xxx/web/menu/MenuDirector.class
                    WEB-INF/classes/com/trails/xxx/web/menu/MenuProduct.class
                    WEB-INF/classes/com/trails/xxx/web/menu/StandardMenu.class
                    WEB-INF/classes/com/trails/xxx/web/menu/WebFXMenu.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoMensalColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoMensalRealizadoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoMensalTrimestralColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoMonitoramentoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoOrcadoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AcumuladoRealizadoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AnoAnteriorColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/AnualColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/BusinessPlanColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/ChartSeriesColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/ColumnBuilder.class
                    WEB-INF/classes/com/trails/xxx/web/report/ComentarioContaColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/CommentColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/EmptyColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/EndividamentoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/IndicadoresColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/MensalColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/MensalMonitoramentoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/MensalRealizadoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelColumnPlan.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelConta.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelGroup.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelPage.class
                    WEB-INF/classes/com/trails/xxx/web/report/ModelRow.class
                    WEB-INF/classes/com/trails/xxx/web/report/MutacoesPassivasColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/NestedColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/Report.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportBuilder.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportGroup.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportModel.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportPage.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportParameters.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportRow.class
                    WEB-INF/classes/com/trails/xxx/web/report/ReportValue.class
                    WEB-INF/classes/com/trails/xxx/web/report/SequenciaPeriodosColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/TendenciasColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/VariacaoColumn.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/CalculateReportCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/CalculateReportMonthCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartAnualCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartDesempenhoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartPerformanceCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartRealOrcadoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartReportCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ChartTendenciasCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/CommentReportCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/GenerateReportCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportBusinessPlanCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportEvolucaoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportFormCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportIndicadoresCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportMensalCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportMonitoramentoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportOrcamentoCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportTrimestralCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ReportVariacoesCommand.class
                    WEB-INF/classes/com/trails/xxx/web/report/command/ResumoMenu.class
                    WEB-INF/classes/com/trails/xxx/web/report/doc/TableReportDocItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ChartPerformanceItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ChartReportItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ChartTendenciasItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/CommentReportItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFooterItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormComentarioItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormEvolucaoItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormIndicadoresItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormIntervaloMensalItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormIntervaloRealizadoRealizadoItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormMensalItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormMesItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormOrcamentoItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormRealOrcadoItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormTendenciasItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormTrimestralItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportFormVariacoesItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportHeaderItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ReportStyles.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/ResumoMenuItem.class
                    WEB-INF/classes/com/trails/xxx/web/report/items/TableReportItem.class
                    WEB-INF/classes/com/trails/xxx/web/test/TesteXXX.class
                    WEB-INF/classes/com/trails/xxx/web/test/TesteContasSoma.class
                    WEB-INF/classes/com/trails/xxx/web/test/TesteDAO.class
                    WEB-INF/classes/com/trails/xxx/web/test/TesteGetComentarios.class
                    WEB-INF/classes/com/trails/xxx/web/test/TesteTeste.class
                    WEB-INF/classes/xxx.properties
                    WEB-INF/jboss-web.xml
                    WEB-INF/lib/Tidy.jar
                    WEB-INF/lib/antlr.debug.jar
                    WEB-INF/lib/antlr.jar
                    WEB-INF/lib/authentication-dl.jar
                    WEB-INF/lib/authentication.jar
                    WEB-INF/lib/authorization-dl.jar
                    WEB-INF/lib/authorization.jar
                    WEB-INF/lib/comments-dl.jar
                    WEB-INF/lib/comments.jar
                    WEB-INF/lib/xxx-dl.jar
                    WEB-INF/lib/estilo-dl.jar
                    WEB-INF/lib/estilo.jar
                    WEB-INF/lib/event-dl.jar
                    WEB-INF/lib/httpunit.jar
                    WEB-INF/lib/iText.jar
                    WEB-INF/lib/iTextXML.jar
                    WEB-INF/lib/jboss-j2ee.jar
                    WEB-INF/lib/jdbc2_0-stdext.jar
                    WEB-INF/lib/junit.jar
                    WEB-INF/lib/log4j.jar
                    WEB-INF/lib/servlet.jar
                    WEB-INF/lib/trailsejb.jar
                    WEB-INF/lib/user-dl.jar
                    WEB-INF/lib/user.jar
                    WEB-INF/lib/xerces_1_3_1.jar
                    applets/ChartData.class
                    applets/ChartGraphics.class
                    applets/Charts.class
                    applets/Line.class
                    applets/LineParam.class
                    applets/RotateFilter.class
                    copyConta.jsp
                    xxx.js
                    xxx.jsp
                    drillDown.jsp
                    estilo.css
                    estiloPrint1.css
                    estiloPrint2.css
                    funcionalidade.jsp
                    get.js
                    images/000000.gif
                    ...
                    images/verplanos.gif
                    incInf.jsp
                    incSup.jsp
                    interna.jsp
                    libXXX.jsp
                    menu.js
                    menu.jsp
                    principal.jsp
                    principal_empresa.jsp
                    upload.jsp
                    uploadEntry.jsp
                    whereAmI.jsp
                    xmenu.css
                    xmenu.js
                    ~$
                    


                    • 7. Re: Error in a web application on JBoss: javax.servlet.Servl
                      Peter Johnson Master

                      Have you compared the set of classes imported into the servlet with the set of classes in the classes directory? Do they match? Are any missing?

                      Do those classes in turn access other classes and are those classes also accounted for?

                      I can think of a few things you can try.

                      1) Start with a simple servlet that imports nothing. Make sure it works. Then start adding imports and code for those classes until it breaks. It is usually best to do a binary search - add in half the classes and if it still works add in half of the remaining classes, and so on. If it doesn't work then then remove half of the classes that were added and try again. Eventually you will narrow it down to the class that has the problem. If that classe is in the WEB-INF/classes directory, then you will have to see what classes it in turn imports and repeat this process with that class.

                      2) Add the "-verbose:class" option to JAVA_OPTS in the runs script. This option causes the JVM to print each class loaded and list where it came from. This might help you identify the missing class.

                      3) Download JBoss Tattletale. It is a handy utility that finds dependencies for classes and JAR files. It should help you locate the missing class.

                      • 8. Re: Error in a web application on JBoss: javax.servlet.Servl
                        Fabricio Raphael Newbie

                         

                        "PeterJ" wrote:
                        Have you compared the set of classes imported into the servlet with the set of classes in the classes directory? Do they match? Are any missing?

                        Do those classes in turn access other classes and are those classes also accounted for?

                        I can think of a few things you can try.

                        1) Start with a simple servlet that imports nothing. Make sure it works. Then start adding imports and code for those classes until it breaks. It is usually best to do a binary search - add in half the classes and if it still works add in half of the remaining classes, and so on. If it doesn't work then then remove half of the classes that were added and try again. Eventually you will narrow it down to the class that has the problem. If that classe is in the WEB-INF/classes directory, then you will have to see what classes it in turn imports and repeat this process with that class.

                        2) Add the "-verbose:class" option to JAVA_OPTS in the runs script. This option causes the JVM to print each class loaded and list where it came from. This might help you identify the missing class.

                        3) Download JBoss Tattletale. It is a handy utility that finds dependencies for classes and JAR files. It should help you locate the missing class.


                        Hi Peter, you was correct. Had compiled but I didn't generate .jar that was essential. Sorry.

                        And Thanks!