我在 Eclipse 4.2.1(构建 20121004-1855)中设置了一个 Maven 项目。该项目(除其他外)在 pom.xml 中配置了两个必要的依赖项,它们是:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-calendar</artifactId>
<version>v3-rev16-1.8.0-beta</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.11.0-beta</version>
</dependency>
第一个库允许我连接谷歌日历服务并与之交互。第二个库使我能够处理 JSON。
问题是当我尝试在 JBoss AS 7 中部署项目时,我收到以下错误:
17:31:09,754 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 8392ms - Started 178 of 255 services (76 services are passive or on-demand)
17:43:12,193 INFO [org.jboss.as.repository] (management-handler-thread - 5) JBAS014900: Content added at location /usr/local/jboss-as-7.1.1.Final/standalone/data/content/c6/3443036ca32a120acc8adf87de993f18a60175/content
17:43:12,204 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "eventes.war"
17:43:14,046 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpclient-4.0.3.jar in "/content/eventes.war/WEB-INF/lib/google-oauth-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,047 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpcore-4.0.1.jar in "/content/eventes.war/WEB-INF/lib/google-oauth-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,048 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpclient-4.0.3.jar in "/content/eventes.war/WEB-INF/lib/google-http-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,049 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpcore-4.0.1.jar in "/content/eventes.war/WEB-INF/lib/google-http-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,051 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpclient-4.0.3.jar in "/content/eventes.war/WEB-INF/lib/google-http-client-jackson2-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,053 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpcore-4.0.1.jar in "/content/eventes.war/WEB-INF/lib/google-http-client-jackson2-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,054 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry commons-codec-1.6.jar in "/content/eventes.war/WEB-INF/lib/google-http-client-jackson2-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,057 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpclient-4.0.3.jar in "/content/eventes.war/WEB-INF/lib/google-api-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,058 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry httpcore-4.0.1.jar in "/content/eventes.war/WEB-INF/lib/google-api-client-1.11.0-beta.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,059 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry jaxb-api.jar in "/content/eventes.war/WEB-INF/lib/jaxb-impl-2.2.4.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,060 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry activation.jar in "/content/eventes.war/WEB-INF/lib/jaxb-impl-2.2.4.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,061 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry jsr173_1.0_api.jar in "/content/eventes.war/WEB-INF/lib/jaxb-impl-2.2.4.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,061 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) Class Path entry jaxb1-impl.jar in "/content/eventes.war/WEB-INF/lib/jaxb-impl-2.2.4.jar" does not point to a valid jar for a Class-Path reference.
17:43:14,099 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-api-client-1.11.0-beta.jar".main: org.jboss.msc.service.StartException in service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-api-client-1.11.0-beta.jar".main: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-api-client-1.11.0-beta.jar (No such file or directory)
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-api-client-1.11.0-beta.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_07]
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:63) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
17:43:14,097 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/guava-11.0.1.jar".main: org.jboss.msc.service.StartException in service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/guava-11.0.1.jar".main: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/guava-11.0.1.jar (No such file or directory)
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/guava-11.0.1.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_07]
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:63) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
17:43:14,097 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-http-client-1.11.0-beta.jar".main: org.jboss.msc.service.StartException in service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-http-client-1.11.0-beta.jar".main: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-http-client-1.11.0-beta.jar (No such file or directory)
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-http-client-1.11.0-beta.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_07]
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:63) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
17:43:14,097 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-oauth-client-1.11.0-beta.jar".main: org.jboss.msc.service.StartException in service jboss.module.spec.service."deployment.external./home/codegen/dependencies/java/stable/dependencies/libs/google-oauth-client-1.11.0-beta.jar".main: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-oauth-client-1.11.0-beta.jar (No such file or directory)
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
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]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: java.io.FileNotFoundException: /home/codegen/dependencies/java/stable/dependencies/libs/google-oauth-client-1.11.0-beta.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:214) [rt.jar:1.7.0_07]
at java.util.zip.ZipFile.<init>(ZipFile.java:144) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:152) [rt.jar:1.7.0_07]
at java.util.jar.JarFile.<init>(JarFile.java:116) [rt.jar:1.7.0_07]
at org.jboss.as.server.moduleservice.ExternalModuleSpecService.start(ExternalModuleSpecService.java:63) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
17:43:14,210 INFO [org.jboss.as.server] (management-handler-thread - 5) JBAS015870: Deploy of deployment "eventes.war" was rolled back with failure message JBAS014750: Operation handler failed to complete
17:43:14,247 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment eventes.war in 36ms
我知道问题出在这些依赖项中,因为我有另一个非常相似的项目,它没有这两个依赖项,并且它没有任何问题。如果我将这些依赖项放在工作项目中,它就不再部署,并给出上述消息。
我从 JBoss AS 7 开始,我到处寻找解决方案。谁能给我一盏灯?有谁知道上述错误“/home/codegen/dependencies/java/stable/dependencies/libs/”中的这一行是什么意思?
我对这个真的很沮丧。
提前感谢您的任何帮助。