tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mauro2java2011 <mauro2java2...@gmail.com>
Subject test for example REST and EJB not work without maven
Date Wed, 04 Feb 2015 11:01:04 GMT
i all. 
*i have tried the rest and ejb without mave:
i have split it int o2 project:* 

*1)JpaEntityLibrary* ( a jar of my module persistency . With
meta-inf/persistence.xml and the Entity enhance at built time ( i have put
into classpath of javac the openJPA2.2.all.jar and the entity is persisted.

NOTE:i have renamed the persistence.unit from user to userdb 

*2) the rest-on-ejb project that references the jar with entity* .(i ahve
erased the Entity into this project because it is get from the
JpaEntityLibrary.jar already enhanced .
 * (2-a)  NOTE:int othe ejb i have put:


    @PersistenceContext(unitName ="userdb")//originally is without the
unitname
    private EntityManager em;
*
 *  (2-b) into the classpath of project i have put all jars form the
openejb.4.7.1/lib

3) when i compile the rest-on-ejb project i get:*

ant -f E:\\documenti_mauro\\prove_rest_openejb4.7.1\\rest-on-ejb
-Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Deleting directory
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build
clean:
init:
deps-jar:
Created dir:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\classes
Created dir:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\empty
Created dir:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\generated-sources\ap-source-output
Compiling 1 source file to
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\classes
warning: Supported source version 'RELEASE_6' from annotation processor
'org.apache.openjpa.persistence.meta.AnnotationProcessor6' less than -source
'1.8'
1 warning
begin openJPAC
<openjpa-2.2.0-r422266:1244990 fatal user error>
org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be
configured (conf.newMetaDataFactoryInstance() returned null). This might
mean that no configuration properties were found. Ensure that you have a
META-INF/persistence.xml file, that it is available in your classpath, or
that the properties file you are using for configuration is available. If
you are using Ant, please see the <properties> or <propertiesFile>
attributes of the task's nested <config> element. This can also occur if
your OpenJPA distribution jars are corrupt, or if your security policy is
overly strict.
	at
org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(MetaDataRepository.java:1904)
	at
org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataRepository.java:1885)
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:518)
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:443)
	at
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)
	at
org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
	at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
	at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:968)
	at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:88)
	at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:171)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.GeneratedMethodAccessor437.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
	at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
	at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
	at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build.xml:86: 
<openjpa-2.2.0-r422266:1244990 fatal user error>
org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be
configured (conf.newMetaDataFactoryInstance() returned null). This might
mean that no configuration properties were found. Ensure that you have a
META-INF/persistence.xml file, that it is available in your classpath, or
that the properties file you are using for configuration is available. If
you are using Ant, please see the <properties> or <propertiesFile>
attributes of the task's nested <config> element. This can also occur if
your OpenJPA distribution jars are corrupt, or if your security policy is
overly strict.
	at
org.apache.openjpa.meta.MetaDataRepository.initializeMetaDataFactory(MetaDataRepository.java:1904)
	at
org.apache.openjpa.meta.MetaDataRepository.endConfiguration(MetaDataRepository.java:1885)
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:518)
	at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:443)
	at
org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)
	at
org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
	at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
	at
org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:968)
	at org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:88)
	at org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:171)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.GeneratedMethodAccessor437.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
	at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
	at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
	at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 2 seconds)

4) when i try the test i get:


INFORMAZIONI -
********************************************************************************
INFORMAZIONI - OpenEJB http://openejb.apache.org/
INFORMAZIONI - Startup: Wed Feb 04 11:56:42 CET 2015
INFORMAZIONI - Copyright 1999-2013 (C) Apache OpenEJB Project, All Rights
Reserved.
INFORMAZIONI - Version: 4.7.1
INFORMAZIONI - Build date: 20140912
INFORMAZIONI - Build time: 01:43
INFORMAZIONI -
********************************************************************************
INFORMAZIONI - openejb.home =
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb
INFORMAZIONI - openejb.base =
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb
INFORMAZIONI - Created new singletonService
org.apache.openejb.cdi.ThreadSingletonServiceImpl@1bcffb5
INFORMAZIONI - Succeeded in installing singleton service
INFORMAZIONI - Using 'javax.ejb.embeddable.EJBContainer=true'
INFORMAZIONI - Cannot find the configuration file [conf/openejb.xml].  Will
attempt to create one for the beans deployed.
INFORMAZIONI - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFORMAZIONI - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFORMAZIONI - Creating TransactionManager(id=Default Transaction Manager)
INFORMAZIONI - Creating SecurityService(id=Default Security Service)
INFORMAZIONI - Found EjbModule in classpath:
e:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\classes
INFORMAZIONI - Found PersistenceModule in classpath:
e:\documenti_mauro\prove_rest_openejb4.7.1\jpaentitieslibrary\build\classes
INFORMAZIONI - Searched 10 classpath urls in 3032 milliseconds.  Average 303
milliseconds per url.
INFORMAZIONI - Beginning load:
e:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb\build\classes
INFORMAZIONI - Beginning load:
e:\documenti_mauro\prove_rest_openejb4.7.1\jpaentitieslibrary\build\classes
INFORMAZIONI - Configuring enterprise application:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb
INFORMAZIONI - Auto-deploying ejb UserService:
EjbDeployment(deployment-id=UserService)
INFORMAZIONI - Configuring Service(id=Default Singleton Container,
type=Container, provider-id=Default Singleton Container)
INFORMAZIONI - Auto-creating a container for bean UserService:
Container(type=SINGLETON, id=Default Singleton Container)
INFORMAZIONI - Creating Container(id=Default Singleton Container)
INFORMAZIONI - Configuring Service(id=Default Managed Container,
type=Container, provider-id=Default Managed Container)
INFORMAZIONI - Auto-creating a container for bean
org.superbiz.rest.UserServiceTest: Container(type=MANAGED, id=Default
Managed Container)
INFORMAZIONI - Creating Container(id=Default Managed Container)
INFORMAZIONI - Using directory C:\Users\mauro\AppData\Local\Temp for
stateful session passivation
INFORMAZIONI - Configuring PersistenceUnit(name=user)
INFORMAZIONI - Configuring Service(id=Default JDBC Database, type=Resource,
provider-id=Default JDBC Database)
INFORMAZIONI - Auto-creating a Resource with id 'Default JDBC Database' of
type 'DataSource for 'user'.
INFORMAZIONI - Creating Resource(id=Default JDBC Database)
INFORMAZIONI - Configuring Service(id=Default Unmanaged JDBC Database,
type=Resource, provider-id=Default Unmanaged JDBC Database)
INFORMAZIONI - Auto-creating a Resource with id 'Default Unmanaged JDBC
Database' of type 'DataSource for 'user'.
INFORMAZIONI - Creating Resource(id=Default Unmanaged JDBC Database)
INFORMAZIONI - Adjusting PersistenceUnit user <jta-data-source> to Resource
ID 'Default JDBC Database' from 'My DataSource'
INFORMAZIONI - Adjusting PersistenceUnit user <non-jta-data-source> to
Resource ID 'Default Unmanaged JDBC Database' from 'My Unmanaged DataSource'
INFORMAZIONI - Configuring PersistenceUnit(name=userdb)
INFORMAZIONI - Adjusting PersistenceUnit userdb <jta-data-source> to
Resource ID 'Default JDBC Database' from 'My DataSource'
INFORMAZIONI - Adjusting PersistenceUnit userdb <non-jta-data-source> to
Resource ID 'Default Unmanaged JDBC Database' from 'My Unmanaged DataSource'
INFORMAZIONI - Enterprise application
"E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb" loaded.
INFORMAZIONI - Assembling app:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb
AVVERTENZA - JAVA AGENT NOT INSTALLED. The JPA Persistence Provider
requested installation of a ClassFileTransformer which requires a JavaAgent. 
See http://tomee.apache.org/javaagent.html
INFORMAZIONI - OpenJPA dynamically loaded a validation provider.
INFORMAZIONI - PersistenceUnit(name=user,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider
time 516ms
INFORMAZIONI - OpenJPA dynamically loaded a validation provider.
INFORMAZIONI - PersistenceUnit(name=userdb,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl) - provider
time 24ms
INFORMAZIONI -
Jndi(name="java:global/rest-on-ejb/UserService!org.superbiz.rest.UserService")
INFORMAZIONI - Jndi(name="java:global/rest-on-ejb/UserService")
INFORMAZIONI - Existing thread singleton service in SystemInstance():
org.apache.openejb.cdi.ThreadSingletonServiceImpl@1bcffb5
INFORMAZIONI - OpenWebBeans Container is starting...
INFORMAZIONI - Adding OpenWebBeansPlugin : [CdiPlugin]
INFORMAZIONI - All injection points were validated successfully.
INFORMAZIONI - OpenWebBeans Container has started, it took 235 ms.
INFORMAZIONI - Created Ejb(deployment-id=UserService, ejb-name=UserService,
container=Default Singleton Container)
INFORMAZIONI - Started Ejb(deployment-id=UserService, ejb-name=UserService,
container=Default Singleton Container)
INFORMAZIONI - Deployed
Application(path=E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb)
INFORMAZIONI - Initializing network services
INFORMAZIONI - Creating ServerService(id=cxf)
INFORMAZIONI - Creating ServerService(id=cxf-rs)
INFORMAZIONI - Creating ServerService(id=httpejbd)
INFORMAZIONI - Created ServicePool 'httpejbd' with (10) core threads,
limited to (200) threads with a queue of (9)
INFORMAZIONI - Creating ServerService(id=ejbd)
INFORMAZIONI - Created ServicePool 'ejbd' with (10) core threads, limited to
(200) threads with a queue of (9)
INFORMAZIONI - Creating ServerService(id=admin)
INFORMAZIONI - Created ServicePool 'admin' with (10) core threads, limited
to (10) threads with a queue of (9)
INFORMAZIONI - Creating ServerService(id=multipulse)
INFORMAZIONI - Using 'bind=239.255.2.3'
INFORMAZIONI - Using 'port=6142'
INFORMAZIONI - Creating ServerService(id=ejbds)
INFORMAZIONI - Created ServicePool 'ejbds' with (10) core threads, limited
to (200) threads with a queue of (9)
INFORMAZIONI - Creating ServerService(id=multicast)
INFORMAZIONI - Using 'loopback_mode=false'
INFORMAZIONI - Using 'port=6142'
INFORMAZIONI - Using 'heart_rate=500'
INFORMAZIONI - Using 'max_missed_heartbeats=10'
INFORMAZIONI - Created Tracker{group='default', groupPrefix='default:',
heartRate=500, maxMissedHeartbeats=10, reconnectDelay=5000,
maxReconnectDelay=30000, maxReconnectAttempts=10, exponentialBackoff=0,
useExponentialBackOff=false, registeredServices=0, discoveredServices=0}
INFORMAZIONI - Creating ServerService(id=multipoint)
INFORMAZIONI - Using 'port=4212'
INFORMAZIONI - Using 'initialServers='
INFORMAZIONI - Using 'heart_rate=500'
INFORMAZIONI - Using 'max_missed_heartbeats=10'
INFORMAZIONI - Created Tracker{group='default', groupPrefix='default:',
heartRate=500, maxMissedHeartbeats=10, reconnectDelay=5000,
maxReconnectDelay=30000, maxReconnectAttempts=10, exponentialBackoff=0,
useExponentialBackOff=false, registeredServices=0, discoveredServices=0}
INFORMAZIONI - Initializing network services
INFORMAZIONI - Using providers:
INFORMAZIONI -     
org.apache.cxf.jaxrs.provider.JAXBElementProvider@1405bd6
INFORMAZIONI -     
org.apache.openejb.server.cxf.rs.EJBAccessExceptionMapper@12ed70d
INFORMAZIONI - REST Application: http://127.0.0.1:4204/rest-on-ejb                 
-> org.apache.openejb.server.rest.InternalApplication
INFORMAZIONI -      Service URI: http://127.0.0.1:4204/rest-on-ejb/user            
->  EJB org.superbiz.rest.UserService
INFORMAZIONI -            DELETE
http://127.0.0.1:4204/rest-on-ejb/user/delete/{id} ->      void delete(long)          
                 
INFORMAZIONI -               GET http://127.0.0.1:4204/rest-on-ejb/user/list       
->      List<User> list(int, int)                    
INFORMAZIONI -               GET
http://127.0.0.1:4204/rest-on-ejb/user/show/{id}   ->      User find(long)            
                 
INFORMAZIONI -              POST
http://127.0.0.1:4204/rest-on-ejb/user/update/{id} ->      Response
update(long, String, String, String)
INFORMAZIONI -               PUT
http://127.0.0.1:4204/rest-on-ejb/user/create      ->      User
create(String, String, String)          
INFORMAZIONI - Added Service{uri=ejb:ejbd://127.0.0.1:4201}
INFORMAZIONI - Added Service{uri=ejb:ejbd://127.0.0.1:4201}
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer discovered: ejbd://127.0.0.1:4201
INFORMAZIONI - Added Service{uri=ejb:ejbds://127.0.0.1:4203}
INFORMAZIONI - Added Service{uri=ejb:ejbds://127.0.0.1:4203}
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - MultipointDiscoveryAgent Starting
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer discovered: ejbds://127.0.0.1:4203
INFORMAZIONI - MultipointServer Starting : Thread
'MultipointServer.ocean.4212'
INFORMAZIONI - MultipointDiscoveryAgent Started
INFORMAZIONI -   ** Bound Services **
INFORMAZIONI -   NAME                 IP              PORT  
INFORMAZIONI -   httpejbd             127.0.0.1       4204  
INFORMAZIONI -   ejbd                 127.0.0.1       4201  
INFORMAZIONI -   admin                127.0.0.1       4200  
INFORMAZIONI -   multipulse           239.255.2.3     6142  
INFORMAZIONI -   ejbds                127.0.0.1       4203  
INFORMAZIONI -   multicast            239.255.2.3     6142  
INFORMAZIONI -   multipoint           127.0.0.1       4212  
INFORMAZIONI - -------
INFORMAZIONI - Ready!
INFORMAZIONI - Starting OpenJPA 2.4.0-nonfinal-1598334
INFORMAZIONI - Using dictionary class
"org.apache.openjpa.jdbc.sql.HSQLDictionary" (HSQL Database Engine 2.3.2
,HSQL Database Engine Driver 2.3.2).
INFORMAZIONI - Connected to HSQL Database Engine version 2.2 using JDBC
driver HSQL Database Engine Driver version 2.3.2. 
INFORMAZIONI - Creating subclass and redefining methods for "[class
org.superbiz.rest.User]". This means that your application will be less
efficient than it would if you ran the OpenJPA enhancer.
GRAVE - EjbTransactionUtil.handleSystemException: null
<openjpa-2.4.0-nonfinal-1598334-r422266:1599166 fatal general error>
org.apache.openjpa.persistence.PersistenceException: null
	at
org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:96)
	at
org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:176)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:311)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:235)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:211)
	at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155)
	at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
	at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:160)
	at
org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java:119)
	at
org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java:96)
	at
org.apache.openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java:144)
	at org.superbiz.rest.UserService.create(UserService.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
	at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
	at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
	at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
	at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:256)
	at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:212)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:308)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:303)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:308)
	at
org.superbiz.rest.UserService$$LocalBeanProxy.create(org/superbiz/rest/UserService.java)
	at org.superbiz.rest.UserServiceTest.start(UserServiceTest.java:56)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1179)
	at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1030)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:85)
	... 49 more
Caused by: java.lang.VerifyError
	at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
	at
sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
	... 54 more
INFORMAZIONI - Stopping network services
INFORMAZIONI - Stopping server services
INFORMAZIONI - Removed Service{uri=ejb:ejbd://127.0.0.1:4201}
INFORMAZIONI - Removed Service{uri=ejb:ejbd://127.0.0.1:4201}
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Removed Service{uri=ejb:ejbds://127.0.0.1:4203}
INFORMAZIONI - Removed Service{uri=ejb:ejbds://127.0.0.1:4203}
INFORMAZIONI - MultipointDiscoveryAgent Stopping
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbd://127.0.0.1:4201
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - Peer removed: ejbds://127.0.0.1:4203
INFORMAZIONI - MultipointServer has terminated.
INFORMAZIONI - Undeploying app:
E:\documenti_mauro\prove_rest_openejb4.7.1\rest-on-ejb
INFORMAZIONI - Destroying OpenEJB container
INFORMAZIONI - Closing DataSource: Default JDBC Database
INFORMAZIONI - Closing DataSource: Default Unmanaged JDBC Database


*from the test consol i get: *

The bean encountered a non-application exception; nested exception is: 
	<openjpa-2.4.0-nonfinal-1598334-r422266:1599166 fatal general error>
org.apache.openjpa.persistence.PersistenceException: null
javax.ejb.EJBException
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:408)
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:312)
	at
org.superbiz.rest.UserService$$LocalBeanProxy.create(org/superbiz/rest/UserService.java)
	at org.superbiz.rest.UserServiceTest.start(UserServiceTest.java:56)
	at
org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:96)
	at
org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:176)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:311)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:235)
	at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:211)
	at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:155)
	at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:226)
	at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:59)
	at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:160)
	at
org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java:119)
	at
org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java:96)
	at
org.apache.openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java:144)
	at org.superbiz.rest.UserService.create(UserService.java:60)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
	at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:181)
	at
org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:100)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:192)
	at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:173)
	at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:85)
	at
org.apache.openejb.core.singleton.SingletonContainer._invoke(SingletonContainer.java:256)
	at
org.apache.openejb.core.singleton.SingletonContainer.invoke(SingletonContainer.java:212)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:308)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:303)
	at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
	at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:308)
	at
org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:85)
	at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
	at
sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/test-for-example-REST-and-EJB-not-work-without-maven-tp4673687.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Mime
View raw message