2 Replies Latest reply on Mar 9, 2009 6:23 AM by Senthil kumar

    problem integration with seam,mysql in jboss.

    Senthil kumar Newbie
      Hi guys,

              I've tried seam book example in jboss. its working fine. but i getting error while to replace the default database to my own mysql database.

      ds.xml
      ------
      <datasources>
          <local-tx-datasource>
              <jndi-name>bookingDatasource</jndi-name>
              <connection-url>jdbc:mysql://localhost/Seam</connection-url>
              <driver-class>com.mysql.jdbc.Driver</driver-class>
              <user-name>root</user-name>
              <password>sa</password>
          </local-tx-datasource>
      </datasources>


      persistence.xml
      ---------------
      <persistence-unit name="bookingDatabase">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>    
            <jta-data-source>java:/bookingDatasource</jta-data-source>
            <properties>
               <!--<property name="hibernate.hbm2ddl.auto" value="create-drop"/>-->
               <property name="hibernate.show_sql" value="true"/>
               <!-- These are the default for JBoss EJB3, but not for HEM: -->
                <property name="dialect" value="org.hibernate.dialect.MySQLDialect"/>
               <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
            </properties>
         </persistence-unit>
      </persistence>

      log.error
      ---------

      12:32:37,636 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=myjboss.ear/myjboss-e
      jb.jar#bookingDatabase
      12:32:37,699 INFO  [Version] Hibernate Annotations 3.3.0.GA
      12:32:37,714 INFO  [Environment] Hibernate 3.2.4.sp1
      12:32:37,714 INFO  [Environment] hibernate.properties not found
      12:32:37,714 INFO  [Environment] Bytecode provider name : javassist
      12:32:37,730 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
      12:32:37,793 INFO  [Version] Hibernate EntityManager 3.3.1.GA
      12:32:37,808 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=myjboss.ear/myjb
      oss-ejb.jar#bookingDatabase state=Create
      java.lang.RuntimeException: error trying to scan <jar-file>: vfszip:/E:/jboss-5.0.0.GA/server/default/deploy/myjboss.ear
      /myjboss-ejb.jar
              at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
              at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
              at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:311)
              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:597)
              at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
              at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
              at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelCont
      rollerContextAction.java:241)
              at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerCo
      ntextAction.java:109)
              at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAc
      tion.java:70)
              at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
              at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContext
      Action.java:62)

      I have no idea what can be wrong here.

      thanxs a lot