Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2
Mapping documents: hibernate.cgf.xml and UserAdmin.hbm.xml
Code between sessionFactory.openSession() and session.close():
logger.info("Inside addPermission") ;
Session session = InitSessionFactory.getInstance().getCurrentSession();
logger.info("Got session") ;
Transaction tx = session.beginTransaction();
logger.info("Got transaction") ;
session.beginTransaction();
session.save(permission);
tx.commit();
hsqlCleanup(session);
logger.info("Add successful") ;
return "Add successful ";
Full stack trace of any exception that occurs:
2007-01-20 18:45:51,277 INFO [STDOUT] 18:45:51,277 INFO [HbmBinder] Mapping collection: org.jbpm.taskmgmt.def.TaskMgmtDefinition.tasks -> JBPM_TASK
2007-01-20 18:45:51,308 ERROR [STDERR] %%%% Error Creating HibernateSessionFactory %%%%
2007-01-20 18:45:51,339 ERROR [STDERR] org.hibernate.MappingException: Could not determine type for: org.jbpm.db.hibernate.ConverterEnumType, for columns: [org.hibernate.mapping.Column(CONVERTER_)]
at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
at org.hibernate.mapping.Property.isValid(Property.java:185)
at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:395)
at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1021)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1206)
at com.infousa.busdb.dal.InitSessionFactory.initSessionFactory(InitSessionFactory.java:116)
at com.infousa.busdb.dal.InitSessionFactory.getInstance(InitSessionFactory.java:66)
at com.infousa.busdb.dal.PermissionDataHandler.addPermission(PermissionDataHandler.java:78)
at com.infousa.busdb.workflow.UserAdminWorkflowHandler.addPermission(UserAdminWorkflowHandler.java:32)
at com.infousa.busdb.traffic.BusDBActionHandler.perform(BusDBActionHandler.java:30)
at com.infousa.busdb.service.BusDB.BusDBService.example(BusDBService.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
at org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker.java:45)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:301)
at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:130)
at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2007-01-20 18:45:51,339 ERROR [STDERR] %%% Error Message : Could not determine type for: org.jbpm.db.hibernate.ConverterEnumType, for columns: [org.hibernate.mapping.Column(CONVERTER_)]
Name and version of the database you are using:
PostgreSQL 8.1.5
The generated SQL (show_sql=true): Does not reach
Debug level Hibernate log excerpt: STDOUT
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html