2 Replies Latest reply on Feb 15, 2005 4:49 AM by Darran Lofthouse

    JBoss and Hibernate Configuration

    Ahsan Quadri Newbie

      My piece of code is perfectly executing on standalone Tomcat but its giving me strange error in JBoss.
      My Code is given below
      Configuration cfg = new Configuration() ;



      SessionFactory factory = cfg.configure().buildSessionFactory();
      Session sessions = factory.openSession();

      Transaction t = sessions.beginTransaction();

      sessions.save(c);
      sessions.save(p);
      t.commit();
      sessions.close();

      ////////////////////////////// STACK TRACE ////////////////////////////////

      org.apache.jasper.JasperException: Unable to compile class for JSP
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


      root cause

      java.lang.NullPointerException
      org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:153)
      org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
      org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:374)
      java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      java.lang.Class.forName0(Native Method)
      java.lang.Class.forName(Class.java:141)
      org.apache.tools.ant.AntTypeDefinition.getTypeClass(AntTypeDefinition.java:161)
      org.apache.tools.ant.AntTypeDefinition.getExposedClass(AntTypeDefinition.java:135)
      org.apache.tools.ant.ComponentHelper$AntTypeTable.getExposedClass(ComponentHelper.java:837)
      org.apache.tools.ant.ComponentHelper.getDataTypeDefinitions(ComponentHelper.java:365)
      org.apache.tools.ant.Project.getDataTypeDefinitions(Project.java:942)
      org.apache.tools.ant.types.AbstractFileSet.getDataTypeName(AbstractFileSet.java:309)
      org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:374)
      org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:350)
      org.apache.tools.ant.taskdefs.MatchingTask.getDirectoryScanner(MatchingTask.java:186)
      org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:752)
      org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)