我正在尝试使用maven-cargo-plugin
部署我的项目,pom.xml
看起来像
<properties>
<maven.cargo.version>1.4.8</maven.cargo.version>
<datasource.jndi>java:/jdbc/EarthDS</datasource.jndi>
<h2.user>sa</h2.user>
<h2.driver>org.h2.Driver</h2.driver>
<datasource.url>jdbc:h2:${project.build.directory}/earth</datasource.url>
<maven-failsafe-plugin.version>2.12</maven-failsafe-plugin.version>
<resteasy-client.version>3.0.8.Final</resteasy-client.version>
<jackson-mapper-asl.version>1.9.13</jackson-mapper-asl.version>
<maven-war-plugin.version>2.4</maven-war-plugin.version>
<derby.port>1527</derby.port>
<datasource.user>APP</datasource.user>
<datasource.password>nonemptypassword</datasource.password>
</properties>
<dependencies>
<dependency>
<groupId>com.learner</groupId>
<artifactId>services</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>com.learner</groupId>
<artifactId>persistence</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.learner</groupId>
<artifactId>database</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.learner</groupId>
<artifactId>database</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>${resteasy-client.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson-mapper-asl.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.11.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.11.1.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.6.Final</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.carlspring.maven</groupId>
<artifactId>derby-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<port>${derby.port}</port>
</configuration>
<executions>
<execution>
<id>start-derby</id>
<goals>
<goal>start</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
<execution>
<id>stop-derby</id>
<goals>
<goal>stop</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
<groups>
com.learner.persistence.harness.PreIntegration
</groups>
<excludedGroups>
com.learner.persistence.harness.Integration
</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.17</version>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
<groups>
com.learner.persistence.harness.Integration
</groups>
<excludedGroups>
com.learner.persistence.harness.PreIntegration
</excludedGroups>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${maven.cargo.version}</version>
<configuration>
<container>
<containerId>wildfly8x</containerId>
<dependencies combine.children="append">
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
</dependency>
</dependencies>
<systemProperties combine.children="append">
<hibernate.dialect>org.hibernate.dialect.DerbyTenSevenDialect
</hibernate.dialect>
</systemProperties>
</container>
<configuration>
<properties>
<cargo.servlet.port>9090</cargo.servlet.port>
<cargo.datasource.datasource.derby>
cargo.datasource.driver=org.apache.derby.jdbc.ClientDriver|
cargo.datasource.url=jdbc:derby://localhost:${derby.port}/integrationDB|
cargo.datasource.jndi=${datasource.jndi}|
cargo.datasource.username=${datasource.user}|
cargo.datasource.password=${datasource.password}
</cargo.datasource.datasource.derby>
</properties>
</configuration>
<deployables>
<deployable>
<properties>
<context>earth</context>
</properties>
<pingURL>http://localhost:9090/earth/rest/hello</pingURL>
<pingTimeout>36000</pingTimeout>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>start-container</id>
<goals>
<goal>start</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
<execution>
<id>stop-container</id>
<goals>
<goal>stop</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
[INFO] [talledLocalContainer] 15:36:43,203 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (default task-14) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
[INFO] [talledLocalContainer] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:304)
[INFO] [talledLocalContainer] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:311)
[INFO] [talledLocalContainer] at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:246)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:1144)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:446)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getTransactionNewConnection(AbstractPool.java:553)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:429)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:379)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:422)
[INFO] [talledLocalContainer] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:513)
[INFO] [talledLocalContainer] at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:142)
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.connection(StatementPreparerImpl.java:63) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:162) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:160) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1884) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1861) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.doQuery(Loader.java:909) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.doList(Loader.java:2551) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.doList(Loader.java:2537) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2367) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.Loader.list(Loader.java:2362) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:229) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1260) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) [hibernate-core-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449) [hibernate-entitymanager-4.3.1.Final.jar:4.3.1.Final]
[INFO] [talledLocalContainer] at com.mysema.query.jpa.impl.AbstractJPAQuery.getResultList(AbstractJPAQuery.java:195) [querydsl-jpa-3.4.3.jar:]
[INFO] [talledLocalContainer] at com.mysema.query.jpa.impl.AbstractJPAQuery.list(AbstractJPAQuery.java:243) [querydsl-jpa-3.4.3.jar:]
[INFO] [talledLocalContainer] at com.learner.persistence.PersonQueries.getPersons(PersonQueries.java:24) [persistence-1.0-SNAPSHOT.jar:]
[INFO] [talledLocalContainer] at com.learner.business.manager.PersonManager.getPersons(PersonManager.java:34) [business-1.0-SNAPSHOT.jar:]
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_05]
[INFO] [talledLocalContainer] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_05]
[INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]
[INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]
[INFO] [talledLocalContainer] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[INFO] [talledLocalContainer] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
[INFO] [talledLocalContainer] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
[INFO] [talledLocalContainer] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [wildfly-jpa-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
[INFO] [talledLocalContainer] at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
[INFO] [talledLocalContainer] at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.0.0.Final.jar:8.0.0.Final]
[INFO] [talledLocalContainer] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
[INFO] [talledLocalContainer] at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
[INFO] [talledLocalContainer] at
以前有人见过这个问题吗?我迷失了这个错误
由于