0 Replies Latest reply on Mar 7, 2012 11:40 AM by D. Alvarado

    How do I make JBoss include one of its own modules in its classpath?

    D. Alvarado Newbie

      Hi,

       

      I'm using JBoss 7.1.0 AS.  I created a WAR file and deployed it to my $JBOSS_HOME/standalone/deployments directory.  However, when I visit my index.jsp page, I get this error

       

      [code]

      java.lang.ClassNotFoundException: org.apache.jasper.compiler.JavacErrorDetail from [Module "org.jboss.as.web:main" from local module loader @29ac (roots: /opt/jboss-as-7.1.0.Final/modules)]

                org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                org.apache.jasper.compiler.ErrorDispatcher.createJavacError(ErrorDispatcher.java:564)

                org.apache.jasper.compiler.JDTCompiler$2.acceptResult(JDTCompiler.java:384)

                org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:607)

                org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:522)

                org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:436)

                org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)

                org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)

                org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)

                org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)

                org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)

                org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)

                org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)

                javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

      [/code]

       

      I looked in my JBoss installation, and the class exists in the module /opt/jboss-as-7.1.0.Final/modules/org/jboss/as/web/main/jbossweb-7.0.10.Final.jar .  How do I get JBoss to include this JAR file in its classpath?  For what it's worth, here is my index.jsp file …

       

      [code]

      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"

        pageEncoding="ISO-8859-1"%>

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

       

      <html>

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

      <title>Spring 3, MVC Examples</title>

      </head>

       

      <body>

                <h1>Spring 3, MVC Examples</h1>

        <ul>

        <li><a href="registrationform.jsp">Registration Form</a></li>

        </ul>

      </body>

       

      </html>

      [/code]

       

      Thanks, - Dave