I have created the JPA(JPA 2.0) Project to persist the data(Communicate to the database through the DataSource created in Websphere).
Please find bellow for environment details.
IDE: IBM Rational® Software Architect for WebSphere Software
IDE Version: 8.0.4.2
Websphere Version: 7
persistence.xml
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0"> <persistence-unit name="DataSourceDemo"> <jta-data-source>oracleDS</jta-data-source> <class>com.auditlog.model.BatchPrint</class> <properties> <property name="openjpa.RuntimeUnenhancedClasses" value="supported" /> <property name="openjpa.ConnectionUserName" value="admin" /> <property name="openjpa.ConnectionPassword" value="admin" /> <property name="openjpa.jdbc.Schema" value="ADMIN" /> </properties> </persistence-unit> </persistence>
When I run this Application I am getting the bellow error but the data persist in table successfully.
Exception in thread "Attachment 60901" [B]java.lang.UnsupportedOperationException: cannot get the capability, performing dispose of the retransforming environment[/B] at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibraryImpl(Native Method) at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibrary(Attachment.java:253) at com.ibm.tools.attach.javaSE.Attachment.parseLoadAgent(Attachment.java:235) at com.ibm.tools.attach.javaSE.Attachment.doCommand(Attachment.java:154) at com.ibm.tools.attach.javaSE.Attachment.run(Attachment.java:116) Exception in thread "P=419885:O=0:CT" java.lang.UnsupportedOperationException: cannot get the capability, performing dispose of the retransforming environment at sun.instrument.InstrumentationImpl.isRetransformClassesSupported0(Native Method) at sun.instrument.InstrumentationImpl.isRetransformClassesSupported(InstrumentationImpl.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at org.apache.openjpa.enhance.ClassRedefiner.canRedefineClasses(ClassRedefiner.java:123) at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:122) at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:304) at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:202) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:213) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:45) at com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:30) at com.nyl.ltc.auditlog.util.JPAUtil.getEntityManager(JPAUtil.java:45) at com.nyl.ltc.auditlog.dao.sericeImpl.AuditLogDAOServiceImpl.persist(AuditLogDAOServiceImpl.java:27) at com.nyl.ltc.auditlog.serviceImpl.AuditLogServiceImpl.persistAuditLog(AuditLogServiceImpl.java:20) at com.nyl.ltc.auditlog.handlerImpl.AuditLogHandlerImpl.persistAuditlog(AuditLogHandlerImpl.java:22) at com.main.Main.main(Main.java:18)
Note: I created the Dynamic web project and tried the same scenario. At that time I did not gent any exception.
Please help to to resolve this issue?