0 Replies Latest reply on Jan 22, 2005 3:11 PM by bigcanoftuna

    Configuring JBoss to work with Hibernate 3...

    bigcanoftuna

      I am trying to configure JBoss 4.0.1 to use Hibernate3b instead of 2.x. I believe this should be possible, but I am encountering some errors.

      First, here is how the server is configured:

      ./deploy/jboss-hibernate.deployer <---- (as downloaded with distribution)
       /hibernate3.jar <-----(replaced hibernate2.jar)
       /cglib-full-2.0.2.jar <-------- (replaced 2.0.1)
       /odmg-3.0.jar
       /jboss-hibernate.jar
      

      ./deploy/application.jar <----- (My new HAR with domain objects)
       / *domain class files*
       / *domain class mappings (hbm.xml)
       / meta-inf
       / hibernate-service.xml
      

      hibernate-service.xml:


      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate"
       name="jboss.har:service=EnteroVision">
       <attribute name="DatasourceName">java:/DefaultDS</attribute>
       <attribute name="Dialect">net.sf.hibernate.dialect.HSQLDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
       <attribute name="CacheProviderClass">
       net.sf.hibernate.cache.HashtableCacheProvider
       </attribute>
       <!-- <attribute name="Hbm2ddlAuto">create-drop</attribute> -->
       </mbean>
      </server>


      AuditInfoType.java:

      public class AuditInfoType implements org.hibernate.usertype.UserType {
       ..
      }


      PROBLEM:

      When I deploy my application.har file, I get the following exception:

      net.sf.hibernate.MappingException: Could not interpret type: com.myapplications.hibernate.AuditInfoType
       at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:934)
       at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:435)
       at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1047)
       at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:362)
       at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1256)
       at net.sf.hibernate.cfg.Configuration.add(Configuration.java:252)
       at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:
      288)
       at net.sf.hibernate.cfg.Configuration.addJar(Configuration.java:396)
       at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:
      574)
       at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:551)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:272)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:222)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch



      Any idea what the problem could be? Have I configured JBoss correctly for Hibernate3?

      Please let me know if you need any more information..
      thanks!
      BCOT.