0 Replies Latest reply on Feb 20, 2012 10:37 PM by woniu17

    looking for simple project about JSF+SPRING+JPA

    woniu17

      I create a maven project in eclipse , it's an an spring+jsf+jpa archetype(shown below), but when I package it to .war file and deploy it to jboss 7.0.2,jboss gives me the wrong info as below. So I wish some one can give me a simple project about JSF+SPRING+JPA which can run in JBOSS7.1, or help me find the problem in the archetype. Project(without libs) is attached.

      Thanks!!


      Screenshot.png


      11:26:17,720 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "lqx2.war"

      11:26:20,287 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry activation.jar in "/content/lqx2.war/WEB-INF/lib/mail-1.4.jar"  does not point to a valid jar for a Class-Path reference.

      11:26:20,290 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jaxb-api.jar in "/content/lqx2.war/WEB-INF/lib/jaxb-impl-2.1.3.jar"  does not point to a valid jar for a Class-Path reference.

      11:26:20,291 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry activation.jar in "/content/lqx2.war/WEB-INF/lib/jaxb-impl-2.1.3.jar"  does not point to a valid jar for a Class-Path reference.

      11:26:20,292 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jsr173_1.0_api.jar in "/content/lqx2.war/WEB-INF/lib/jaxb-impl-2.1.3.jar"  does not point to a valid jar for a Class-Path reference.

      11:26:20,293 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jaxb1-impl.jar in "/content/lqx2.war/WEB-INF/lib/jaxb-impl-2.1.3.jar"  does not point to a valid jar for a Class-Path reference.

      11:26:20,700 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'

      11:26:20,702 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'

      11:26:20,735 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for acme

      11:26:22,664 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011402: Starting Persistence Unit Service 'lqx2.war#acme'

      11:26:23,118 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      11:26:23,138 INFO  [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.1.Final}

      11:26:23,141 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000206: hibernate.properties not found

      11:26:23,144 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000021: Bytecode provider name : javassist

      11:26:23,211 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [

          name: acme

          ...]

      11:26:23,263 WARN  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000059: Defining hibernate.transaction.flush_before_completion=true ignored in HEM

      11:26:23,799 WARN  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-4) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections

      11:26:23,870 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."lqx2.war#acme": org.jboss.msc.service.StartException in service jboss.persistenceunit."lqx2.war#acme": Failed to start service

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: acme] Unable to build EntityManagerFactory

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)

          at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

          at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          ... 3 more

      Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set

          at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97)

          at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67)

          at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:176)

          at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

          at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)

          at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)

          at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)

          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

          ... 9 more

       

      11:26:23,938 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 12977ms - Started 317 of 552 services (162 services failed or missing dependencies, 72 services are passive or on-demand)

      11:26:24,158 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "lqx2.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"lqx2.war#acme\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"lqx2.war#acme\": Failed to start service"}}

      11:26:24,383 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment lqx2.war in 228ms

      11:26:24,385 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.persistenceunit."lqx2.war#acme": org.jboss.msc.service.StartException in service jboss.persistenceunit."lqx2.war#acme": Failed to start service

       

      11:26:24,388 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"lqx2.war#acme\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"lqx2.war#acme\": Failed to start service"}}}}