Hibernate annotated package  not found - AS7

    Hi,

     

    I built a WAR file based on hibernate 3.5.3-Final and Spring 3. When I deployed the WAR file to AS7, it shown the followoing WARNings.

     

     

    00:32:16,626 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence

    00:32:16,647 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

    00:32:16,647 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)

    00:32:16,648 WARN  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) Unable to instantiate driver class "com.mysql.jdbc.Driver": org.jboss.msc.service.DuplicateServiceException: Service jboss.jdbc-driver.category-ws-0_0_1-SNAPSHOT_war is already registered

    00:32:16,652 INFO  [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-6) Starting service jboss.ws.endpoint."category-ws-0.0.1-SNAPSHOT".CXFCategoryServlet

    00:32:16,653 INFO  [org.jboss.jpa] (MSC service thread 1-8) starting Persistence Unit Service 'category-ws-0.0.1-SNAPSHOT.war#HousewareCategoryPU'

    00:32:16,726 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-8) Hibernate Commons Annotations 3.2.0.Final

    00:32:16,729 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) HHH00412:Hibernate [WORKING]

    00:32:16,730 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) HHH00206:hibernate.properties not found

    00:32:16,731 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-8) HHH00021:Bytecode provider name : javassist

    00:32:16,744 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-8) HHH00204:Processing PersistenceUnitInfo [

            name: HousewareCategoryPU

            ...]

    00:32:16,776 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-8) HHH00194:Package not found or wo package-info.java: ix.houseware.category.service

    00:32:16,776 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-8) HHH00194:Package not found or wo package-info.java: ix.houseware.category.bean

    00:32:16,776 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-8) HHH00194:Package not found or wo package-info.java: ix.houseware.category.common

    00:32:16,776 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-8) HHH00194:Package not found or wo package-info.java: ix.houseware.category.base

    00:32:16,777 WARN  [org.hibernate.cfg.AnnotationBinder] (MSC service thread 1-8) HHH00194:Package not found or wo package-info.java: ix.houseware.category.Enum

    00:32:16,885 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-8) HHH00130:Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

    00:32:16,915 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-8) HHH00400:Using dialect: org.hibernate.dialect.MySQLDialect

    00:32:16,925 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-8) HHH00268:Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory

    00:32:16,928 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-8) HHH00397:Using ASTQueryTranslatorFactory

    00:32:16,954 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-8) Hibernate Validator 4.2.0.Final

    00:32:17,183 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH00228:Running hbm2ddl schema update

    00:32:17,183 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH00102:Fetching database metadata

    00:32:17,186 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH00396:Updating schema

    00:32:17,188 INFO  [java.sql.DatabaseMetaData] (MSC service thread 1-8) HHH00262:Table not found: REVINFO

    00:32:17,317 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00261:Table found: houseware.category_images

    00:32:17,317 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00037:Columns: [image_data, image_title, image_type, category_id, image_id]

    00:32:17,317 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00108:Foreign keys: [category_images_ibfk_1]

    00:32:17,317 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00126:Indexes: [primary]

    00:32:17,331 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00261:Table found: houseware.category_subcategories

    00:32:17,331 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00037:Columns: [category_name, lft, rgt, category_id, category_desc]

    00:32:17,331 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00108:Foreign keys: []

    00:32:17,331 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (MSC service thread 1-8) HHH00126:Indexes: [lft, primary, rgt]

    00:32:17,332 INFO  [java.sql.DatabaseMetaData] (MSC service thread 1-8) HHH00262:Table not found: REVINFO

    00:32:17,337 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-8) HHH00232:Schema update complete

    00:32:17,464 INFO  [org.jboss.web] (MSC service thread 1-1) registering web context: /category-ws-0.0.1-SNAPSHOT

    00:32:17,477 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployed "category-ws-0.0.1-SNAPSHOT.war"

     

     

    persistence.xml file:

     

     

    <?xml version="1.0" encoding="UTF-8"?>

    <persistence version="1.0" 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">

      <persistence-unit name="HousewareCategoryPU" transaction-type="JTA">

        <provider>org.hibernate.ejb.HibernatePersistence</provider>

        <jta-data-source>java:jboss/datasources/Houseware</jta-data-source>

        <exclude-unlisted-classes>false</exclude-unlisted-classes>

        <properties>

          <property name="hibernate.hbm2ddl.auto" value="update"/>

        </properties>

      </persistence-unit>

    </persistence>

     

     

    What I may have missing in my project configuration?

     

    Your suggestion is very appreciated.

    Thanks

    Sam