8 Replies Latest reply on Sep 16, 2010 5:15 AM by antoine seilles

    how to use hibernate with JBoss Portal ?

    antoine seilles Newbie

      Hi,

       

      i try to use hibernate and JPA to persist my datas.

      But when i deploy my portlet i have a "cannot start Object" error when i try to create a EntityManagerFactory.

       

      My persistence.xml and hibernate.cfg.xml files are in webapp/META-INF repository.

       

      The complete error :

      10:22:38,696 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
      10:22:38,698 ERROR [STDERR] SLF4J: Found binding in [jar:file:/home/natoine/Bureau/jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-cms.sar/lib/slf4j-log4j12-1.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      10:22:38,698 ERROR [STDERR] SLF4J: Found binding in [jar:file:/home/natoine/Bureau/jboss-portal-2.7.2/server/default/tmp/deploy/tmp5396566282999096507slf4j-log4j12-1.3.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      10:22:38,698 ERROR [STDERR] SLF4J: Found binding in [jar:file:/home/natoine/Bureau/jboss-portal-2.7.2/server/default/tmp/deploy/tmp7859239984395272184annotationPortlets-0.0.1-SNAPSHOT-exp.war/WEB-INF/lib/slf4j-simple-1.5.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      10:22:38,698 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      10:22:38,701 ERROR [STDERR] 1 [ScannerThread] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.GA
      10:22:38,709 ERROR [STDERR] 9 [ScannerThread] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
      10:22:38,711 ERROR [STDERR] 11 [ScannerThread] INFO org.hibernate.cfg.Environment - hibernate.properties not found
      10:22:38,713 ERROR [STDERR] 13 [ScannerThread] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
      10:22:38,715 ERROR [STDERR] 15 [ScannerThread] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
      10:22:38,768 ERROR [STDERR] 68 [ScannerThread] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.1.0.GA
      10:22:38,770 ERROR [STDERR] 70 [ScannerThread] INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.4.0.GA
      10:22:38,829 ERROR [STDERR] 129 [ScannerThread] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
      10:22:38,829 ERROR [STDERR] 129 [ScannerThread] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
      10:22:38,875 ERROR [STDERR] 175 [ScannerThread] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
      10:22:38,920 ERROR [STDERR] 220 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.Document
      10:22:38,944 ERROR [STDERR] 244 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.Document on table DOCUMENT
      10:22:39,006 ERROR [STDERR] 306 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.DocumentHTML
      10:22:39,015 ERROR [STDERR] 315 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.Status
      10:22:39,016 ERROR [STDERR] 316 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.Status on table STATUS
      10:22:39,016 ERROR [STDERR] 316 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.UserStatus
      10:22:39,016 ERROR [STDERR] 316 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.UserStatus on table USERSTATUS
      10:22:39,025 ERROR [STDERR] 325 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.selection.Selection
      10:22:39,025 ERROR [STDERR] 325 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.selection.Selection on table SELECTION
      10:22:39,027 ERROR [STDERR] 327 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.selection.SelectionHTML
      10:22:39,028 ERROR [STDERR] 328 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.annotation.Annotation
      10:22:39,028 ERROR [STDERR] 328 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.annotation.Annotation on table ANNOTATION
      10:22:39,029 ERROR [STDERR] 329 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.annotation.AnnotationDocument
      10:22:39,048 ERROR [STDERR] 348 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.annotation.AnnotationSelection
      10:22:39,049 ERROR [STDERR] 349 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.DocumentPost
      10:22:39,053 ERROR [STDERR] 353 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.FreeText
      10:22:39,053 ERROR [STDERR] 353 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.FreeText on table FREETEXT
      10:22:39,054 ERROR [STDERR] 353 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.SimpleLabel
      10:22:39,054 ERROR [STDERR] 354 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.SimpleLabel on table SIMPLELABEL
      10:22:39,054 ERROR [STDERR] 354 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.Domain
      10:22:39,054 ERROR [STDERR] 354 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.Domain on table DOMAIN
      10:22:39,055 ERROR [STDERR] 355 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.Judgment
      10:22:39,055 ERROR [STDERR] 355 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.Judgment on table JUDGMENT
      10:22:39,056 ERROR [STDERR] 356 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.Position
      10:22:39,056 ERROR [STDERR] 356 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.Position on table POSITION
      10:22:39,057 ERROR [STDERR] 357 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.annotations_persistence.document.post.PostType
      10:22:39,057 ERROR [STDERR] 357 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.annotations_persistence.document.post.PostType on table POSTTYPE
      10:22:39,058 ERROR [STDERR] 358 [ScannerThread] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: fr.natoine.user_persistence.User
      10:22:39,058 ERROR [STDERR] 358 [ScannerThread] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity fr.natoine.user_persistence.User on table USER
      10:22:39,064 ERROR [STDERR] 364 [ScannerThread] INFO org.hibernate.cfg.annotations.CollectionBinder - Mapping collection: fr.natoine.annotations_persistence.document.post.DocumentPost.simple_label -> SIMPLELABEL
      10:22:39,066 ERROR [STDERR] 366 [ScannerThread] INFO org.hibernate.cfg.annotations.CollectionBinder - Mapping collection: fr.natoine.annotations_persistence.document.post.DocumentPost.free_textareas -> FREETEXT
      10:22:39,067 ERROR [LifeCycle] Cannot start object
      org.jboss.portal.portlet.container.PortletInitializationException: The portlet CreateAnnotationPortlet threw a runtime exception during init
          at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:288)
          at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
          at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
          at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
          at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
          at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
          at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
          at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
          at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:220)
          at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
          at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy222.deploy(Unknown Source)
          at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
          at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
          at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
          at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
          at $Proxy224.handleNotification(Unknown Source)
          at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
          at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
          at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
          at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
          at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
          at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
          at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
          at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
          at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
          at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
          at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy202.start(Unknown Source)
          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
          at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy9.deploy(Unknown Source)
          at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
          at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
          at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: portletsAnnotation] Unable to configure EntityManagerFactory
          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:265)
          at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
          at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
          at fr.natoine.annotationPortlets.CreateAnnotationPortlet.init(CreateAnnotationPortlet.java:37)
          at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
          at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
          at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
          ... 76 more
      Caused by: org.hibernate.AnnotationException: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
          at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:374)
          at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162)
          at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1226)
          at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:173)
          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:854)
          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)
          at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)
          ... 83 more
      Caused by: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.<init>(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
          at java.lang.Class.getConstructor0(Class.java:2723)
          at java.lang.Class.getDeclaredConstructor(Class.java:2002)
          at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:362)
          ... 89 more

      My persistence.xml file :

      <persistence xmlns="http://java.sun.com/xml/ns/persistence"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
          http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
         version="1.0">
         <persistence-unit name="portletsAnnotation">
            <properties>
                <property name="hibernate.ejb.cfgfile"
                     value="/hibernate.cfg.xml"/>
            </properties>
         </persistence-unit>
      </persistence>
      

       

      And my hibernate.cfg.xml file :

      <?xml version='1.0' encoding='utf-8'?>
      <!DOCTYPE hibernate-configuration PUBLIC
              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
              "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
      
      <hibernate-configuration>
      
          <session-factory>
           
               <!-- PostGresql connection settings -->
          <!--     <property name="connection.url">jdbc:postgresql://localhost/firsthibernate</property>
                <property name="connection.username">postgres</property>
                <property name="connection.driver_class">org.postgresql.Driver</property>
                <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
                <property name="connection.password">p</property>
          -->
                <!-- MySQL connection settings -->
                <property name="connection.url">jdbc:mysql://localhost/hibSample</property>
                <property name="connection.username">hibernate_user</property>
                <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
                <property name="connection.password">hibernate_pwd</property>
                <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
                
              <!-- HSQL connection settings -->
              <!-- 
              <property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
              <property name="connection.url">jdbc:hsqldb:hsql://localhost</property>
              <property name="connection.username">sa</property>
              <property name="connection.password"></property>
              <property name="dialect">org.hibernate.dialect.HSQLDialect</property>
                 -->
              <!-- JDBC connection pool (use the built-in) -->
              <property name="connection.pool_size">1</property>
      
              <!-- Enable Hibernate's automatic session context management -->
              <property name="current_session_context_class">thread</property>
      
              <!-- Disable the second-level cache  -->
              <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
      
              <!-- Echo all executed SQL to stdout -->
              <property name="show_sql">true</property>
      
              <!-- Drop and re-create the database schema on startup -->
              <property name="hbm2ddl.auto">update</property>
      
                <!-- mapping resource -->
                  <!-- 
               <mapping resource="org/hibernate/tutorial/domain/Event.hbm.xml"/>
              <mapping resource="org/hibernate/tutorial/domain/Person.hbm.xml"/>
                 -->
                 <!-- List of annotated Class -->
                 <mapping class="fr.natoine.annotations_persistence.document.Document"/>
                 <mapping class="fr.natoine.annotations_persistence.document.DocumentHTML"/>
                 <mapping class="fr.natoine.annotations_persistence.document.Status"/>
                 <mapping class="fr.natoine.annotations_persistence.document.UserStatus"/>
                 <mapping class="fr.natoine.annotations_persistence.selection.Selection"/>
                 <mapping class="fr.natoine.annotations_persistence.selection.SelectionHTML"/>
                 <mapping class="fr.natoine.annotations_persistence.annotation.Annotation"/>
                 <mapping class="fr.natoine.annotations_persistence.annotation.AnnotationDocument"/>
                 <mapping class="fr.natoine.annotations_persistence.annotation.AnnotationSelection"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.DocumentPost"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.FreeText"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.SimpleLabel"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.Domain"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.Judgment"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.Position"/>
                 <mapping class="fr.natoine.annotations_persistence.document.post.PostType"/>
                 <mapping class="fr.natoine.user_persistence.User"/> 
          </session-factory>
      
      </hibernate-configuration>
      
        • 1. Re: how to use hibernate with JBoss Portal ?
          antoine seilles Newbie

          I have modified my pom.xml and now i have less error.

          I think there is conflicts between libs i use in my project and libs in jboss.

          I use JBoss portal 2.7.2.

           

          My effective pom :

          <?xml version="1.0" encoding="UTF-8"?>
          <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <modelVersion>4.0.0</modelVersion>
            <groupId>fr.natoine</groupId>
            <artifactId>annotationPortlets</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <packaging>war</packaging>
            <name>Portlet 2.0 Maven Archetype Generator</name>
            <url>http://www.natoine.fr</url>
            <dependencies>
              <dependency>
                <groupId>javax.portlet</groupId>
                <artifactId>portlet-api</artifactId>
                <version>2.0</version>
                <scope>provided</scope>
              </dependency>
              <dependency>
                <groupId>fr.natoine</groupId>
                <artifactId>htmlManager</artifactId>
                <version>1.0.0</version>
                <scope>compile</scope>
              </dependency>
              <dependency>
                <groupId>fr.natoine</groupId>
                <artifactId>annotations-persistence</artifactId>
                <version>1.0.0</version>
                <scope>compile</scope>
              </dependency>
              <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>3.3.2.GA</version>
                <scope>provided</scope>
              </dependency>
              <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-annotations</artifactId>
                <version>3.4.0.GA</version>
                <scope>provided</scope>
              </dependency>
              <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-entitymanager</artifactId>
                <version>3.4.0.GA</version>
                <scope>provided</scope>
              </dependency>
              <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.5.6</version>
                <scope>provided</scope>
              </dependency>
            </dependencies>
            <repositories>
              <repository>
                <releases />
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <id>jboss</id>
                <url>http://repository.jboss.com/maven2</url>
              </repository>
              <repository>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>Maven Repository Switchboard</name>
                <url>http://repo1.maven.org/maven2</url>
              </repository>
            </repositories>
            <pluginRepositories>
              <pluginRepository>
                <releases>
                  <updatePolicy>never</updatePolicy>
                </releases>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>Maven Plugin Repository</name>
                <url>http://repo1.maven.org/maven2</url>
              </pluginRepository>
            </pluginRepositories>
            <build>
              <sourceDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/src/main/java</sourceDirectory>
              <scriptSourceDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/src/main/scripts</scriptSourceDirectory>
              <testSourceDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/src/test/java</testSourceDirectory>
              <outputDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/target/classes</outputDirectory>
              <testOutputDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/target/test-classes</testOutputDirectory>
              <resources>
                <resource>
                  <directory>/media/stockage/workspace_maven_hibernate/annotationPortlets/src/main/resources</directory>
                </resource>
              </resources>
              <testResources>
                <testResource>
                  <directory>/media/stockage/workspace_maven_hibernate/annotationPortlets/src/test/resources</directory>
                </testResource>
              </testResources>
              <directory>/media/stockage/workspace_maven_hibernate/annotationPortlets/target</directory>
              <finalName>annotationPortlets-0.0.1-SNAPSHOT</finalName>
              <pluginManagement>
                <plugins>
                  <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.3</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.2-beta-4</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.3</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.0</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.4</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-ear-plugin</artifactId>
                    <version>2.3.1</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-ejb-plugin</artifactId>
                    <version>2.1</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.3</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.2</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.5</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>2.5.1</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-rar-plugin</artifactId>
                    <version>2.2</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.0-beta-9</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.4.1</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>2.0.1</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.0.4</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.4.3</version>
                  </plugin>
                  <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1-alpha-1</version>
                  </plugin>
                </plugins>
              </pluginManagement>
              <plugins>
                <plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <version>2.0.2</version>
                  <executions>
                    <execution>
                      <id>default-compile</id>
                      <phase>compile</phase>
                      <goals>
                        <goal>compile</goal>
                      </goals>
                      <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                      </configuration>
                    </execution>
                    <execution>
                      <id>default-testCompile</id>
                      <phase>test-compile</phase>
                      <goals>
                        <goal>testCompile</goal>
                      </goals>
                      <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                      </configuration>
                    </execution>
                  </executions>
                  <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                  </configuration>
                </plugin>
                <plugin>
                  <artifactId>maven-deploy-plugin</artifactId>
                  <version>2.4</version>
                  <executions>
                    <execution>
                      <id>default-deploy</id>
                      <phase>deploy</phase>
                      <goals>
                        <goal>deploy</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-install-plugin</artifactId>
                  <version>2.3</version>
                  <executions>
                    <execution>
                      <id>default-install</id>
                      <phase>install</phase>
                      <goals>
                        <goal>install</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-war-plugin</artifactId>
                  <version>2.1-alpha-1</version>
                  <executions>
                    <execution>
                      <id>default-war</id>
                      <phase>package</phase>
                      <goals>
                        <goal>war</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-resources-plugin</artifactId>
                  <version>2.4.1</version>
                  <executions>
                    <execution>
                      <id>default-resources</id>
                      <phase>process-resources</phase>
                      <goals>
                        <goal>resources</goal>
                      </goals>
                    </execution>
                    <execution>
                      <id>default-testResources</id>
                      <phase>process-test-resources</phase>
                      <goals>
                        <goal>testResources</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.4.3</version>
                  <executions>
                    <execution>
                      <id>default-test</id>
                      <phase>test</phase>
                      <goals>
                        <goal>test</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-clean-plugin</artifactId>
                  <version>2.3</version>
                  <executions>
                    <execution>
                      <id>default-clean</id>
                      <phase>clean</phase>
                      <goals>
                        <goal>clean</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                <plugin>
                  <artifactId>maven-site-plugin</artifactId>
                  <version>2.0.1</version>
                  <executions>
                    <execution>
                      <id>default-site</id>
                      <phase>site</phase>
                      <goals>
                        <goal>site</goal>
                      </goals>
                    </execution>
                    <execution>
                      <id>default-deploy</id>
                      <phase>site-deploy</phase>
                      <goals>
                        <goal>deploy</goal>
                      </goals>
                    </execution>
                  </executions>
                  <configuration>
                    <outputDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/target/site</outputDirectory>
                    <reportPlugins>
                      <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                      </plugin>
                    </reportPlugins>
                  </configuration>
                </plugin>
              </plugins>
            </build>
            <reporting>
              <outputDirectory>/media/stockage/workspace_maven_hibernate/annotationPortlets/target/site</outputDirectory>
            </reporting>
          </project>
          
          

           

          And my error when i try to deploy my portlet :

          11:46:00,896 ERROR [LifeCycle] Cannot start object
          org.jboss.portal.portlet.container.PortletInitializationException: The portlet CreateAnnotationPortlet threw a runtime exception during init
              at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:288)
              at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
              at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
              at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
              at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
              at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
              at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
              at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
              at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:220)
              at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy222.deploy(Unknown Source)
              at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
              at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
              at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
              at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
              at $Proxy224.handleNotification(Unknown Source)
              at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
              at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
              at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
              at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
              at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
              at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
              at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
              at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
              at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
              at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy202.start(Unknown Source)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
              at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
              at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
              at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
              at $Proxy9.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named portletsAnnotation
              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
              at fr.natoine.annotationPortlets.CreateAnnotationPortlet.init(CreateAnnotationPortlet.java:37)
              at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
              at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
              at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
              ... 76 more


          • 2. Re: how to use hibernate with JBoss Portal ?
            antoine seilles Newbie

            Ok my persistence.xml and hibernate.cfg.xml file was not in the good folder.

            Now with these two files in META-INF folder, i have this error :

            12:10:22,324 ERROR [DriverManagerConnectionProvider] JDBC Driver class not found: com.mysql.jdbc.Driver
            java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver
                at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
                at java.lang.Class.forName0(Native Method)
                at java.lang.Class.forName(Class.java:186)
                at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
                at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:61)
                at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
                at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
                at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
                at fr.natoine.annotationPortlets.CreateAnnotationPortlet.init(CreateAnnotationPortlet.java:37)
                at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
                at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
                at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
                at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
                at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
                at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
                at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
                at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
                at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
                at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
                at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:220)
                at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy222.deploy(Unknown Source)
                at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
                at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
                at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
                at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
                at $Proxy224.handleNotification(Unknown Source)
                at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
                at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
                at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
                at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
                at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
                at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy202.start(Unknown Source)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy9.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            12:10:22,339 ERROR [LifeCycle] Cannot start object
            org.jboss.portal.portlet.container.PortletInitializationException: The portlet CreateAnnotationPortlet threw a runtime exception during init
                at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:288)
                at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
                at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
                at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
                at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
                at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
                at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
                at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
                at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:220)
                at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy222.deploy(Unknown Source)
                at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
                at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
                at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
                at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
                at $Proxy224.handleNotification(Unknown Source)
                at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
                at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
                at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
                at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
                at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
                at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy202.start(Unknown Source)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                at $Proxy9.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
            Caused by: javax.persistence.PersistenceException: org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver
                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
                at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
                at fr.natoine.annotationPortlets.CreateAnnotationPortlet.init(CreateAnnotationPortlet.java:37)
                at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
                at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
                at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
                ... 76 more
            Caused by: org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver
                at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:66)
                at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
                at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
                ... 83 more
            Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver
                at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
                at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
                at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
                at java.lang.Class.forName0(Native Method)
                at java.lang.Class.forName(Class.java:186)
                at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
                at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:61)
                ... 89 more
            12:10:22,449 INFO  [DriverManagerConnectionProvider] cleaning up connection pool: null

            I guess it's a problem with my jdbc api version.

            In my pom i have set the following dependency :

            <dependency>
                           <groupId>mysql</groupId>
                           <artifactId>mysql-connector-java</artifactId>
                           <version>5.1.12</version>
                           <scope>provided</scope>
                      </dependency>
            
            • 3. Re: how to use hibernate with JBoss Portal ?
              antoine seilles Newbie

              If i don't set Mysql connector scope to provided, i have another error :

              12:17:38,547 ERROR [SchemaUpdate] could not get database metadata
              java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/hibSample
                  at java.sql.DriverManager.getConnection(DriverManager.java:640)
                  at java.sql.DriverManager.getConnection(DriverManager.java:169)
                  at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
                  at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
                  at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127)
                  at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
                  at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
                  at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
                  at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
                  at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
                  at fr.natoine.annotationPortlets.CreateAnnotationPortlet.init(CreateAnnotationPortlet.java:37)
                  at javax.portlet.GenericPortlet.init(GenericPortlet.java:107)
                  at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
                  at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
                  at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
                  at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
                  at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
                  at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
                  at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
                  at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
                  at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
                  at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfoContext.java:220)
                  at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                  at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:616)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                  at $Proxy222.deploy(Unknown Source)
                  at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
                  at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
                  at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
                  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:616)
                  at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
                  at $Proxy224.handleNotification(Unknown Source)
                  at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
                  at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
                  at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
                  at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
                  at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
                  at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:616)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                  at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                  at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                  at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                  at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                  at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                  at $Proxy202.start(Unknown Source)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                  at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:616)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                  at $Proxy9.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)

              • 4. Re: how to use hibernate with JBoss Portal ?
                antoine seilles Newbie

                I did copy my mysql-connector jar in server/default/lib and now it works.

                 

                But i think it's not a good solution.

                Can i do something better ?

                • 5. Re: how to use hibernate with JBoss Portal ?
                  Peter Johnson Master
                  That is the correct location for placing JDBC driver JAR files.
                  • 7. Re: how to use hibernate with JBoss Portal ?
                    antoine seilles Newbie

                    Hi,

                    How to do the same with GateIn now ?

                     

                    Thanks for your time.

                    • 8. Re: how to use hibernate with JBoss Portal ?
                      antoine seilles Newbie

                      I would like to use my portlets developped for JBoss in Gatein.

                      But i have dependencies to hibernate and i don't find how to setup my GatIn installation to deploy my portlets.

                       

                      If somebody can help me.

                      Thanks for your time.