Good afternoon,
I have troubles with configuring OpenEJB with our application. My project
contains multiple modules. Let's say it looks like that:
- MyApp – enterprise application to be used as deployable unit,
- MyApp-B – EJB module with service facade implementations and resource
access components to integrate external resources,
- MyApp-BC – EJB client module containing all service facade interfaces
and the domain model,
- MyApp-UI – web application providing the user interface,
- MyApp-WS – web application exposing web services endpoints for service
facades,
- MyApp-D – module storing DAOs,
- MyApp-RWS – module storing REST web services.
I wanted to start with module B as a main place for configuration (module
MyApp-BC will be probably the main one). And what I did here is:
1. I put in *pom.xml* these extra dependencies:
<dependency>
<groupId>com.myapp</groupId>
<artifactId>MyApp-BC</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-junit</artifactId>
<version>4.7.5</version>
<exclusions>
<exclusion>
<artifactId>slf4j-jdk14</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-jee</artifactId>
<version>4.7.5</version>
</dependency>
1. Inside of root folder for this module, I've created *conf* folder
with *openejb.xml*, where I defined as a Resource my DB connection.
2. Created a file *application-client.xml** in
*src/test/resources/META-INF* with content:
<?xml version="1.0" encoding="UTF-8"?>
<application-client/>
1. And under *src/main/test* directory created new test:
@ContextConfig(properties = {
@Property("java.naming.factory.initial=org.apache.openejb.core.LocalInitialContextFactory"),
@Property("openejb.deployments.classpath.exclude=.*\\.jar"),
// @Property("openejb.tempclassloader.skip=annotations"),
// @Property("openejb.altdd.prefix=test-"),
@Property("openejb.deployments.classpath.filter.descriptors=true") })
@RunTestAs("Authenticated")
@RunWith(OpenEjbRunner.class)
@LocalClient
public class MyTestClassImplIntegrationTest {
@EJB
private MyTestClassImpl myTestClassImpl;
@Test
public void testMethod() {
// some code for test method
}
}
1. The multiple *@Property* annotations I took from our inside
guideline. The commented one, I get from trying to find solution on
internet. For @Property("openejb.altdd.prefix=test-") I've created
duplicated file of mine *ejb-jar.xml*. In both *ejb-jar* files I have
something like that:
<session>
<ejb-name>CacheManager</ejb-name>
<ejb-class>com.myapp.cache.CacheManager</ejb-class>
<resource-ref>
<res-ref-name>MyApp/Cache</res-ref-name>
<res-type>com.ibm.websphere.cache.DistributedMap</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</session>
The *CacheManager* class is located in MyApp-BC module.
When I try to run the test in Eclipse I get the error from
*Console_output.txt* and *JUnit_logs.txt*
So I tried to remove <ejb-class>com.myapp.cache.CacheManager</ejb-class> from
both *ejb-jar* files, but then I receive this error: *Console_output_2.txt*
Am I missing something or OpenEJB just doesn’t work with DistributedMap
from IBM?
I would really appreciate your help.
Best regards,
Przemek
INFO -
********************************************************************************
INFO - OpenEJB http://tomee.apache.org/
INFO - Startup: Thu Oct 18 17:03:05 CEST 2018
INFO - Copyright 1999-2015 (C) Apache OpenEJB/TomEE Project, All Rights
Reserved.
INFO - Version: 4.7.5
INFO - Build date: 20170927
INFO - Build time: 12:02
INFO -
********************************************************************************
INFO - openejb.home = C:\MyApp\MyApp-B
INFO - openejb.base = C:\MyApp\MyApp-B
INFO - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@f986dd20
INFO - Succeeded in installing singleton service
INFO - Using 'openejb.altdd.prefix=test-'
INFO - openejb configuration file is 'C:\MyApp\MyApp-B\conf\openejb.xml'
INFO - Configuring Service(id=Default Security Service, type=SecurityService,
provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=jdbc/MyApp-Oracle, type=Resource,
provider-id=Default JDBC Database)
INFO - Using 'openejb.deployments.classpath.exclude=.*\.jar'
INFO - Using 'openejb.deployments.classpath.filter.descriptors=true'
INFO - Found EjbModule in classpath: c:\myapp\myapp-b\target\classes
INFO - Found ClientModule in classpath: c:\myapp\myapp-b\target\test-classes
INFO - Found EjbModule in classpath: c:\myapp\myapp-bc\target\classes
INFO - Beginning load: c:\myapp\myapp-b\target\classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - AltDD ejb-jar.xml ->
file:/c:/myapp/myapp-b/target/classes/META-INF/test-ejb-jar.xml
INFO - Beginning load: c:\myapp\myapp-b\target\test-classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Beginning load: c:\myapp\myapp-bc\target\classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Configuring enterprise application: C:\MyApp\MyApp-B\classpath.ear
java.lang.NoClassDefFoundError: Could not fully load class:
com.myapp.cache.CacheManager
due to:com.ibm.websphere.cache.DistributedMap
in classLoader:
org.apache.openejb.core.TempClassLoader@b6b234f6
at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:136)
at org.apache.xbean.finder.ClassFinder.<init>(ClassFinder.java:127)
at
org.apache.openejb.config.rules.CheckCallbacks.validate(CheckCallbacks.java:86)
at
org.apache.openejb.config.rules.ValidationBase.validate(ValidationBase.java:50)
at
org.apache.openejb.config.AppValidator.validate(AppValidator.java:101)
at
org.apache.openejb.config.ValidateModules.deploy(ValidateModules.java:38)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:487)
at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:466)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
at javax.naming.InitialContext.init(InitialContext.java:255)
at javax.naming.InitialContext.<init>(InitialContext.java:227)
at
org.apache.openejb.junit.context.OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:161)
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:122)
at
org.apache.openejb.junit.context.ContextWrapperStatement.evaluate(ContextWrapperStatement.java:37)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:119)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
INFO - Auto-deploying ejb PropertiesEJB:
EjbDeployment(deployment-id=PropertiesEJB)
INFO - Auto-deploying ejb IkpStoredProcedureBean:
EjbDeployment(deployment-id=IkpStoredProcedureBean)
INFO - Auto-deploying ejb OB0StoredProcedureBean:
EjbDeployment(deployment-id=OB0StoredProcedureBean)
INFO - Auto-deploying ejb GianosStoredProcedureBean:
EjbDeployment(deployment-id=GianosStoredProcedureBean)
INFO - Auto-deploying ejb EgaStoredProcedureBean:
EjbDeployment(deployment-id=EgaStoredProcedureBean)
INFO - Auto-deploying ejb CacheManager:
EjbDeployment(deployment-id=CacheManager)
INFO - Auto-deploying ejb MdeStatusManager:
EjbDeployment(deployment-id=MdeStatusManager)
INFO - Auto-deploying ejb SignatureManagerAssembler:
EjbDeployment(deployment-id=SignatureManagerAssembler)
INFO - Auto-deploying ejb IkpGeneratorResponse:
EjbDeployment(deployment-id=IkpGeneratorResponse)
INFO - Auto-deploying ejb ErrorHandlerObject:
EjbDeployment(deployment-id=ErrorHandlerObject)
INFO - Auto-deploying ejb InterruptProcessForAgenzia:
EjbDeployment(deployment-id=InterruptProcessForAgenzia)
INFO - Auto-deploying ejb OB0BusinessObject:
EjbDeployment(deployment-id=OB0BusinessObject)
INFO - Auto-deploying ejb InterruptProcessForInternetBanking:
EjbDeployment(deployment-id=InterruptProcessForInternetBanking)
INFO - Auto-deploying ejb MdeRequestCreatorBean:
EjbDeployment(deployment-id=MdeRequestCreatorBean)
INFO - Auto-deploying ejb JFormServiceAdapter:
EjbDeployment(deployment-id=JFormServiceAdapter)
INFO - Auto-deploying ejb XpiCenteraDocServiceAdapter:
EjbDeployment(deployment-id=XpiCenteraDocServiceAdapter)
INFO - Auto-deploying ejb EgaResponseGenerator:
EjbDeployment(deployment-id=EgaResponseGenerator)
INFO - Auto-deploying ejb CertificateServiceAdapter:
EjbDeployment(deployment-id=CertificateServiceAdapter)
INFO - Auto-deploying ejb GianosBusinessObject:
EjbDeployment(deployment-id=GianosBusinessObject)
INFO - Auto-deploying ejb StoredProcedureStatementManager:
EjbDeployment(deployment-id=StoredProcedureStatementManager)
INFO - Auto-deploying ejb CustomerDataBean:
EjbDeployment(deployment-id=CustomerDataBean)
INFO - Auto-deploying ejb WebServicesServiceFactory:
EjbDeployment(deployment-id=WebServicesServiceFactory)
INFO - Auto-deploying ejb GianosResponseGenerator:
EjbDeployment(deployment-id=GianosResponseGenerator)
INFO - Auto-deploying ejb MdeCancellationRequestBean:
EjbDeployment(deployment-id=MdeCancellationRequestBean)
INFO - Auto-deploying ejb SearchPageDataBean:
EjbDeployment(deployment-id=SearchPageDataBean)
INFO - Auto-deploying ejb PropertiesAccessor:
EjbDeployment(deployment-id=PropertiesAccessor)
INFO - Auto-deploying ejb BdmServiceAdapter:
EjbDeployment(deployment-id=BdmServiceAdapter)
INFO - Auto-deploying ejb ResponseDateGenerator:
EjbDeployment(deployment-id=ResponseDateGenerator)
INFO - Auto-deploying ejb DocumentFinalStep:
EjbDeployment(deployment-id=DocumentFinalStep)
INFO - Auto-deploying ejb StoredProcedureLogManager:
EjbDeployment(deployment-id=StoredProcedureLogManager)
INFO - Auto-deploying ejb ProcessIdGenerator:
EjbDeployment(deployment-id=ProcessIdGenerator)
INFO - Auto-deploying ejb XpiStatusMapper:
EjbDeployment(deployment-id=XpiStatusMapper)
INFO - Auto-deploying ejb ThirdPartServicesServiceFacade:
EjbDeployment(deployment-id=ThirdPartServicesServiceFacade)
INFO - Auto-deploying ejb SubormsImplementation:
EjbDeployment(deployment-id=SubormsImplementation)
INFO - Auto-deploying ejb MdeResponseGenerator:
EjbDeployment(deployment-id=MdeResponseGenerator)
INFO - Auto-deploying ejb SignedDocumentExtractor:
EjbDeployment(deployment-id=SignedDocumentExtractor)
INFO - Auto-deploying ejb MdeStatusMapper:
EjbDeployment(deployment-id=MdeStatusMapper)
INFO - Auto-deploying ejb InternetBankingStatusMapper:
EjbDeployment(deployment-id=InternetBankingStatusMapper)
INFO - Auto-deploying ejb MdeServiceAdapter:
EjbDeployment(deployment-id=MdeServiceAdapter)
INFO - Auto-deploying ejb PrintStatusGenerator:
EjbDeployment(deployment-id=PrintStatusGenerator)
INFO - Auto-deploying ejb InterruptProcessResponseGeneratorImpl:
EjbDeployment(deployment-id=InterruptProcessResponseGeneratorImpl)
INFO - Auto-deploying ejb CifBusinessObject:
EjbDeployment(deployment-id=CifBusinessObject)
INFO - Auto-deploying ejb SignatureManagerBean:
EjbDeployment(deployment-id=SignatureManagerBean)
INFO - Auto-deploying ejb XpiInterruptProcessServiceAdapter:
EjbDeployment(deployment-id=XpiInterruptProcessServiceAdapter)
INFO - Auto-deploying ejb InitialDataCommiter:
EjbDeployment(deployment-id=InitialDataCommiter)
INFO - Auto-deploying ejb CifServiceAdapter:
EjbDeployment(deployment-id=CifServiceAdapter)
INFO - Auto-deploying ejb SignatureWebServicesManager:
EjbDeployment(deployment-id=SignatureWebServicesManager)
INFO - Auto-deploying ejb CenteraServiceAdapter:
EjbDeployment(deployment-id=CenteraServiceAdapter)
INFO - Auto-deploying ejb XpiPdfServiceAdapter:
EjbDeployment(deployment-id=XpiPdfServiceAdapter)
INFO - Auto-deploying ejb PrepareInitialDataBean:
EjbDeployment(deployment-id=PrepareInitialDataBean)
INFO - Auto-deploying ejb EgaBusinessObject:
EjbDeployment(deployment-id=EgaBusinessObject)
INFO - Auto-deploying ejb MyAppStatusGeneratorImpl:
EjbDeployment(deployment-id=MyAppStatusGeneratorImpl)
INFO - Auto-deploying ejb CacheManager:
EjbDeployment(deployment-id=CacheManager)
INFO - Configuring Service(id=Default Stateless Container, type=Container,
provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean PropertiesEJB:
Container(type=STATELESS, id=Default Stateless Container)
WARN - Jar not loaded. classpath.ear. Can't find resource for null. (No
provider available for resource-ref id with type
'com.ibm.websphere.cache.DistributedMap' for 'CacheManager'.)
org.apache.openejb.OpenEJBException: Can't find resource for null. (No provider
available for resource-ref id with type
'com.ibm.websphere.cache.DistributedMap' for 'CacheManager'.)
at
org.apache.openejb.config.AutoConfig.processResourceRef(AutoConfig.java:1176)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:855)
at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:196)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:487)
at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:466)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
at javax.naming.InitialContext.init(InitialContext.java:255)
at javax.naming.InitialContext.<init>(InitialContext.java:227)
at
org.apache.openejb.junit.context.OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:161)
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:122)
at
org.apache.openejb.junit.context.ContextWrapperStatement.evaluate(ContextWrapperStatement.java:37)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:119)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
INFO - Creating TransactionManager(id=Default Transaction Manager)
INFO - Creating SecurityService(id=Default Security Service)
INFO - Using
'java.security.auth.login.config=jar:file:/C:/mvnLocalRepo/org/apache/openejb/openejb-junit/4.7.5/openejb-junit-4.7.5.jar!/META-INF/openejb-test-login.config'
INFO - Creating Resource(id=jdbc/MyApp-Oracle)
INFO - Creating Container(id=Default Stateless Container)org.apache.openejb.OpenEJBRuntimeException: Failed to configure object.
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:130)
at
org.apache.openejb.junit.context.ContextWrapperStatement.evaluate(ContextWrapperStatement.java:37)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:119)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: javax.naming.NamingException: Injection failed [Root exception is
org.apache.openejb.OpenEJBException: Unable to find injection meta-data for
com.myapp.MyTestClassImplIntegrationTest. Ensure that class was annotated with
@org.apache.openejb.api.LocalClient and was successfully discovered and
deployed. See http://tomee.apache.org/3.0/local-client-injection.html]
at
org.apache.openejb.core.LocalInitialContext.inject(LocalInitialContext.java:196)
at
org.apache.openejb.core.LocalInitialContext.bind(LocalInitialContext.java:186)
at javax.naming.InitialContext.bind(InitialContext.java:436)
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:122)
... 17 more
Caused by: org.apache.openejb.OpenEJBException: Unable to find injection
meta-data for com.myapp.MyTestClassImplIntegrationTest. Ensure that class was
annotated with @org.apache.openejb.api.LocalClient and was successfully
discovered and deployed. See
http://tomee.apache.org/3.0/local-client-injection.html
at
org.apache.openejb.ClientInjections.clientInjector(ClientInjections.java:70)
at
org.apache.openejb.core.LocalInitialContext.inject(LocalInitialContext.java:194)
... 20 more
INFO -
********************************************************************************
INFO - OpenEJB http://tomee.apache.org/
INFO - Startup: Thu Oct 18 16:53:59 CEST 2018
INFO - Copyright 1999-2015 (C) Apache OpenEJB/TomEE Project, All Rights
Reserved.
INFO - Version: 4.7.5
INFO - Build date: 20170927
INFO - Build time: 12:02
INFO -
********************************************************************************
INFO - openejb.home = C:\MyApp\MyApp-B
INFO - openejb.base = C:\MyApp\MyApp-B
INFO - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@1bdcc3ef
INFO - Succeeded in installing singleton service
INFO - Using 'openejb.altdd.prefix=test-'
INFO - openejb configuration file is 'C:\MyApp\MyApp-B\conf\openejb.xml'
INFO - Configuring Service(id=Default Security Service, type=SecurityService,
provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=jdbc/MyApp-Oracle, type=Resource,
provider-id=Default JDBC Database)
INFO - Using 'openejb.deployments.classpath.exclude=.*\.jar'
INFO - Using 'openejb.deployments.classpath.filter.descriptors=true'
INFO - Found EjbModule in classpath: c:\myapp\myapp-b\target\classes
INFO - Found ClientModule in classpath: c:\myapp\myapp-b\target\test-classes
INFO - Found EjbModule in classpath: c:\myapp\myapp-bc\target\classes
INFO - Beginning load: c:\myapp\myapp-b\target\classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - AltDD ejb-jar.xml ->
file:/c:/myapp/myapp-b/target/classes/META-INF/test-ejb-jar.xml
INFO - Beginning load: c:\myapp\myapp-b\target\test-classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Beginning load: c:\myapp\myapp-bc\target\classes
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Using 'openejb.tempclassloader.skip=annotations'
INFO - Configuring enterprise application: C:\MyApp\MyApp-B\classpath.ear
ERROR - FATAL ERROR: Unknown error in Assembler. Please send the following
stack trace and this message to [email protected] :
java.lang.NullPointerException: name cannot be null
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:116)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:80)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2303)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1823)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:360)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:487)
at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:466)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
at javax.naming.InitialContext.init(InitialContext.java:255)
at javax.naming.InitialContext.<init>(InitialContext.java:227)
at
org.apache.openejb.junit.context.OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:161)
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:122)
at
org.apache.openejb.junit.context.ContextWrapperStatement.evaluate(ContextWrapperStatement.java:37)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:119)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
ERROR - OpenEJB has encountered a fatal error and cannot be started: Assembler
failed to build the container system.
org.apache.openejb.OpenEJBException: java.lang.NullPointerException: name
cannot be null: name cannot be null
at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:480)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
at
org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
at
org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
at javax.naming.InitialContext.init(InitialContext.java:255)
at javax.naming.InitialContext.<init>(InitialContext.java:227)
at
org.apache.openejb.junit.context.OpenEjbTestContext.getInitialContext(OpenEjbTestContext.java:161)
at
org.apache.openejb.junit.context.OpenEjbTestContext.configureTest(OpenEjbTestContext.java:122)
at
org.apache.openejb.junit.context.ContextWrapperStatement.evaluate(ContextWrapperStatement.java:37)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.openejb.junit.OpenEjbRunner.run(OpenEjbRunner.java:119)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: java.lang.NullPointerException: name cannot be null
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:116)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:80)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:2303)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1823)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:360)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
at
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:487)
at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:466)
... 35 more