Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss and Hibernate

 
Ahsan Jamil
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code is executing on standalone Tomcat but its giving me a strange exception on jboss.

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();

Plz I dont have any clue about that, and im stuck in the middle of project.

///////////////////////////// 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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic