JPA / Eclipselink CursoredStream Error

Hi there!
I have to do a database request on an Oracle XE database which returns about 1 million entities. As it does not make sense to load all of them to memory, I chose a Cursored Stream to do the work.
My code:
                /* count nbo entities */
                ReadAllQuery query = new ReadAllQuery(Entity.class);
                query.useCursoredStream(5, NBO_ENTITIES_TO_BE_READ_PER_CHUNK);
                /* disable caching */
                query.doNotCacheQueryResults();
                CursoredStream stream =
                        (CursoredStream) ((EntityManagerImpl) _entityManager).getSession()
                                .executeQuery(query);
                 * run through cursor
                while (!stream.atEnd()) {
                    List<Entity> entities = null;
                    try{
                    entities = stream.read(NBO_ENTITIES_TO_BE_READ_PER_CHUNK);
                    }catch(Exception e ){
                        e.printStackTrace();
                    doSomeWork( entities);
                    stream.releasePrevious();
                stream.close();The statement does fine with the first loads of data. However, while reading the last chunk of data, the following error happens:
xception Description: An attempt to read beyond the end of stream occurred.
Query: ReadAllQuery(referenceClass=Entity)
     at org.eclipse.persistence.exceptions.QueryException.readBeyondStream(QueryException.java:937)
     at org.eclipse.persistence.queries.CursoredStream.copy(CursoredStream.java:117)
     at org.eclipse.persistence.queries.CursoredStream.read(CursoredStream.java:327)
     at de.optware.dataloader.service.LieferantenstandortListService$1.run(LieferantenstandortListService.java:91)
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)I am using eclipselink 1.1.2 and the ojdbc14 jdbc driver.
Any ideas?
Edited by: user12188472 on 05.05.2011 01:40
Edited by: user12188472 on 05.05.2011 01:44

>
          tx.commit();
     if(em.isOpen())
          em.flush();
     em.clear();
     }catch (Exception e) {
          e.printStackTrace();
sry my bad ... em.flush() is the culprit

Similar Messages

  • JWS offline + JPA/Eclipselink fails

    Hi,
    We're using JPA in our web start enabled application. We have the latest version of the Eclipselink jar (1.1.2).
    When starting the application in online mode, everything runs fine, but we can see that the jar file containing META-INF/persistence.xml is downloaded several times at every startup.
    When starting in offline mode, we run into a fatal error. It seems that eclipselink is always trying to get the persistence.xml file from the online resource.
    Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: com.sun.jnlp.JNLPClassLoader@8814e9
    Internal Exception: Exception [EclipseLink-30004] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
    Exception Description: An exception was thrown while processing persistence.xml from URL: http://10.0.0.1/app/test.jar
    Internal Exception: java.net.MalformedURLException
    The same problem is described in this post, but I cannot see a definite solution: http://forums.sun.com/thread.jspa?threadID=5123126
    Does anybody have an idea what can be done in this situation? Is it possible to somehow place the META-INF directory in classpath so that JWS does not try to get the resource online?
    Thanks.

    I think this is the same issue posted to yesterday in [t-5403895]. I eventually spent several hours tracking through the EclipseLink code to find out exactly what caused the problem. As you say, it's basically because EclipseLink is trying to load the resource from the web. This is because internally it resolves the reference to a URL starting with "http", and assumes it must be a server resource. In online JNLP mode, it downloads the file several times, in offline mode it fails. The "correct" action is to use the JNLP classloader to getResource() on META-INF/persistence.xml. Obviously, and perhaps understandably, EclipseLink (or TopLink Essentials as was) was not written or tested with Java Web Start offline mode in mind.
    I did finally make this work, but only by modifying two EclipseLink classes, which is not ideal. If you're willing to entertain that option, please post again and I'll provide details.

  • Gemini JPA / EclipseLink Problem in e4 RCP Application

    I'm not completely certain where my issue is coming from i.e. EclipseLink or Gemini JPA, so I'm hoping that's the first thing you can point me to.
    When my application starts up I'm getting this on the console:
    [EL Config]: metadata: 2015-07-27 13:26:03.641--ServerSession(675233602)--Thread(Thread[Refresh Thread: Equinox Container: 00913eb3-9d34-0015-1b66-dbde7e24aedc,5,main])--The alias name for the entity class [class <snip>] is being defaulted to: <snip>.
    WARNING: DataSourceFactory service for com.microsoft.sqlserver.jdbc.SQLServerDriver was not found. EMF service not registered.
    And when I go to use JPA in the application, I get this:
    *** FATAL ERROR *** Could not create data source for com.microsoft.sqlserver.jdbc.SQLServerDriver
    The lines that start with [EL Config] suggest (to me at least) that JPA is starting up, and is reading my persistence.xml file.
    I just switched the application from Gemini JPA 1.1.0.RELEASE and EclipseLink 2.4 to Gemini JPA 1.2.0.M01 and EclipseLink 2.6 in an effort to fix the issue, but it hasn't helped. (To be clear, the issue did occur with the release Gemini JPA, and is still occurring with the newer Gemini JPA).
    I've attached my persistence.xml file (redacted...), since I can't inline it here.
    Should I be looking in Gemini or in EclipseLink for the solution to this issue?
    I've tried Googling the issue, but don't get useful results.
    I'm less concerned for the first issue (the WARNING), and more concerned for the second issue.
    My next step is to set the individual connection properties, and drop the URL, maybe that will work.
    *edit* I realized I should have mentioned that the SQL Server JDBC driver jar is in the lib folder of the project, and should be set to export with the project. lib is also declared as part of the bundle class path in the manifest file.
    Thank you for taking the time to read my post.
    Dominic Hilsbos

    After changing my persistence.xml, I got a ClassNotFoundException, which told me that EclipseLink couldn't find my jdbc driver.
    I found my error, it was in the Bundle-Classpath.
    I had: .,lib/
    What I needed was; .,lib/sqljdbc41.jar
    Thank you to all who looked at this.
    Dominic Hilsbos

  • WebLogic 10.0 + JPA 2.0 = errors

    Hi,
    Is there a known way to add support for JPA 2.0 in Weblogic 10.0?
    Thanks.

    See the recent OTN post from 20110115 detailing the latest release of Oracle WebLogic Server and some retesting of the previous issues related to JSR-317 JPA 2.0 support below.
    Re: Deploy Hibernate based EAR file on Weblogic 10.3.3?
    The latest release of Oracle WebLogic Server has been available on OTN at the following location since 20110115.
    http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
    This release provides support for JSR-317 JPA 2.0 container managed applications using the QWG8 patch or a manual prepending classpath change.
    In 10.3.3.0 you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround as well as the persistence.xml renaming one is now fully deprecated and not required in 10.3.4.0 for both application and container managed persistence contexts.
    As of 20110115 the 5 outstanding issues below look to be fixed by applying the http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309 patch for QWG8 or manually prepending to the WebLogic 10.3.4.0 server classpath.
    commEnv.cmd: line 67
    @rem Set BEA Home
    set BEA_HOME=C:\opt\wls1034r20110115
    @rem Enable JPA 2.0 functionality on WebLogic Server 10.3.4 with the following patch line for commEnv.cmd:67
    set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
    A JPA 2.0 EE application using EclipseLink as the JPA2 persistence provider on WebLogic is detailed in the analysis section below1) JPA 2.0 XSD parsing - verified
    2) New JPA 2.0 schema elements like <shared-cache-mode>NONE</shared-cache-mode> - verified
    3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Stateless session bean - verified
    4) JPA 2.0 weaving/instrumentation - this will require a more detailed lazy model and more debugging to fully verify
    5) Dependency Injection of a container managed JPA 2.0 entityManager on a EJB component like a stateless session bean - verified
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
    OTN downloadhttp://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
    Patching
    http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
    Documentationhttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm
    Supported Oracle WebLogic Server Versionshttp://download.oracle.com/docs/cd/E15315_06/help/oracle.eclipse.tools.weblogic.doc/html/SupportedServerVersions.html
    TopLink JPA 2.0 Specific documentation/patchinghttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
    EclipseLink Wiki: JPA 2.0 using EclipseLink on WebLogic analysis (XSD, Weaving, DI of @PersistenceContext)http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
    thank you
    /Michael O'Brien
    http://www.eclipselink.org

  • JPA Weird Transaction error ... ?

    Hi All,
    For this code i am getting a weird exception which follows the code block..
    i have started a Transaction but still openjpa gives this exception
      public static void deletePort(String port){
           BcsPort bPort=em.find(BcsPort.class, port);
           try{
                   EntityTransaction tx= em.getTransaction();
                   tx.begin();
                   System.out.println("Active:" +tx.isActive()); //*Prints True*
                   em.remove(bPort);
                   tx.commit();
           if(em.isOpen())
                em.flush();
           em.clear();
           }catch (Exception e) {
                e.printStackTrace();
    Exception Stack Trace
    ERROR:  Can only perform operation while a transaction is active.
    <openjpa-1.0.0-r420667:568756 nonfatal user error> org.apache.openjpa.persistence.TransactionRequiredException: Can only perform operation while a transaction is active.
         at org.apache.openjpa.kernel.BrokerImpl.assertActiveTransaction(BrokerImpl.java:4301)
         at org.apache.openjpa.kernel.DelegatingBroker.assertActiveTransaction(DelegatingBroker.java:1314)
         at org.apache.openjpa.persistence.EntityManagerImpl.flush(EntityManagerImpl.java:487)
         at com.test.local.EntityManagerTester.deletePort(EntityManagerTester.java:180)
         at test.TestJPA.JPAInit(TestJPA.java:100)
         at test.TestJPA.testMutiple(TestJPA.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at junit.framework.TestCase.runTest(TestCase.java:168)
         at junit.framework.TestCase.runBare(TestCase.java:134)Help on this please
    Thanks..

    >
              tx.commit();
         if(em.isOpen())
              em.flush();
         em.clear();
         }catch (Exception e) {
              e.printStackTrace();
    sry my bad ... em.flush() is the culprit

  • JPA and database error handling

    Can anyone point me towards any information or discussions on methods of handling database initiated exceptions with JPA? Specifically, I'm trying to handle common data exceptions, like primary/foreign key violations etc., so I don't have to duplicate that level of data integrity checking in my business logic.
    It seems I can only get hold of a RollbackException if something goes wrong. Ok, I can get into the underlying cause easily enough, but then I'm straight into implementation specific stuff (in my case, Hibernate exceptions). Are there any good techniques/patterns to reduce this dependency to an absolute minimum?

    In this situation I created @Id for one of the columns or created @IdClass from all view fields.

  • JDeveloper & Debug : FATAL ERROR

    Hello,
    when i try to debug any project in JDeveloper, i got the following error:
    FATAL ERROR in native method: No transports initialized
    Transport dt_socket failed to initialize, rc = 509.
    Process exited with exit code 1.
    Debugger unable to connect to local process.
    I allready reinstall JDeveloper in JDK, but no luck. Please, help. Thank you.

    hello,
    i am also getting the erro while executing project on jdeveloper using ejb and jpa entities the error is as follows :
    [EclipseLink/JPA Client] Adding Java options: -javaagent:C:\middleware\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-1.jar
    c:\middleware\jdk160_21\bin\javaw.exe -client -classpath C:\Users\eaurgta\Documents\JDeveloper\mywork\cab_ejb_jpa_app\.adf;C:\Users\eaurgta\Documents\JDeveloper\mywork\cab_ejb_jpa_app\cabejbmodel\classes;C:\middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-4-0.jar;C:\middleware\modules\org.eclipse.persistence_1.0.0.0_2-1.jar;C:\middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\middleware\oracle_common\modules\oracle.toplink_11.1.1\javax.persistence_2.0_preview.jar;C:\middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\middleware\modules\javax.jsf_1.1.0.0_1-2.jar;C:\middleware\modules\javax.ejb_3.0.1.jar;C:\middleware\modules\javax.enterprise.deploy_1.2.jar;C:\middleware\modules\javax.interceptor_1.0.jar;C:\middleware\modules\javax.jms_1.1.1.jar;C:\middleware\modules\javax.jsp_1.2.0.0_2-1.jar;C:\middleware\modules\javax.jws_2.0.jar;C:\middleware\modules\javax.activation_1.1.0.0_1-1.jar;C:\middleware\modules\javax.mail_1.1.0.0_1-4-1.jar;C:\middleware\modules\javax.xml.soap_1.3.1.0.jar;C:\middleware\modules\javax.xml.rpc_1.2.1.jar;C:\middleware\modules\javax.xml.ws_2.1.1.jar;C:\middleware\modules\javax.management.j2ee_1.0.jar;C:\middleware\modules\javax.resource_1.5.1.jar;C:\middleware\modules\javax.servlet_1.0.0.0_2-5.jar;C:\middleware\modules\javax.transaction_1.0.0.0_1-1.jar;C:\middleware\modules\javax.xml.stream_1.1.1.0.jar;C:\middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\middleware\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\middleware\modules\javax.persistence_1.0.0.0_1-0-2.jar;C:\middleware\wlserver_10.3\server\lib\weblogic.jar -Djavax.net.ssl.trustStore=C:\middleware\wlserver_10.3\server\lib\DemoTrust.jks -javaagent:C:\middleware\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-1.jar oracle.cab_facadeClient
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
         at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
         ... 6 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [cabejbmodel] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1014)
         at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:256)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:216)
         at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:159)
         ... 12 more
    Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Predeployment of PersistenceUnit [cabejbmodel] failed.
    Internal Exception: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
         ... 17 more
    Caused by: Exception [EclipseLink-7161] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Entity class [class oracle.T76] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy.
         at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1374)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.validatePrimaryKey(EntityAccessor.java:1366)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processAccessors(EntityAccessor.java:885)
         at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.process(EntityAccessor.java:691)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage2(MetadataProject.java:1531)
         at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:474)
         at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:441)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:968)
         ... 16 more
    FATAL ERROR in native method: processing of -javaagent failed
    Exception in thread "main" Process exited with exit code 1.
    thanks and regards
    ankur

  • Hibernate 3.6 Final (JPA 2.0) + WL 10.3.x :Unable to deploy sample appn

    Hi,
    Is anyone able to deploy a JPA 2.0 (Hibernate 3.6 Final specifically) application on WL 10.3.x?
    I tried on 10.3.2 and 10.3.3 but I get following exceptions
    Caused By: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
    at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:516)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:352)
    at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:332)
    Or (when I set to use prefer-application-packages for javax.persistence.* and org.hibernate.*, I get the following exceptions:
    Caused By: weblogic.deployment.EnvironmentException: Error processing persistence unit TrivnetEJB of module TrivnetEJB.jar: Error instantiating the Persistence Provider class org.hibernate.ejb.HibernatePersistence of the PersistenceUnit TrivnetEJB: java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider
    at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:344)
    at weblogic.deployment.PersistenceUnitInfoImpl.createEntityManagerFactory(PersistenceUnitInfoImpl.java:332)
    at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:134)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:336)
    at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:250)
    at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:69)
    at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:221)
    I have seen few forums that specify a workaround for this for applications that use spring.
    WebLogic 10.0 + JPA 2.0 = errors
    The above forum also specifies that till WL10.3.3, full JPA2.0 support is not available. So does it mean that Hibernate 3.6 based applications won't work at all on WL 10.3.x and have to wait till 10.3.4 is released? Or is there any other solution or patch available for this.
    This is really a high priority issue for us.
    Please suggest.

    See the recent OTN post from 20110115 detailing the latest release of Oracle WebLogic Server and some retesting of the previous issues related to JSR-317 JPA 2.0 support below.
    Re: Deploy Hibernate based EAR file on Weblogic 10.3.3?
    The latest release of Oracle WebLogic Server has been available on OTN at the following location since 20110115.
    http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
    This release provides support for JSR-317 JPA 2.0 container managed applications using the QWG8 patch or a manual prepending classpath change.
    In 10.3.3.0 you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround as well as the persistence.xml renaming one is now fully deprecated and not required in 10.3.4.0 for both application and container managed persistence contexts.
    As of 20110115 the 5 outstanding issues below look to be fixed by applying the http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309 patch for QWG8 or manually prepending to the WebLogic 10.3.4.0 server classpath.
    commEnv.cmd: line 67
    @rem Set BEA Home
    set BEA_HOME=C:\opt\wls1034r20110115
    @rem Enable JPA 2.0 functionality on WebLogic Server 10.3.4 with the following patch line for commEnv.cmd:67
    set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
    A JPA 2.0 EE application using EclipseLink as the JPA2 persistence provider on WebLogic is detailed in the analysis section below1) JPA 2.0 XSD parsing - verified
    2) New JPA 2.0 schema elements like <shared-cache-mode>NONE</shared-cache-mode> - verified
    3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Stateless session bean - verified
    4) JPA 2.0 weaving/instrumentation - this will require a more detailed lazy model and more debugging to fully verify
    5) Dependency Injection of a container managed JPA 2.0 entityManager on a EJB component like a stateless session bean - verified
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
    OTN downloadhttp://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
    Patching
    http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
    Documentationhttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm
    Supported Oracle WebLogic Server Versionshttp://download.oracle.com/docs/cd/E15315_06/help/oracle.eclipse.tools.weblogic.doc/html/SupportedServerVersions.html
    TopLink JPA 2.0 Specific documentation/patchinghttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
    EclipseLink Wiki: JPA 2.0 using EclipseLink on WebLogic analysis (XSD, Weaving, DI of @PersistenceContext)http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
    thank you
    /Michael O'Brien
    http://www.eclipselink.org

  • JPA - generate orm.xml from existing JPA annotations

    Hi,
    Is there any tool which can be used to generate the orm.xml file from existing JPA java annotated source files?
    Thank you,
    Virgil

    Yes. Map some of the classes with JPA annotations or orm.xml, for the other leave them unmapped, and don't list them in your persistence.xml. Then in a SessionCustomizer you can load your native EclipseLink project.xml file using the XMLProjectReader, and then manually add the descriptors from the Project to the JPA EclipseLink Session using DatabaseSession.addDescriptors(Project).

  • OEPE exception with the latest plugin version.

    Hi,
    I updated my OEPE eclipe plugin to the latest version and I got this exception:
    !ENTRY org.eclipse.core.resources 4 75 2012-01-30 13:38:39.578
    !MESSAGE Errors occurred during the build.
    !SUBENTRY 1 org.eclipse.wst.common.project.facet.core 4 75 2012-01-30 13:38:39.578
    !MESSAGE Errors running builder 'Faceted Project Validation Builder' on project 'NTCSCacheCore'.
    !STACK 0
    java.lang.ExceptionInInitializerError
    at oracle.eclipse.tools.weblogic.WlsRuntimeUtil.getWlsRuntimeComponent(WlsRuntimeUtil.java:92)
    at oracle.eclipse.tools.weblogic.internal.validation.WlsRuntimeValidator.validate(WlsRuntimeValidator.java:45)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectValidationBuilder.build(FacetedProjectValidationBuilder.java:132)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: java.lang.IllegalArgumentException: Version 10.0 of runtime component type com.bea.weblogic has not been defined.
    at org.eclipse.wst.common.project.facet.core.util.internal.Versionable.getVersion(Versionable.java:80)
    at org.eclipse.wst.common.project.facet.core.runtime.internal.RuntimeComponentType.getVersion(RuntimeComponentType.java:1)
    at oracle.eclipse.tools.weblogic.server.WebLogicServerRuntimeComponentType.<clinit>(WebLogicServerRuntimeComponentType.java:19)
    ... 15 more
    Any idea why this is happening when I updated the plugin.
    === Eclipse configuration ===
    *** Date: Monday, January 30, 2012 2:03:58 PM Western European Time
    *** Platform Details:
    *** System properties:
    awt.toolkit=sun.awt.X11.XToolkit
    eclipse.application=org.eclipse.ui.ide.workbench
    eclipse.buildId=M20110909-1335
    eclipse.commands=-os
    linux
    -ws
    gtk
    -arch
    x86
    -showsplash
    /home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
    -launcher
    /home/guerra/devel/ide/indigo/eclipse/eclipse
    -name
    Eclipse
    --launcher.library
    /home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.100.v20110505/eclipse_1407.so
    -startup
    /home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.overrideVmargs
    -product
    org.eclipse.epp.package.jee.product
    -vm
    /usr/local/java/jdk1.7.0/bin/../jre/lib/i386/client/libjvm.so
    eclipse.home.location=file:/home/guerra/devel/ide/indigo/eclipse/
    eclipse.launcher=/home/guerra/devel/ide/indigo/eclipse/eclipse
    eclipse.launcher.name=Eclipse
    [email protected]/../p2/
    eclipse.p2.profile=epp.package.jee
    eclipse.product=org.eclipse.epp.package.jee.product
    eclipse.startTime=1327931411385
    eclipse.vm=/usr/local/java/jdk1.7.0/bin/../jre/lib/i386/client/libjvm.so
    eclipse.vmargs=-Djava.library.path=/usr/lib/jni
    -Dosgi.requiredJavaVersion=1.5
    -XX:MaxPermSize=256m
    -Xms40m
    -Xmx512m
    -Djava.class.path=/home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    equinox.use.ds=true
    file.encoding=UTF-8
    file.encoding.pkg=sun.io
    file.separator=/
    java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
    java.awt.printerjob=sun.print.PSPrinterJob
    java.class.path=/home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    java.class.version=51.0
    java.endorsed.dirs=/usr/local/java/jdk1.7.0/jre/lib/endorsed
    java.ext.dirs=/usr/local/java/jdk1.7.0/jre/lib/ext:/usr/java/packages/lib/ext
    java.home=/usr/local/java/jdk1.7.0/jre
    java.io.tmpdir=/tmp
    java.library.path=/usr/lib/jni
    java.runtime.name=Java(TM) SE Runtime Environment
    java.runtime.version=1.7.0-b147
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Oracle Corporation
    java.specification.version=1.7
    java.vendor=Oracle Corporation
    java.vendor.url=http://java.oracle.com/
    java.vendor.url.bug=http://bugreport.sun.com/bugreport/
    java.version=1.7.0
    java.vm.info=mixed mode
    java.vm.name=Java HotSpot(TM) Client VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Oracle Corporation
    java.vm.specification.version=1.7
    java.vm.vendor=Oracle Corporation
    java.vm.version=21.0-b17
    line.separator=
    org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
    org.eclipse.equinox.launcher.splash.location=/home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
    org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
    org.eclipse.update.reconcile=false
    org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6,JavaSE-1.7
    org.osgi.framework.language=en
    org.osgi.framework.os.name=Linux
    org.osgi.framework.os.version=2.6.35
    org.osgi.framework.processor=x86
    org.osgi.framework.system.capabilities=osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7"
    org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.event,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.namespace,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.nimbus,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.spi.http,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
    org.osgi.framework.uuid=d0405f54-494b-0011-168c-a1c3104915a9
    org.osgi.framework.vendor=Eclipse
    org.osgi.framework.version=1.6.0
    org.osgi.supports.framework.extension=true
    org.osgi.supports.framework.fragment=true
    org.osgi.supports.framework.requirebundle=true
    os.arch=i386
    os.name=Linux
    os.version=2.6.35-32-generic
    osgi.arch=x86
    osgi.bundles=reference:file:javax.transaction_1.1.1.v201105210645.jar,reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@1:start
    osgi.bundles.defaultStartLevel=4
    osgi.bundlestore=/home/guerra/devel/ide/indigo/eclipse/configuration/org.eclipse.osgi/bundles
    osgi.configuration.area=file:/home/guerra/devel/ide/indigo/eclipse/configuration/
    osgi.framework=file:/home/guerra/devel/ide/indigo/eclipse/plugins/org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar
    osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v201105210645.jar
    osgi.framework.shape=jar
    osgi.framework.version=3.7.1.R37x_v20110808-1106
    osgi.frameworkClassPath=., file:/home/guerra/devel/ide/indigo/eclipse/plugins/javax.transaction_1.1.1.v201105210645.jar
    osgi.install.area=file:/home/guerra/devel/ide/indigo/eclipse/
    osgi.instance.area=file:/home/guerra/workspace/
    osgi.instance.area.default=file:/home/guerra/workspace/
    osgi.logfile=/home/guerra/workspace/.metadata/.log
    osgi.manifest.cache=/home/guerra/devel/ide/indigo/eclipse/configuration/org.eclipse.osgi/manifests
    osgi.nl=en_US
    osgi.os=linux
    osgi.requiredJavaVersion=1.5
    osgi.splashLocation=/home/guerra/devel/ide/indigo/eclipse//plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
    osgi.splashPath=platform:/base/plugins/org.eclipse.platform
    osgi.syspath=/home/guerra/devel/ide/indigo/eclipse/plugins
    osgi.tracefile=/home/guerra/workspace/.metadata/trace.log
    osgi.ws=gtk
    path.separator=:
    sun.arch.data.model=32
    sun.boot.class.path=/usr/local/java/jdk1.7.0/jre/lib/resources.jar:/usr/local/java/jdk1.7.0/jre/lib/rt.jar:/usr/local/java/jdk1.7.0/jre/lib/sunrsasign.jar:/usr/local/java/jdk1.7.0/jre/lib/jsse.jar:/usr/local/java/jdk1.7.0/jre/lib/jce.jar:/usr/local/java/jdk1.7.0/jre/lib/charsets.jar:/usr/local/java/jdk1.7.0/jre/classes
    sun.boot.library.path=/usr/local/java/jdk1.7.0/jre/lib/i386
    sun.cpu.endian=little
    sun.cpu.isalist=
    sun.desktop=gnome
    sun.io.unicode.encoding=UnicodeLittle
    sun.jnu.encoding=UTF-8
    sun.management.compiler=HotSpot Client Compiler
    sun.os.patch.level=unknown
    user.country=US
    user.dir=/home/guerra
    user.home=/home/guerra
    user.language=en
    user.name=guerra
    user.timezone=Atlantic/Canary
    *** Features:
    com.collabnet.subversion.merge.feature (2.2.4) "CollabNet Subversion Merge Client"
    oracle.eclipse.tools.indigo.common (2.0.0.201112072225) "Oracle Common Tools"
    oracle.eclipse.tools.indigo.doc.javaee6 (1.0.0.201111040904) "Java EE 6 Documentation"
    oracle.eclipse.tools.indigo.glassfish (2.0.0.201111040904) "Oracle GlassFish Server Tools"
    oracle.eclipse.tools.indigo.webtier (2.0.0.201112072225) "Oracle Web Tier Tools"
    org.eclipse.cvs (1.3.100.v20110520-0800-7B78FHk8sF7BB7VAH5AYC5) "Eclipse CVS Client"
    org.eclipse.datatools.common.doc.user (1.9.1.v201108301820-26-311A16321A3557) "Data Tools Platform User Documentation"
    org.eclipse.datatools.connectivity.doc.user (1.9.1.v201108301820-37D-7733L3D753L7BBF) "Data Tools Platform Connectivity User Documentation"
    org.eclipse.datatools.connectivity.feature (1.9.1.v201108301820-7C7e8mEt1_wmuQjYnXQ6Zj5dM17) "Data Tools Platform Connectivity Plug-in"
    org.eclipse.datatools.connectivity.oda.designer.core.feature (1.9.1.v201108301820-7B7C7DCcNBGNChHSFaYT) "DTP ODA Designer UI Framework Plug-in"
    org.eclipse.datatools.connectivity.oda.designer.feature (1.9.1.v201108301820-4117w312219371456) "DTP ODA Designer UI Framework Plug-in"
    org.eclipse.datatools.connectivity.oda.feature (1.9.1.v201108301820-7H7C7ICcNBHHBnJWDjSd) "DTP Open Data Access"
    org.eclipse.datatools.doc.user (1.9.1.v201108301820-47C08w95ENAK6AFDFK7) "Data Tool Platform User Documentation"
    org.eclipse.datatools.enablement.apache.derby.feature (1.9.1.v201108301820-77788gBmKDOGMhKwJ4Rn7QBR) "High-level Sybase Enablement Plug-in"
    org.eclipse.datatools.enablement.feature (1.9.1.v201108301820-7J9B7FBWwVN7-2z-kZU_tJy1aR1t) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.hsqldb.feature (1.9.1.v201108301820-67D1AqGBKNKdIlGz0GU7QBR) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.ibm.feature (1.9.1.v201108301820-7F47SFC7sRbvSkkxaPvW) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.ingres.feature (1.9.1.v201108301820-540AkF78Z7UCRAQDB) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.jdbc.feature (1.9.1.v201108301820-4-29oB56N5N7L6PAQ) "High-level Sybase Enablement Plug-in"
    org.eclipse.datatools.enablement.jdt.feature (1.9.1.v201108301820-2-07w31211518181A) "Data Tools Platform Connectivity JDT Extension Plug-in"
    org.eclipse.datatools.enablement.msft.feature (1.9.1.v201108301820-542AkF79P7QCP9SDB) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.mysql.feature (1.9.1.v201108301820-546AkF78Z7Y9NBZ9A) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.oda.designer.feature (1.9.1.v201108301820-3328s73553C655B63) "Eclipse Data Tools Platform XML ODA Designer"
    org.eclipse.datatools.enablement.oda.feature (1.9.1.v201108301820-7A7T78DZRDKGEeHnGlLP) "Eclipse Data Tools Platform XML ODA Runtime Driver"
    org.eclipse.datatools.enablement.oracle.feature (1.9.1.v201108301820-548dAkF79Q7RAN9UFJ) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.postgresql.feature (1.9.1.v201108301820-542AkF77g7V9N9e77) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.sap.feature (1.9.1.v201108301820-540AkF77g7V9N9e77) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.sqlite.feature (1.9.1.v201108301820-541AkF79P7N8NAQ77) "Eclipse Data Tools Platform Enablement"
    org.eclipse.datatools.enablement.sybase.feature (1.9.1.v201108301820-7E45F9NiNZVR6a1PMVn) "High-level Sybase Enablement Plug-in"
    org.eclipse.datatools.intro (1.9.1.v201108301820-26-7w312116392911) "Eclipse Data Tools Platform Intro Plug-in"
    org.eclipse.datatools.modelbase.feature (1.9.1.v201108301820-77078CcNBHCBYKYEbNV) "Eclipse Data Tools Platform SQLModel Plug-in"
    org.eclipse.datatools.sqldevtools.ddlgen.feature (1.9.1.v201108301820-7A-3F7RZHLz-Hz-OlPz0Qf) "Eclipse Data Tools Platform FE UI Plug-in"
    org.eclipse.datatools.sqldevtools.feature (1.9.1.v201108301820-7N847CFDsn0VdrPUJvPUshDWIPJ0) "Eclipse Data Tools Platform SQL Tools Common UI Plug-in"
    org.eclipse.datatools.sqldevtools.parsers.feature (1.9.1.v201108301820-622BgJ9CR9XFcEWLP) "Eclipse Data Tools Platform SQL Parser Plugin"
    org.eclipse.datatools.sqltools.doc.user (1.9.1.v201108301820-37D-7733L3D753L7BBF) "Data Tools Platform SQL Tools User Documentation"
    org.eclipse.draw2d (3.7.1.v20110830-1143-4607w3122194102254) "Graphical Editing Framework Draw2d"
    org.eclipse.emf (2.7.1.v20110913-1526) "EMF - Eclipse Modeling Framework Runtime and Tools"
    org.eclipse.emf.codegen (2.7.0.v20110913-1156) "EMF Code Generation"
    org.eclipse.emf.codegen.ecore (2.7.0.v20110913-1156) "EMF Ecore Code Generator"
    org.eclipse.emf.codegen.ecore.ui (2.7.0.v20110913-1156) "EMF Ecore Code Generator UI"
    org.eclipse.emf.codegen.ui (2.7.0.v20110913-1156) "EMF Code Generation UI"
    org.eclipse.emf.common (2.7.0.v20110912-0920) "EMF Common"
    org.eclipse.emf.common.ui (2.7.0.v20110913-1156) "EMF Common UI"
    org.eclipse.emf.converter (2.7.0.v20110913-1156) "EMF Model Converter"
    org.eclipse.emf.databinding (1.2.0.v20110913-1156) "EMF Data Binding"
    org.eclipse.emf.databinding.edit (1.2.0.v20110913-1156) "EMF Edit Data Binding"
    org.eclipse.emf.ecore (2.7.1.v20110912-0920) "EMF Ecore"
    org.eclipse.emf.ecore.edit (2.7.0.v20110913-1156) "EMF Ecore Edit"
    org.eclipse.emf.ecore.editor (2.7.0.v20110913-1156) "EMF Sample Ecore Editor"
    org.eclipse.emf.edit (2.7.1.v20110913-1526) "EMF Edit"
    org.eclipse.emf.edit.ui (2.7.0.v20110913-1156) "EMF Edit UI"
    org.eclipse.emf.mapping (2.7.0.v20110913-1156) "EMF Mapping"
    org.eclipse.emf.mapping.ecore (2.7.0.v20110913-1156) "EMF Ecore Mapping"
    org.eclipse.emf.mapping.ecore.editor (2.7.0.v20110913-1156) "EMF Ecore Mapping Editor"
    org.eclipse.emf.mapping.ui (2.7.0.v20110913-1156) "EMF Mapping UI"
    org.eclipse.epp.mpc (1.1.1.I20110907-0947) "Marketplace Client"
    org.eclipse.epp.package.jee.feature (1.4.1.20110909-1818) "Java EE IDE"
    org.eclipse.gef (3.7.1.v20110830-1143-777D181B3Bz06C853D8863365) "Graphical Editing Framework GEF"
    org.eclipse.help (1.3.0.v20110327-7i7uFFkFFp7gNobOpNgKo0) "Help System Base"
    org.eclipse.jdt (3.7.1.r371_v20110810-0800-7z8gFcoFMLfTabvKsR5Qm9rBGEBK) "Eclipse Java Development Tools"
    org.eclipse.jpt.common.eclipselink.feature (1.0.1.v201108080010-3-08s73553F3G3343) "Dali Java Persistence Tools - EclipseLink Common"
    org.eclipse.jpt.common.feature (1.0.1.v201108080010-6-0AkF7BB7S9N7788) "Dali Java Persistence Tools - Common"
    org.eclipse.jpt.dbws.eclipselink.feature (1.0.1.v201108303011-797B3CcNBHGCfDZAwHJ375) "Dali Java Persistence Tools - EclipseLink DBWS Support"
    org.eclipse.jpt.jaxb.eclipselink.feature (1.0.1.v201108303011-7740BgJ9EE9ZC_8z0A9132) "Dali Java Persistence Tools - EclipseLink MOXy (JAXB) Support"
    org.eclipse.jpt.jaxb.feature (1.0.1.v201108080010-508aAkF7BB7U8Q779A) "Dali Java Persistence Tools - JAXB Support"
    org.eclipse.jpt.jpa.eclipselink.feature (3.0.1.v201108303011-7J7F78F7RZHQPJBNCKbSR7FB) "Dali Java Persistence Tools - EclipseLink JPA Support"
    org.eclipse.jpt.jpa.feature (3.0.1.v201108163011-7R7F7CFC7sRdiShWvWQYU375) "Dali Java Persistence Tools - JPA Support"
    org.eclipse.jst.common.fproj.enablement.jdt (3.3.0.v201102200555-377DF8s73543E5I5768) "Eclipse Faceted Project Framework JDT Enablement"
    org.eclipse.jst.enterprise_ui.feature (3.3.1.v201107072200-7b7II1PFSK2WIlPwJBmNz-VWwVsTn) "Eclipse Java EE Developer Tools"
    org.eclipse.jst.ws.axis2tools.feature (1.1.200.v201103022333-78-FF0DZRDKDDePSKwHj) "Axis2 Tools"
    org.eclipse.jst.ws.cxf.feature (1.0.100.v201105171845-7H77DRFAKlZgjHCaHg65uE6I6I) "CXF Web Services Core"
    org.eclipse.jst.ws.jaxws.feature (1.1.0.v201105171845-7E78BsF8NcJSWKvN1Rjcv) "JAX-WS Tools Core"
    org.eclipse.mylyn_feature (3.6.4.v20111118-0100) "Mylyn"
    org.eclipse.mylyn.bugzilla_feature (3.6.2.v20110908-0706) "Mylyn"
    org.eclipse.mylyn.context_feature (3.6.2.v20110908-0706) "Mylyn"
    org.eclipse.mylyn.ide_feature (3.6.2.v20110908-0706) "Mylyn"
    org.eclipse.mylyn.java_feature (3.6.2.v20110908-0706) "Mylyn"
    org.eclipse.mylyn.team_feature (3.6.2.v20110908-0706) "Mylyn"
    org.eclipse.mylyn.trac_feature (3.6.4.v20111118-0100) "Mylyn"
    org.eclipse.mylyn.wikitext_feature (1.5.2.v20110908-0706) "Mylyn"
    org.eclipse.pde (3.7.1.r37x_v20110810-0800-7b7qFVtFEx2XnmZ4jlM5mjM) "PDE"
    org.eclipse.platform (3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK) "Eclipse Platform"
    org.eclipse.rcp (3.7.1.r37x_v20110729-9DB5FmNFnFLSFCtLxnRfMqt15A4A) "Eclipse RCP"
    org.eclipse.rse (3.3.1.R33x_v201109141647-7L7CFGG8wqio8rz0qYtkPgn8qWd4) "Remote System Explorer End-User Runtime"
    org.eclipse.rse.core (3.3.1.R33x_v201109141647-7a7JFZ3F8Fz0vz03_qRujbr0z0Nu) "RSE Core"
    org.eclipse.rse.dstore (3.3.1.R33x_v201109141647-7L78FRAD2YR70wUHbQUplQ8LFC) "RSE DStore Services"
    org.eclipse.rse.ftp (3.0.301.R33x_v201109141647-782F8O9KC92gz097E9EKF23225) "RSE FTP Service"
    org.eclipse.rse.local (2.1.300.v201103142315-7B4FKsBgJ9EE9ICQIFYT) "RSE Local Services"
    org.eclipse.rse.ssh (3.0.301.R33x_v201109141647-7A3F9xAGGB5k0C7KEATN92641) "RSE SSH Services"
    org.eclipse.rse.telnet (2.2.200.v201106011538-775F8NAkF7BB7B9NEIPP) "RSE Telnet Service"
    org.eclipse.rse.terminals (1.1.1.R33x_v201109141647-771Bh9uD7HbBF3u7DNO3293A3752) "RSE Terminals UI"
    org.eclipse.rse.useractions (1.1.300.v201103142315-31F8N8s7355353B75DD) "Remote System Explorer User Actions"
    org.eclipse.sapphire (0.4.0.201112010656) "Sapphire (Incubation)"
    org.eclipse.sapphire.java (0.4.0.201112010656) "Sapphire Java Support (Incubation)"
    org.eclipse.sapphire.java.jdt (0.4.0.201112010656) "Sapphire Java Developer Tools Support (Incubation)"
    org.eclipse.sapphire.modeling.xml (0.4.0.201112010656) "Sapphire XML Support (Incubation)"
    org.eclipse.sapphire.osgi (0.4.0.201112010656) "Sapphire OSGi Support (Incubation)"
    org.eclipse.sapphire.platform (0.4.0.201112010656) "Sapphire Eclipse Platform Support (Incubation)"
    org.eclipse.sapphire.ui (0.4.0.201112010656) "Sapphire User Interface (Incubation)"
    org.eclipse.sapphire.ui.swt.graphiti (0.4.0.201112010656) "Sapphire Graphiti Renderer (Incubation)"
    org.eclipse.sapphire.ui.swt.xml.editor (0.4.0.201112010656) "Sapphire XML Editor Support (Incubation)"
    org.eclipse.tm.terminal (3.1.1.R33x_v201106281309-4007S44yaw312218292641) "Target Management Terminal Widget"
    org.eclipse.tm.terminal.ssh (2.1.0.v201103142315-30-7w312212153266) "Target Management Terminal SSH Connector"
    org.eclipse.tm.terminal.telnet (2.1.0.v201103142315-30-7w312213121A22) "Target Management Terminal Telnet Connector"
    org.eclipse.tm.terminal.view (2.2.0.v201103142315-31-7w312214253426) "Target Management Terminal View"
    org.eclipse.wst.common.fproj (3.3.0.v201102150115-377DF8s7355397B4B9B) "Eclipse Faceted Project Framework"
    org.eclipse.wst.jsdt.feature (1.3.1.v201108102009-7F78FXRFBBoPbXRPcHfz-uy) "Eclipse JavaScript Development Tools"
    org.eclipse.wst.web_ui.feature (3.3.1.v201107072200-7O7IFhREMiB5vNoYqf01XHTvUndyz-yx-9kUyXXL) "Eclipse Web Developer Tools"
    org.eclipse.wst.xml_ui.feature (3.3.1.v201108102009-7H7EFZ3DxumTlaI6nheRdHo2p1KaDIL1Uz-S3PL) "Eclipse XML Editors and Tools"
    org.eclipse.wst.xml.xpath2.processor.feature (2.0.0.v201103310043-7A7J-CcNBGOCUIWFYMf) "Eclipse XPath 2 Developers Tools"
    org.eclipse.wst.xsl.feature (1.3.1.v201109012200-7T7YFRTFIqUoIrvbEtBlSIJXGZNg) "Eclipse XSL Developer Tools"
    org.tigris.subversion.clientadapter.feature (1.6.12) "Subversion Client Adapter"
    org.tigris.subversion.clientadapter.javahl.feature (1.6.17) "Subversion JavaHL"
    org.tigris.subversion.subclipse (1.6.18) "SVN Team Provider Core"
    org.tigris.subversion.subclipse.graph.feature (1.0.9) "Subversion Revision Graph"
    org.tigris.subversion.subclipse.mylyn (3.0.0) "Subclipse Integration for Mylyn 3.x"
    *** Plug-in Registry:
    com.collabnet.subversion.merge (2.2.4) "CollabNet Subversion Merge Client" [Active]
    com.ibm.icu (4.4.2.v20110208) "International Components for Unicode for Java (ICU4J)" [Active]
    com.jcraft.jsch (0.1.41.v201101211617) "JSch" [Resolved]
    com.springsource.javax.jms (1.1.0) "Java Messaging System API" [Resolved]
    com.sun.syndication (0.9.0.v200803061811) "Rss and atOM utilitiEs (ROME)" [Resolved]
    java_cup.runtime (0.10.0.v201005080400) "Java Cup" [Resolved]
    javax.activation (1.1.0.v201105071233) "Apache Geronimo Activation Plug-in" [Resolved]
    javax.jws (2.0.0.v201005080400) "Web Services Metadata" [Resolved]
    javax.mail (1.4.0.v201005080615) "Javax Mail Plug-in" [Resolved]
    javax.persistence (2.0.3.v201010191057) "Java Persistence API 2.0" [Resolved]
    javax.servlet (2.5.0.v201103041518) "Servlet API Bundle" [Resolved]
    javax.servlet.jsp (2.0.0.v201101211617) "Java Server Pages API Bundle" [Resolved]
    javax.transaction (1.1.1.v201105210645) "geronimo Javax Transaction API 1.1.1 spec" [Resolved]
    javax.wsdl (1.5.1.v201012040544) "WSDL4J" [Resolved]
    javax.wsdl (1.6.2.v201012040545) "WSDL4J" [Resolved]
    javax.xml (1.3.4.v201005080400) "JAXP XML" [Resolved]
    javax.xml.bind (2.1.9.v201005080401) "XML Binding for Java" [Resolved]
    javax.xml.rpc (1.1.0.v201005080400) "JAX-RPC" [Resolved]
    javax.xml.soap (1.2.0.v201005080501) "SAAJ" [Resolved]
    javax.xml.stream (1.0.1.v201004272200) "Java XML Streaming API" [Resolved]
    javax.xml.ws (2.1.0.v200902101523) "Java API for XML Web Services (JAX-WS)" [Resolved]
    net.sourceforge.lpg.lpgjavaruntime (1.1.0.v201004271650) "SourceForge LPG" [Resolved]
    oracle.eclipse.tools.application.common.services (4.2.0.201112072225) "Oracle Application Tools Common Services" [Active]
    oracle.eclipse.tools.common (4.2.0.201112072225) "Oracle Common Tools" [Active]
    oracle.eclipse.tools.common.doc (4.2.0.201112072225) "Oracle Enterprise Tools for Eclipse Documentation" [Active]
    oracle.eclipse.tools.common.services (4.2.0.201112072225) "Oracle Common Services" [Active]
    oracle.eclipse.tools.common.services.ui (4.2.0.201112072225) "Oracle Common Services UI" [Active]
    oracle.eclipse.tools.common.templating (4.2.0.201112072225) "File Templates Plugin" [Starting]
    oracle.eclipse.tools.common.ui (4.2.0.201112072225) "Oracle Common Tools UI" [Active]
    oracle.eclipse.tools.common.upgrade (4.2.0.201112072225) "Oracle Upgrade Framework" [Active]
    oracle.eclipse.tools.doc.javaee5 (1.0.0.201111040904) "Java EE 5 Documentation" [Starting]
    oracle.eclipse.tools.doc.javaee6 (1.0.0.201111040904) "Java EE 6 Documentation" [Starting]
    oracle.eclipse.tools.envcheck (4.2.0.201112072225) "Oracle Eclipse Tools Environment Checker" [Active]
    oracle.eclipse.tools.glassfish (4.2.0.201111040904) "Oracle GlassFish Server Tools" [Active]
    oracle.eclipse.tools.sapphire.modeling.legacy (4.2.0.201112072225) "Oracle Sapphire Modeling Framework (Legacy)" [Starting]
    oracle.eclipse.tools.sapphire.ui.legacy (4.2.0.201112072225) "Oracle Sapphire Framework UI (Legacy)" [Starting]
    oracle.eclipse.tools.weblogic (4.2.0.201112072225) "Oracle WebLogic Server Tools" [Active]
    oracle.eclipse.tools.webtier (4.2.0.201112072225) "Oracle Web Tier Tools" [Starting]
    oracle.eclipse.tools.webtier.common.services (4.2.0.201112072225) "Oracle Web Tier Tools Common Services" [Active]
    oracle.eclipse.tools.webtier.doc (4.2.0.201112072225) "Oracle Web Tier Tools Documentation" [Starting]
    oracle.eclipse.tools.webtier.html (4.2.0.201112072225) "Oracle Web Tier Tools HTML" [Starting]
    oracle.eclipse.tools.webtier.html.ui (4.2.0.201112072225) "Oracle Web Tier Tools HTML UI" [Starting]
    oracle.eclipse.tools.webtier.javawebapp (4.2.0.201112072225) "Oracle Web Tier Tools Java Web App" [Active]
    oracle.eclipse.tools.webtier.jsf (4.2.0.201112072225) "Oracle Web Tier Tools JSF" [Active]
    oracle.eclipse.tools.webtier.jsf.ui (4.2.0.201112072225) "Oracle Web Tier Tools JSF UI" [Active]
    oracle.eclipse.tools.webtier.jsp (4.2.0.201112072225) "Oracle Web Tier Tools JSP" [Active]
    oracle.eclipse.tools.webtier.jsp.ui (4.2.0.201112072225) "Oracle Web Tier Tools JSP UI" [Active]
    oracle.eclipse.tools.webtier.jstl (4.2.0.201112072225) "Oracle Web Tier Tools JSTL" [Active]
    oracle.eclipse.tools.webtier.jstl.ui (4.2.0.201112072225) "Oracle Web Tier Tools JSTL UI" [Starting]
    oracle.eclipse.tools.webtier.struts (4.2.0.201112072225) "Oracle Web Tier Tools Apache Struts" [Starting]
    oracle.eclipse.tools.webtier.struts.ui (4.2.0.201112072225) "Oracle Web Tier Tools Apache Struts UI" [Starting]
    oracle.eclipse.tools.webtier.trinidad (4.2.0.201112072225) "Oracle Web Tier Tools Apache Trinidad" [Starting]
    oracle.eclipse.tools.webtier.trinidad.ui (4.2.0.201112072225) "Oracle Web Tier Tools Apache Trinidad UI" [Starting]
    oracle.eclipse.tools.webtier.ui (4.2.0.201112072225) "Oracle Web Tier Tools UI" [Active]
    oracle.eclipse.tools.xml.edit.ui (4.2.0.201112072225) "Oracle XML Editing" [Starting]
    oracle.eclipse.tools.xml.model (4.2.0.201112072225) "Oracle XML TLEI Model" [Active]
    oracle.eclipse.tools.xmlbeans.library.v21 (4.2.0.201112072225) "Apache XMLBeans v2.1" [Starting]
    oracle.eclipse.tools.xmlbeans.library.v22 (4.2.0.201112072225) "Apache XMLBeans v2.2" [Starting]
    oracle.eclipse.tools.xmlbeans.library.v23 (4.2.0.201112072225) "Apache XMLBeans v2.3" [Starting]
    org.apache.ant (1.8.2.v20110505-1300) "Apache Ant" [Resolved]
    org.apache.axis (1.4.0.v201005080400) "Apache Web Services" [Resolved]
    org.apache.bcel (5.2.0.v201005080400) "Apache BCEL" [Resolved]
    org.apache.commons.codec (1.3.0.v201101211617) "Apache Commons Codec Plug-in" [Resolved]
    org.apache.commons.collections (3.2.0.v201005080500) "Apache Commons Collections" [Resolved]
    org.apache.commons.discovery (0.2.0.v201004190315) "Jakarta-Commons Discovery" [Resolved]
    org.apache.commons.el (1.0.0.v201101211617) "Apache Commons JSP 2.0 Expression Language Interpreter" [Resolved]
    org.apache.commons.httpclient (3.1.0.v201012070820) "Apache Commons Httpclient" [Resolved]
    org.apache.commons.lang (2.1.0.v201005080500) "Apache Jakarta Commons L

    Hi,
    could you let us know what version of OEPE you were running prior to the upgrade along with the Eclipse version ? Also was the previous installation a full OEPE install or was it installed via the update site ?
    thanks
    Raj

  • 11g Release 1 Patch Set 3 (WLS 10.3.4)

    Hi.
    While creating new server in OEPE Helios(11.1.1.6) I found that WLS 10.3.4 is available for selection. However I didnt find any information neither links to download it. Only 10.3.3 is available.
    When and where it is\would be available for download?
    Thanks

    frf,
    Hello, as part of the WebLogic 10.3.4 release on friday - we verified JPA 2.0 functionality for enterprise users using JPA as their persistence pattern. The main issues were JPA 2.0 XSD validation and JPA 2.0 container managed persistence unit injection.
    The details of the following post outline what happens out of the box and how JPA 2.0 can be officially enabled on JEE5 compliant WebLogic 10.3.4 install +(with or without the QWG8 patch)+
    In 10.3.3.0 you were required to use the FilteringClassLoader via the *<wls:prefer-application-packages>* addition to your application managed persistence unit - this workaround is now deprecated and not required in 10.3.4.0 for both application and container managed persistence contexts.
    Specifically we will start retesting EE applications using a SSB injected @PersistenceContext container managed JTA transactional JPA 2.0 persistence units with/without JPA 2.0 XSD elements.
    I verified the server and it is using SVN rev# *8635 from 6 Dec 2010* https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8635
    Essentially in order to enable JPA 2.0 functionality on WebLogic 10.3.4 shipped on 14 Jan 2011 - you apply the QWG8 patch below or manually edit your server classpath to put the JPA 2.0 persistence specification API jar and the com.oracle.jpa2support_1.0.0.0_2-0.jar ahead of the other liibraries on the classpath.
    commEnv.cmd: line 67
    @rem Set BEA Home
    set BEA_HOME=C:\opt\wls1034r20110115
    @rem Enable JPA 2.0 functionality on WebLogic Server 10.3.4 with the following patch line for commEnv.cmd:67
    set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jarEverything is shipped with WebLogic 10.3.4 but JPA 1.0 is enabled by default so that this JEE5 capable server is backwards compatible with JEE5/JPA1 out of the box. Without the above patch you will see the following.
    <15-Jan-2011 5:58:40 o'clock PM EST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 >
    [EL Info]: 2011-01-15 18:06:38.082--ServerSession(48997950)--Thread(Thread[[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--EclipseLink, version: Eclipse Persistence Services - 2.1.2.v20101206-r8635
    [EL Info]: 2011-01-15 18:06:38.082--ServerSession(48997950)--Thread(Thread[[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Server: 10.3.4.0
    We have the required bundles in the modules directory...
    javax.persistence_1.0.0.0_2-0-0.jar (upgraded from 1-0-2)
    org.eclipse.persistence_1.0.0.0_2-1.jar (upgraded from 2-0)
    A very quick test of a JPA 2.0 container managed app with the following persistence.xml in the ejb.jar works as detailed below.
    There are 3 issues we must check.
    1) JPA 2.0 XSD parsing errors: as expected there are no more JPA 2.0 schema parsing issues.
    2) New JPA 2.0 schema elements like the *<shared-cache-mode>NONE</shared-cache-mode>* element - this passes validation but we need to verify runtime functionality
    3) JPA 2.0 runtime API like a entityManager.getMetamodel(); call on the Servlet or Statless session bean
    4) JPA 2.0 weaving/instrumentation - Again we need to verify something like weaving of Entities contaiing lazy IndirectLists are weaved properly by the container.
    Note: All testing in this post is on a WebLogic 10.3.4.0 install out-of-the-box. The only modification I made was in creating a derby 10.5.3.0 JTA global datasource "localJTA" on the server - and drop a container managed JPA 2.0 app as an EAR in the autodeploy directory on the default user domain.
    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
        <persistence-unit name="example" transaction-type="JTA">
            <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <!-- we will default to Kodo without specifying the provider -->
            <jta-data-source>localJTA</jta-data-source>
            <shared-cache-mode>NONE</shared-cache-mode><!-- shared-cache-mode must come after any class definitions (usually SE only) - the JPA schema is ordered -->
            <properties>
                <property name="eclipselink.target-server" value="WebLogic_10"/>
                <property name="eclipselink.target-database" value="Derby"/>           
                <property name="eclipselink.logging.level" value="FINEST"/>
                <!-- new for 10.3.4.0 http://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging#Server_Logging  -->
                <property name="eclipselink.logging.logger" value="DefaultLogger"/>
                <!-- turn off DDL generation after the model is stable -->           
                <!-- property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
                <property name="eclipselink.ddl-generation.output-mode" value="database"/-->
            </properties>      
        </persistence-unit>For 3) we get the following exception out of the box on a servlet if we do not apply the above mentioned patch below - because the container defaults to Java EE 5 functionality - or JPA 1.0
    http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
    java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
    at org.eclipse.persistence.example.jpa.server.weblogic.enterprise.presentation.FrontController.processGliderComm
    and(FrontController.java:346)
    or 3) The same exception if we try to run JPA 2.0 on the DI entityManager from the SSB in the EJB container classLoader
    javax.ejb.EJBException: EJB Exception: : java.lang.NoSuchMethodError: javax/persistence/EntityManager.getMetamodel()Ljavax/persistence/metamodel/Metamodel;
    +     at org.eclipse.persistence.example.jpa.server.business.ApplicationService.insertObjects(ApplicationService.java:66)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)+
    +..+
    +     at $Proxy74.insertObjects(Unknown Source)+
    +     at org.eclipse.persistence.example.jpa.server.business.ApplicationService_5ptwty_ApplicationServiceLocalImpl.__WL_invoke(Unknown Source)+
    We also get the Kodo/OpenJPA provider when we attempt to weave.
    +<openjpa-1.1.1-SNAPSHOT-r422266:965591 fatal user error> org.apache.openjpa.util.MetaDataException: "org.eclipse.persistence.example.jpa.server.business.Cell.id" declares generator name "EL_SEQUENCE_CELL", but uses the AUTO generation type. The only valid generator names under AUTO are "uuid-hex" and "uuid-string".+
    +     at org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getGeneratedValueStrategy(AnnotationPersistenceMetaDataParser.java:1226)+
    Therefore there is still a little bit of configuration required.
    Enabling JPA2 support
    1) install the QWG8 patch, or
    2) manually add the com.oracle.jpa2support_1.0.0.0_2-0.jar ahead of the server classpath by following the instructions in the documentation at
    http://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
    or doing it manually by modifying the following line
    C:\opt\wls10340_pub110115\wlserver_10.3\common\bin\commEnv.cmd
    set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.0.0.0_2-0-0.jar;%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
    Results
    The following code
    @Local
    @Stateless
    public class ApplicationService implements ApplicationServiceLocal {
        @PersistenceContext(unitName="example", type=PersistenceContextType.TRANSACTION)     
        private EntityManager entityManager;
        public boolean insertObjects(List<Cell> classes) {
            try {
                for(int i=0; i< classes.size(); i++) {
                    entityManager.persist(classes.get(i));
                System.out.println("JPA 2.0 Metamodel: " + entityManager.getMetamodel());           ...prints out the JPA 2.0 EntityManager dependency injected into the SSB proxy for the life of the transaction in the function
    JPA 2.0 Metamodel: MetamodelImpl@34817119 [ 5 Types: , 2 ManagedTypes: , 2 EntityTypes: , 0 MappedSuperclassTypes: , 0 EmbeddableTypes: ]+
    +[EL Finer]: 2011-01-15 22:36:00.33--UnitOfWork(34913451)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beforeCompletion callback, status=STATUS_ACTIVE+
    You can see that when we debug the stateless session bean $Proxy that has our injected EntityManager...
    this     ApplicationService_5ptwty_Impl  (id=11616)     
         __WL_EJBContext     SessionEJBContextImpl  (id=11654)     
         entityManager     $Proxy73  (id=11639)     
              h     TransactionalEntityManagerProxyImpl  (id=11638)     
                   appName     "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR" (id=11513)     
                   closeMethod     Method  (id=11663)     
                   moduleName     "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB.jar" (id=11515)     
                   persistenceUnit     PersistenceUnitInfoImpl  (id=11665)     
                   persistenceUnitName     "org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEAR#org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB.jar#example" (id=11666)     
                   queryMethods     HashSet<E>  (id=11668)     
                   transactionAccessMethod     Method  (id=11669)     
                   transactionalMethods     HashSet<E>  (id=11670)     
                   txHelper     TransactionHelperImpl  (id=11523)     
                   txRegistry     ServerTransactionManagerImpl  (id=11524)     
                   unqualifiedPersistenceUnitName     "example" (id=11672)     ...no longer complains about an unknown getMetamodel() JPA 2.0 method signature
    Oracle WebLogic Server 11gR1 PatchSet 3 r20110115 at localhost [Oracle WebLogic Server]     
         Java HotSpot(TM) Client VM[localhost:8453]     
              Daemon Thread [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] (Running)     
              Daemon Thread [[ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'] (Suspended)     
                   TransactionalEntityManagerProxyImpl.invoke(Object, Method, Object[]) line: 18     
                   $Proxy59.getMetamodel() line: not available [local variables unavailable]     
                   ApplicationService_5ptwty_Impl(ApplicationService).insertObjects(List<Cell>) line: 60     
    ..               JdkDynamicAopProxy.invoke(Object, Method, Object[]) line: 204     
                   $Proxy71.insertObjects(List) line: not available     
                   ApplicationService_5ptwty_ApplicationServiceLocalImpl.__WL_invoke(Object, Object[], int) line: not available     
                   SessionLocalMethodInvoker.invoke(BaseLocalObject, MethodDescriptor, Object[], int, String, Class<?>) line: 39     
                   ApplicationService_5ptwty_ApplicationServiceLocalImpl.insertObjects(List) line: not available     
                   FrontController.generateGlider(PrintWriter) line: 252     
    ..               FrontController(HttpServlet).service(ServletRequest, ServletResponse) line: 820     
                   StubSecurityHelper$ServletServiceAction.run() line: 227     
    ..               ExecuteThread.run() line: 176     
    arg1     Method  (id=11511)     
         clazz     Class<T> (javax.persistence.EntityManager) (id=8312)     
         name     "getMetamodel" (id=11543)     
         returnType     Class<T> (javax.persistence.metamodel.Metamodel) (id=11545)     For 4) Weaving is occuring as expected on either the JPA 1.0 or JPA 2.0 entities. We check this by either checking that our Entity is an instanceof org.eclipse.persistence.internal.weaving.PersistenceWeaved interface, or debug into the Entity and look for our bytcode instrumented weaved fields that start with _persistence*.  The question is - we need a weaved field or weaved function that was introduced for JPA 2.0
    [4]     Cell  (id=11571)     
         _persistence_fetchGroup     null     
         _persistence_primaryKey     null     
         _persistence_session     null     
         _persistence_shouldRefreshFetchGroup     false     
         aCellAttribute     null     
         id     null     
         left     null     
         peers     HashSet<E>  (id=11572)     
              map     HashMap<K,V>  (id=11575)     
    com.oracle.jpa2support_1.0.0.0_2-0.jar forensicsI had a look at the patch jar com.oracle.jpa2support_1.0.0.0_2-0.jar that WebLogic 10.3.4 ships with that allows installers to enable JPA 2.0 (JSR-317) support to superceed the default JPA 1.0 (JSR-220) support. It looks like the container proxy code for container managed EntityManagerFactory and EntityManager $Proxy objects has been updated so that a JPA 2.0 EntityManager $Proxy object get injected with the proper API level object via the InvocationHandlerFactory, FactoryInterceptor. The Query proxy has been updated as well. There is a fix for Kodo(OpenJPA) and OpenJPA related to the recent change and deprecation of certain functions of those providers. The EclipseLink JPA 2.0 provider (as the provider for TopLink) did not need weblogic changes beyond placing the JPA javax.peristence 2.0 specification jar higher on the classpath.
    The root EclipseLink tracking bug is 334468
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=334468
    OTN downloadhttp://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-main-097127.html
    Patching
    http://download.oracle.com/docs/cd/E18476_01/doc.220/e18480/weblogicchap.htm
    Documentationhttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13852/toc.htm
    Supported Oracle WebLogic Server Versionshttp://download.oracle.com/docs/cd/E15315_06/help/oracle.eclipse.tools.weblogic.doc/html/SupportedServerVersions.html
    TopLink JPA 2.0 Specifichttp://download.oracle.com/docs/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
    see related
    JPA 2: Reverify JPA 2.0 XSD support in persistence.xml on AM/CM app on WebLogic 10.3.3.0
    http://bugs.eclipse.org/331569
    JPA 2.0: Add WebLogic 10.3 configuration process to enable the JPA 2.0 library functionality - updated
    http://bugs.eclipse.org/296271
    http://en.wikipedia.org/wiki/Oracle_WebLogic_Server - updated
    JPA: Add downloadable 60k weblogic.EAR to wiki page (outside of SVN) - reopened
    http://bugs.eclipse.org/294745
    JPA: support WebLogic 10.3.4.0 introduction of new JPA MBean that changes the default JPA provider
    http://bugs.eclipse.org/312824
    JPA: Update tutorial wiki for WebLogic 10.3 to match the Oracle WebLogic 11g 10.3.3.0 - assigned
    http://bugs.eclipse.org/310849
    To be answered
    OTN Post: WebLogic 10.0 + JPA 2.0 = errors - updated
    Re: WebLogic 10.0 + JPA 2.0 = errors
    Deploy Hibernate based EAR file on Weblogic 10.3.3?
    OTN Post: Default JPA provider for Weblogic Server 10.3.2 (11g) - updated
    Default JPA provider for Weblogic Server 10.3.2 (11g)
    OTN Post: Hibernate 3.6 Final (JPA 2.0) + WL 10.3.x :Unable to deploy sample appn - updated
    Hibernate 3.6 Final (JPA 2.0) + WL 10.3.x :Unable to deploy sample appn
    WebLogic 10.0 + JPA 2.0 = errors
    OTN Post: EJB with Hibernate On Weblogic - updated
    Re: EJB with Hibernate On Weblogic
    OTN Post: OEPE 1.6 - Oracle WebLogic Server 11gR1 PatchSet 3 requres WLS 10.3.4 - answered
    OEPE 1.6 - Oracle WebLogic Server 11gR1 PatchSet 3 requres WLS 10.3.4
    OTN Post: EJB with Hibernate On Weblogic - updated
    Re: EJB with Hibernate On Weblogic
    OTN Post: OpenJPA_2.0 NoSuchMethod error (getValidationMode()) - updated
    OpenJPA_2.0 NoSuchMethod error (getValidationMode())
    JPA 2.0 features used on WebLogic even if they are not available at runtime - notified
    http://netbeans.org/bugzilla/show_bug.cgi?id=189205
    Option to enable JPA 2.0 for dev WebLogic - notified
    http://netbeans.org/bugzilla/show_bug.cgi?id=189348
    False-positive error badge on project with JPA targeting WebLogic - notified
    http://netbeans.org/bugzilla/show_bug.cgi?id=189626
    Giving up on Hibernate (for now), trying EclipseLink...
    http://forums.netbeans.org/post-94817.html
    http://blogs.sun.com/arungupta/entry/which_java_ee_6_app
    Eclipselink 2.0 + WebLogic 10 => No joy (Unable to get Eclipse link 2.0 working with WebLogic 10) - answered
    http://www.eclipse.org/forums/index.php?t=msg&goto=644000&S=40e13288641c0af5dc8489343b896348#msg_644000
    eclipselink-users Problem of eclipselink upgrade (2.0.2) - WebLogic 10.3.3.0 - answered
    http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04631.html
    Re: EclipseLink + JPA 2 in Weblogic 10.3.0
    http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg04375.html - answered below
    Re: eclipselink-users Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10,
    http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05609.html
    [eclipselink-users] Problems with Eclipselink 2 (JPA 2.0) & WebLogic 10 - answered
    http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg05639.html
    To be Deprecated
    JPA 2: Reverify JPA 2.0 XSD support in persistence.xml on AM/CM app on WebLogic 10.3.3.0
    http://bugs.eclipse.org/331569
    JPA 2.0: Add WebLogic 10.3 configuration process to enable the JPA 2.0 library functionality
    http://bugs.eclipse.org/296271
    WebLogic 10.3 availability?
    / Michael O'Brien
    http://www.eclipselink.org

  • Calling a SP or Function from Java receiving a geometry(MDSYS.SDO_GEOMETRY)

    Hi there,
    What I want to do is: calling a stored procedure OR function from Java with a String-variable as input and receiving a geometry (SDO_GEOMETRY).
    I’m facing currently the problem of calling a stored function on oracle 11g from Java using JPA (EclipseLink), Spring 2.5.6 returning an MDSYS.SDO_GEOMETRY object.
    I’ve tried to call a stored procedure with MDSYS.SDO_GEOMETRY as an output parameter instead, but with no success.
    The function’s signature looks like this:
    CREATE or REPLACE
    FUNCTION GET_GEO_BRD_FUNCTION(p_geo_brd_id IN VARCHAR2) RETURN MDSYS.SDO_GEOMETRY AS
    sdo_geom    MDSYS.SDO_GEOMETRY := null;
    BEGIN
    /* do some fancy stuff on the database side */
      SELECT sp_geom
        INTO sdo_geom
        FROM geo_brd WHERE id = p_geo_brd_id;
      RETURN sdo_geom;
    END;
    The calling code looks like this:
    MyClass extends JpaDaoSupport{
       /** logger */
       protected static final ILogger LOG = LogFactory.getLogger(MyClass.class);
        * {@inheritDoc}
        * @see com.example.MyClass#calculateGeometry(java.lang.String)
       @Override
       public JGeometry calculateGeometry(final String id) {
           JGeometry geometry = null;
           final JpaCallback action = new JpaCallback() {
                @Override
                public Object doInJpa(final EntityManager em) throws PersistenceException {
                   final Session session = JpaHelper.getEntityManager(em).getActiveSession();
                   final StoredFunctionCall functionCall = new StoredFunctionCall();
                   functionCall.setProcedureName("GET_GEO_BRD_FUNCTION");
                   functionCall.addNamedArgument("p_geo_brd_id");
                   functionCall.setResult("sdo_geom", Oracle.sql.STRUCT.class);
                   final ValueReadQuery query = new ValueReadQuery();
                   query.setCall(functionCall);
                   query.addArgument("p_geo_brd_id");
                   final ArrayList args = new ArrayList();
                   args.add("2e531e62-2105-4522-978a-ab8baf19e273");// hardcoded for test
                   final Object result = session.executeQuery(query, args);
                   return result;
        final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);
        try {
           geometry = JGeometry.load(result);
        } catch (final SQLException e) {
           MyClass.LOG.error("Error loading JGeometry from STRUCT.", e);
           return null;
        return geometry;
    And when I execute the query I get the following error:
    Internal Exception: java.sql.SQLException: ORA-06550: Row 1, Column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: Row 1, Column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call: BEGIN ? := GET_GEO_BRD_FUNCTION(p_geo_brd_id=>?); END;
         bind => [=> sdo_geom, 2e531e62-2105-4522-978a-ab8baf19e273]
    Query: ValueReadQuery()
    So I thought may be let's try it with a stored procedure instead...
    The procedure looks like this:
    CREATE or REPLACE
    PROCEDURE GET_GEO_BRD_PROCEDURE(p_geo_brd_id IN VARCHAR2, sdo_geom OUT MDSYS.SDO_GEOMETRY) AS
    BEGIN
    /* do some fancy stuff on the database side */
      SELECT sp_geom
        INTO sdo_geom
        from geo_brd where id = p_geo_brd_id;
    END;
    The calling Java code in case of the stored procedure looks like this (only the content of the JPACallback has changed):
    @Override
    public Object doInJpa(final EntityManager em) throws PersistenceException {
        final Session session = JpaHelper.getEntityManager(em).getActiveSession();
        final StoredProcedureCall spCall = new StoredProcedureCall();
        spCall.setProcedureName("GET_GEO_BRD_PROCEDURE");
        spCall.addNamedArgument("p_geo_brd_id", "p_geo_brd_id", String.class);
        spCall.addNamedOutputArgument("sdo_geom", "sdo_geom", OracleTypes.STRUCT);
        final ValueReadQuery query = new ValueReadQuery();
        query.setCall(spCall);
        query.addArgument("p_geo_brd_id"); // input
        final List args = new ArrayList();
        args.add("2e531e62-2105-4522-978a-ab8baf19e273");// hardcoded for test
        final Object result = session.executeQuery(query, args);
        return result;
    And when I execute the query I get the following error:
    java.sql.SQLException: ORA-06550: Row 1, Column 13:
    PLS-00306: wrong number or types of arguments in call to 'GET_GEO_BRD_PROCEDURE'
    ORA-06550: Row 1, Column 7:
    PL/SQL: Statement ignored
    So both exceptions look quite similar.
    I guess in both cases the exception description leads to the assumption, that the wrong type for the return value / output parameter is used…
    So - how can a receive a MDSYS_SDO_GEOMETRY object from a stored procedure or stored function in Java ?
    What is wrong in the Java code?
    Thank you in advance for any suggestions!
    Yours,
    Chris
    Edited by: user3938161 on 20.12.2011 07:46
    Edited by: user3938161 on Dec 20, 2011 8:06 AM: added variable declaration of JGeometry geometry in source code

    Thanks, that did the trick! ;-)
    Here is now the code for stored procedure and function for anybody else encountering the same troubles... (be aware of the parameter order and/or naming!)
    Code for stored functions:
    final JpaCallback action = new JpaCallback() {
      @Override
      public Object doInJpa(final EntityManager em) throws PersistenceException {
         final Session session = JpaHelper.getEntityManager(em).getActiveSession();
           * Using CallableStatement for stored functions
          STRUCT st = null;
          CallableStatement cs = null;
          final DatabaseLogin login = session.getLogin();
          final Connection _conn = (Connection) login.connectToDatasource(session.getDatasourceLogin().buildAccessor(), session);
          try {
             try {
                cs = _conn.prepareCall("{? = call GET_GEO_BRD_FUNCTION(?)}");
                cs.registerOutParameter(1, OracleTypes.STRUCT, "MDSYS.SDO_GEOMETRY");
                cs.setString(2, "2e531e62-2105-4522-978a-ab8baf19e273");//TODO: hardcoded for test
                cs.execute();
             } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured calling the stored procedure", e);
             if (cs != null) {
                //reading geometry from the database
                try {
                   st = (STRUCT) cs.getObject(1);
                } catch (final SQLException e) {
                   MyClass.LOG.error("An exception occured converting the query result to oracle.sql.STRUCT", e);
          } finally {
             try {
                if (_conn != null && !_conn.isClosed()) {
                    _conn.close();
             } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured on closing the database connection.", e);
          return st;
    final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);
    The code for stored procedure solution:
    final JpaCallback action = new JpaCallback() {
      @Override
      public Object doInJpa(final EntityManager em) throws PersistenceException {
          final Session session = JpaHelper.getEntityManager(em).getActiveSession();
           * Using CallableStatement for stored procedure
          STRUCT st = null;
          CallableStatement cs = null;
          final DatabaseLogin login = session.getLogin();
          final Connection _conn = (Connection) login.connectToDatasource(session.getDatasourceLogin().buildAccessor(), session);
          try {
             try {
                cs = _conn.prepareCall("{call GET_GEO_BRD_PROCEDURE(?,?)}");
                cs.setString("p_geo_brd_id", "2e531e62-2105-4522-978a-ab8baf19e273");
                cs.registerOutParameter("sdo_geom", OracleTypes.STRUCT, "MDSYS.SDO_GEOMETRY");
                cs.execute();
              } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured calling the stored procedure", e);
              if (cs != null) {
                //reading geometry from the database
                try {
                   st = (STRUCT) cs.getObject("sdo_geom");
                } catch (final SQLException e) {
                   MyClass.LOG.error("An exception occured converting the query result to oracle.sql.STRUCT", e);
           } finally {
              try {
                if (_conn != null && !_conn.isClosed()) {
                   _conn.close();
              } catch (final SQLException e) {
                MyClass.LOG.error("An exception occured on closing the database connection.", e);
            return st;
    final STRUCT result = (STRUCT) this.getJpaTemplate().execute(action);

  • Uses a non-entity as target entity

    Hi everyone,
    I need your help because I am working on a project j2ee6
    I am using jpa (eclipseLink)
    when I created entities without relation, all worked perfectly
    but now that I am trying to set up relation @oneTomany @ManyToOne
    I got this error all the time
    Exception Description: [class com.Domain.User] uses
    [ERROR] a non-entity [class com.Domain.Groups] as target entity in the
    [ERROR] relationship attribute [field groupe].
    here is my user entity :_
    @Entity
    @NamedQueries({
         @NamedQuery(name = "findAllUsers", query="select u from User u"),
         @NamedQuery(name = "findWithLogParam", query="select u from User u where u.Email = :fmail and u.Password = FUNC('sha1', :fpass)")
    public class User implements Serializable{
         private static final long serialVersionUID = 3175161374832714727L;
         @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
         private Long UserId;
         @Column(nullable = false)
         private String Title = "Mr";
         @Column(nullable = false)
         private String Login;
         @Column(nullable = false)
         private String Password;
         @Column(nullable = false)
         private String Firstname;
         @Column(nullable = false)
         private String Lastname;
         @Column(nullable = false)
         private String Email;
         private String Telephone;
         private String Mobile;
         @Temporal(TemporalType.DATE)
         private Date Date_of_birth;
         private String Postcode;
         private String Address;
         private String City;
         private String County;
         private String Region;
         private String Country;
         private String AccountEnabled="On";
         @ManyToOne(optional=false)
    @JoinColumn(name="GROUPID", referencedColumnName="GROUPID")
         private Groups groupe;
         private String Token;
    Here is the entity Groups*
    @Entity
    public class Groups implements Serializable{
         private static final long serialVersionUID = 7092895671981671161L;
         @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
         private Long GroupId;
         @Column(nullable = false)
         private String GroupName;      
         @OneToMany(mappedBy="groupe", targetEntity=User.class, fetch=FetchType.EAGER)
         private List<User> UserList = new ArrayList<User>();
    Here is my persistence.xml*
    <?xml version="1.0" encoding="windows-1252" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
                   version="2.0">
         <persistence-unit name="testPU" transaction-type="JTA">
              <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>     
              <jta-data-source>jdbc/UnmodDB</jta-data-source>     
              <class>com.unmod.Domain.User</class>
              <class>com.unmod.Domain.Groups</class>
    ........ other classes ......
              <exclude-unlisted-classes>false</exclude-unlisted-classes>
              <properties>
                   <property name="eclipselink.target-database" value="MySQL"/>
                   <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
                   <property name="eclipselink.ddl-generation.output-mode" value="database" />
              <property name="eclipselink.create-ddl-jdbc-file-name" value="create.sql"/>
              </properties>
         </persistence-unit>
    </persistence>
    It works (compliation works) when I add @Basic however only the user table is created
    Thanks

    Yes it's strange because
    when I comment the oneToMany/ManyToOne parts
    I see hibernate is called
    Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    INFO: Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
    INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
    INFO: Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
    INFO: Using provided datasource
    INFO: RDBMS: MySQL, version: 5.5.20
    INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.18 ( Revision: [email protected] )
    INFO: Using dialect: org.hibernate.dialect.MySQLDialect
    INFO: Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
    INFO: instantiating TransactionManagerLookup: org.hibernate.transaction.SunONETransactionManagerLookup
    INFO: instantiated TransactionManagerLookup
    INFO: Automatic flush during beforeCompletion(): disabled
    INFO: Automatic session close at end of transaction: disabled
    INFO: JDBC batch size: 15
    INFO: JDBC batch updates for versioned data: disabled
    INFO: Scrollable result sets: enabled
    but when I added the OneToMany/ManyToOne
    I got
    [INFO] Command deploy failed.
    [ERROR] remote failure: Unknown plain text format. A properly formatted response from a PlainTextActionReporter
    [ERROR] always starts with one of these 2 strings: PlainTextActionReporterSUCCESS or PlainTextActionReporterFAILURE. The response we received from the server was not understood: Signature-Version: 1.0
    [ERROR] message: Error occurred during deployment: Exception while preparing t
    [ERROR] he app : Exception [EclipseLink-28018] (Eclipse Persistence Services
    [ERROR] - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityMa
    [ERROR] nagerSetupException
    [ERROR] Exception Description: Predeployment of P
    [ERROR] ersistenceUnit [chapter02PU] failed.
    [ERROR] Internal Exception: Exce
    [ERROR] ption [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110
    [ERROR] 604-r9504): org.eclipse.persistence.exceptions.ValidationException%%%
    [ERROR] EOL%%%Exception Description: [class com.unmod.Domain.User] uses a non
    [ERROR] -entity [class com.unmod.Domain.Groups] as target entity in the relat
    [ERROR] ionship attribute [field groupe].. Please see server.log for more det
    [ERROR] ails.
    [ERROR] Exception while invoking class org.glassfish.persistenc
    [ERROR] e.jpa.JPADeployer prepare method : javax.persistence.PersistenceExcep
    [ERROR] tion: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2
    [ERROR] .3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManag
    [ERROR] erSetupException
    [ERROR] Exception Description: Predeployment of Pers
    [ERROR] istenceUnit [chapter02PU] failed.
    [ERROR] Internal Exception: Excepti
    [ERROR] on [EclipseLink-7250] (Eclipse Persistence Services - 2.3.0.v20110604
    [ERROR] -r9504): org.eclipse.persistence.exceptions.ValidationException%%%EOL
    [ERROR] %%%Exception Description: [class com.unmod.Domain.User] uses a non-en
    [ERROR] tity [class com.unmod.Domain.Groups] as target entity in the relation
    [ERROR] ship attribute [field groupe].
    [ERROR] Exception [EclipseLink-28018]
    [ERROR] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.p
    [ERROR] ersistence.exceptions.EntityManagerSetupException
    [ERROR] Exception Descripti
    [ERROR] on: Predeployment of PersistenceUnit [chapter02PU] failed.
    [ERROR] Internal E
    [ERROR] xception: Exception [EclipseLink-7250] (Eclipse Persistence Services
    [ERROR] - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.Validati
    [ERROR] onException
    [ERROR] Exception Description: [class com.unmod.Domain.User] uses
    [ERROR] a non-entity [class com.unmod.Domain.Groups] as target entity in the
    [ERROR] relationship attribute [field groupe].
    it's like eclipseLink wanted to bug me over Hibernate.

  • ORA-01729: for XMLType

    Hi all,
    i want to insert the xml data in my table with xmltype. At first i store these xml daten in another table as clob. But i get always the error message
    ORA-01729: database link name expected
    during the insert the xml data in xmltype column.
    For the clobtable:
    PreparedStatement pstmt_clob = con.prepareStatement("INSERT INTO clobtable VALUES(?, ?)");
    pstmt_clob.setInt(1, f+1);
    pstmt_clob.setCharacterStream(2, new java.io.FileReader(f_ordner[f+1]), (int)f_ordner[+1].length());
    pstmt_clob.execute();
    For the xmltable:
    Connection conn = connect();
    stmt.executeUpdate("UPDATE xmltable SET xml_dok = XMLTYPE.createXML(" + conn + "," + rs.getClob(2) + ")WHERE id =" + nr);
    Code for connection:          
    public Connection connect() throws Exception {
    Class.forName("oracle.jdbc.OracleDriver");
    Connection conn = DriverManager.getConnection(
    "jdbc:oracle:oci:@zeus", "zhou", "diplom");
    return conn;
    I don't know, what's wrong with my programm. Can you help me?
    thank you very much and greeting from germany
    rabbit

    I am not very experienced with JPA eclipselink, but I will try to answer the question since I think I know what the problem might be.
    I think the problem is that you are storing the data in a String variable and sending it to the database as String(VARCHAR2). A variable of type VARCHAR2 can hold up to 4000 bytes of data (32K in PL/SQL, but this doesn't apply to you). Therefore if you try to store more than 4000 bytes you are in violation with this contract and thus ORA-01461 is thrown.
    I think the right way to go is to use DirectToXMLTypeMapping. Have you tried that?
    This link contains discussion that might be useful to you:
    http://www.nabble.com/Oracle-XMLType,-JPA-and-EclipseLink-td19569909.html
    Regarding the CHUNK size, it should be multiple of DB_BLOCK_SIZE parameter. For instance if this parameter in your database is set to 8192 (8K), then CHUNK size can be any of the following 8K, 16K, 24K and 32K (32K is the max allowed).
    However, if you specify any other value for this parameter Oracle will automatically round it to the next (higher) multiple of DB_BLOCK_SIZE. In your case, if you use 8K blocks, this value will be 8192.
    So there you should not be worried about this value at this point. I asked more out from curiosity.

  • @ManyToOne with Composite Id with AUTO increment

    Hi ,
    Below is scenario where i am facing issue. Please let me know your suggestions.
    Tables :
    OriginalWork - original_work_id, other columns
    Subwork - original_work_id, seq_number, other columns
    primary key (original_work_id, seq_number) -- composite key
    original_work_id in subwork needs to populated from original_work_id in OriginalWork
    and
    seq_number must be incremented by 1 automatically.
    OriginalWork can have many Subwork
    (one to many)
    Configurations in subwork :
    @Id
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name=" original_work_id ")
    private Originalwork originalwork;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long seq_number;
    I tried using embeddedId , but did not work.
    The above configuration is not working and exception is java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist
    This is not thing do with the privileges as I am able to access the sequence.
    Please clarify.
    Thanks.

    I think you might be jumping ahead here, as the exception states there is a problem with sequencing - not the ManyToOne relationship. First step would be to find out which entity has the issue with sequencing - is it OriginalWork or SubWork. You might try a simple test where both have a simple pk using sequencing. I don't think it is the Subwork entity, as per http://wiki.eclipse.org/EclipseLink/Examples/JPA/PrimaryKey generation mode auto should default to Table sequencing in EclipseLink - the error would be different.
    Looking at the model, this should work as long as Subwork has either an embeddedId class or a PK class defined. Best bet since you are using a relationship mapping in the composite PK is to use a PK class with a long seq_number; and long originalwork; assuming OriginalWork's id is of type long as well.
    Best Regards,
    Chris

Maybe you are looking for