我有个gradle项目。构建正常运行,包括测试。但当我仅使用intellij idea运行测试时,测试失败:
24-Nov-2020 07:10:59.129 SEVERE [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans module deployment failed
java.lang.NullPointerException
...
24-Nov-2020 07:10:59.130 SEVERE [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal Unable to deploy collapsed ear in war StandardEngine[Catalina].StandardHost[localhost].StandardContext[/isugf_cross]
javax.enterprise.inject.spi.DeploymentException: couldn't start owb context
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:254)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:43)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:971)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:759)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1309)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1131)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:134)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5044)
我的身材看起来像:
plugins {
id 'java'
id 'war'
}
group 'uz.fido_biznes'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compileOnly('javax:javaee-web-api:7.0')
implementation fileTree(dir:'D:\\Husan\\projects_work\\FIDO_EXCHANGE\\userlib', include:'/**/*.jar')
testImplementation('org.testng:testng:7.1.0')
}
test {
useTestNG()
}
暂无答案!
目前还没有任何答案,快来回答吧!