jsf:org.jboss.msc.service.fail || MSC00001: Failed to start service jboss.persistenceunit

22:30:01,478 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found Hello.war in deployment directory. To trigger deployment create a file called Hello.war.dodeploy
22:30:01,483 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "Hello.war"
22:30:02,375 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb-api.jar in "/D:/Install package/J EE/jboss7.1.1/standalone/deployments/Hello.war/WEB-INF/lib/com.sun.tools.xjc_2.2.0.jar"  does not point to a valid jar for a Class-Path reference.
22:30:02,376 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jaxb-impl.jar in "/D:/Install package/J EE/jboss7.1.1/standalone/deployments/Hello.war/WEB-INF/lib/com.sun.tools.xjc_2.2.0.jar"  does not point to a valid jar for a Class-Path reference.
22:30:02,377 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry jsr173_1.0_api.jar in "/D:/Install package/J EE/jboss7.1.1/standalone/deployments/Hello.war/WEB-INF/lib/com.sun.tools.xjc_2.2.0.jar"  does not point to a valid jar for a Class-Path reference.
22:30:02,378 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry activation.jar in "/D:/Install package/J EE/jboss7.1.1/standalone/deployments/Hello.war/WEB-INF/lib/com.sun.tools.xjc_2.2.0.jar"  does not point to a valid jar for a Class-Path reference.
22:30:02,404 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
22:30:02,405 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'
22:30:02,409 INFO  [org.jboss.as.jpa] (MSC service thread 1-8) JBAS011401: Read persistence.xml for Hello
22:30:02,506 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) JBAS011402: Starting Persistence Unit Service 'Hello.war#Hello'
22:30:02,507 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-5) HHH000204: Processing PersistenceUnitInfo [
	name: Hello
	...]
22:30:02,511 WARN  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-5) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
22:30:02,512 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.persistenceunit."Hello.war#Hello": org.jboss.msc.service.StartException in service jboss.persistenceunit."Hello.war#Hello": 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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: Hello] 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

22:30:02,725 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "Hello.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"Hello.war#Hello\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"Hello.war#Hello\": Failed to start service"}}
22:30:02,794 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment Hello.war in 68ms
22:30:02,795 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.persistenceunit."Hello.war#Hello": org.jboss.msc.service.StartException in service jboss.persistenceunit."Hello.war#Hello": Failed to start service

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


出现错误:22:30:02,512 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.persistenceunit.

自己在网上找了好久都没有找到有使用性的解决方法,最后在我们班里找了位同学看了看他的电脑(程序在电脑上是可以正常运行)。比较发现我们导入的JSF Capabilities版本不同,我下载的是最新版JSF 2.2、而他用的是JSF2.0.


最后在创建工程的时候,


这样创建的工程就可以正常访问xhtml文件了。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值