Using toplink running in oc4j in 11.1.1.0.0

Hi,
I'm using Toplink 11g Release 1 (11.1.1.0.0) (Build 070624) in a web app running in oc4j. I've noticed that sometimes my changes do not get flushed to the database despite the fact that I see the update and commit in toplink logging. The app does correctly see the changes when queried from multiple sessions, yet the changes are not in the db. Do you know where the changes are being cached and how I can flush them to the db?
When I startup oc4j, all data in the table disappears. This may be due to something that someone else in our team is doing when oc4j starts up, but I haven't been able to find out what it is yet.
I don't think these are toplink issues, but I am hoping you might be able shed some light on this.
Thanks,
Vicki

Jim was spot on. As he suggested, I put in a check to see if the object I was updating was the same as the shared copy in the cache from the ServerSession and indeed it was.
I was querying my object and using SessionFactory.detach() to make a copy. However, I was then hanging onto a copy of my object after doing a uow.deepMergeClone() and uow.commit() and this working copy seems to become the shared copy. So when I made more changes to the object, I was corrupting my session cache.
The other unrelated problem of data being deleted when starting up oc4j was indeed some code in our app being called inadvertantly when initialized our app.

Similar Messages

  • Strange classloader experience with toplink-essentials on Oc4j-10.1.3.3.0

    Hi,
    I am teaching classes at the Eotvos University/Budapest on a topic where OC4J has been used for 2 years. Students use jdeveloper (regularly updated) to create webapps with EJB3.0+toplink backends. They test their projects first with the JDeveloper embedded OC4J, but after that they deploy it on a central server running standalone OC4J.
    Students make quite an intensive and versatile use of the OC4J server, a noteworthy stress-test you may find interesting! The server is a Ubuntu Linux with JDK_1.5.0_14.
    1. The first known issue is that after about 10 projects are deployed (small class projects 3-4 EJBs, 3-4 JSP-s each), oc4j regularl goes into a "runaway" mode, i.e. the CPU utilization of the JVM process goes up to 99-100%. Static web content is still available, but all applications stop responding. I can state pretty safely that the applications deployed are fairly harmless and it is not even necessary to run them to make this happen. I.e. after 10-15 apps are depoyed it is enough to start the admin-client.jar or the admin console to experience this problem. (The applications have no problem individually: last year after these issues occurred, we installed them individually for grading and nothing like this happened).
    Let me point out that SO FAR this happened with Oc4j-10.1.3.1 and Oc4j-10.1.3.2 only, and this was the main reason we swithed to Oc4j-10.1.3.3.0
    2. Another issue that exists both with the earlier versions and 10.1.3.3.0 is that applications need to include the toplink-essentials.jar explicitely if they use EJB3.0 entities. It appears to me that this should not be neessary as there are default definitions for that in config/server.xml (a shared-library definition for toplink-essentials), and in config/system-application.xml (a corresponding import-shared-library tag), but still their applications cannot be deployed because of the follwing error:
    Deploy error: Deploy error: Operation failed with error:
    Hiányzó osztály: oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    FĂĽggĹ' osztály: com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl
    BetöltĹ': oc4j:10.1.3
    Kódforrás: /opt/oc4j_101330/j2ee/home/lib/oc4j-internal.jar
    (On our machines, JDK displays some errors in Hungarian: HiányzĂł osztály=Missing class; FĂĽggĹ' osztály=Dependent class; BetöltĹ'=Loader; KĂłdforrás=Code source.)
    To fix this issue, we used a workaround, i.e. their orion-application.xml is regularly extended with something like:
    <library path="/opt/oc4j/toplink/jlib/toplink-essentials.jar"/>
    And this solved the problem. Can you explain this?
    3. Now, with 10.1.3.3.0 this did not help much either. Although the toplink-essentials.jar was found, another nasty exception happened in the server still during deployment:
    Caused by: java.lang.NoSuchMethodException: oracle.toplink.essentials.platform.server.oc4j.Oc4jPlatform.<init>(oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl)
    at java.lang.Class.getConstructor0(Class.java:2678)
    at java.lang.Class.getConstructor(Class.java:1629)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:309)
    Apparently a class in toplink-essentials.jar (version 2, build 41, i.e. the one that comes with oc4j) cannot properly invoke a the constructor of another class IN THE SAME JAR.
    I checked everything, even unzipped and checked the class signatures, and also made sure that there is no other toplink-essentials.jar in the classpath. Still the error remained.
    FInally, I tried to add the above libary tag to $OC4J_HOME/config/apllication.xml instead of the applications local orion-application.xml, and - voila!!! - it WORKS now!
    Can you explain all this to me? From the documentation the location of the <library> tag in the descriptor files should not amke any difference, but still it seems to do.
    Regards: Arpad Bakay

    Seems to be a bug. That was the response from Oracle support (Metalink)
    Response:
    Your issue seems to be related to bug 5594702 - Abstract: EJB30 ENTITY BEAN WITH @ID AND @COLUMN ANNOTATION FAILS TO DEPLOY ON AIX.
    There is an issue with the IBM JDK/JRE 1.5's processing of annotations.
    Links:
    http://www.theserverside.com/discussions/thread.tss?thread_id=37764
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=367&thread=112543&cat=10
    When processing annotations it returns boolean values as false.
    Work-around:
    Fully specify the @Column annotation's boolean values. If insertable and updatable are set to false (which will happen due to this bug) then TopLink sets the PK
    mapping to read-only and the exception seen is expected.
    Note: nullable attribute of the @Colmun is not used in the EJB3/JPA preview of 10.1.3.0 If the customer MUST override the default column name then they should use:
    @Column(name="column-name", insertable=true, updatable=true)
    If they do not wish to override the default column name then simply do not use an @Column annotation.
    It can be deleted or commented out in the JDev generated code.
    There are two reported annotation processing issues with the AIX JVM. One was fixed in SR1 and the other is fixed
    in SR3 (due out Oc 11 - today). Upgrading to these more recent JVM releases may also address this issue.
    RECOMMENDED SOLUTIONS:
    1. Upgrade the IBM AIX JVM to SR3.
    OR
    2. Fix all generated @Column annotations as described above

  • Useing toplink jpa in jdev11 and mysql4,but meet the DatabaseException

    Hello everyone,I'm useing toplink jpa in jdev11 and mysql4.I create a class from database success.Then I use "Java Service Facade" to create a class called JavaServiceFacade sucess.Then I add some code:
    System.out.println(javaServiceFacade.queryCnationalityFindAll().size())
    in main
    then I run the program,but I got this error:
    xception in thread "main" Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
    Error Code: 0
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:290)
         at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:87)
         at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
         at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:218)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:227)
         at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:294)
         at oracle.toplink.essentials.threetier.ConnectionPool.buildConnection(ConnectionPool.java:102)
         at oracle.toplink.essentials.threetier.ConnectionPool.startUp(ConnectionPool.java:324)
         at oracle.toplink.essentials.threetier.ServerSession.connect(ServerSession.java:443)
         at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:571)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:208)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:212)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:111)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:105)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
         at project6.JavaServiceFacade.getEntityManager(JavaServiceFacade.java:23)
         at project6.JavaServiceFacade.queryCnationalityFindAll(JavaServiceFacade.java:72)
         at project6.JavaServiceFacade.main(JavaServiceFacade.java:18)
    Caused by: java.sql.SQLException: [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3074)
         at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
         at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:85)
         ... 17 more
    there's some chinese you may not know,that means there's something wrong with
    Microsoft odbc.I'm puzzle of that:I'm useing java+mysql,why there's wrong with odbc???
    thank you very much
    (maybe it's jdev11 technical preview edition so it can't work?)

    HI
    can you reply the feedback of metalink? because I'm having similar problem.
    I debug in junit and embebbed at the jdev and it works well, but when I deploy in a standalone oc4j it gives me the same error of Excepção de E/S: The Network Adapter could not establish the connection
    And I'm not using 11g, I'm still in 10g but the problem might be the same.
    cumps
    DnlCY
    null

  • Error with hsqldb toplink configuration in oc4j

    Hi,
    I am trying to user hsqldb with toplink with oc4j.
    My independant jpa aplication is working fine.
    But when i try to run that application using oc4j that it is giving "No suitable driver found" error.
    I have put the toplink's jar and hsqldb.jar into my lib directory.
    Application is compiling fine. But on runtime it is giving No suitable driver found.
    Anybody has tried to configure hsqldb with toplink in oc4j?
    Can anybody provide any help?
    - Kumar

    Are you having JPA connect directly to JDBC, or are you using a DataSource?
    Using a DataSource in OC4J should work and is probably the best way to configure your connection. Either way ensure that your JDBC driver is on the OC4J or your application classpath.
    The issue is most likely that TopLink cannot see the JDBC driver on its classpath. You could most likely use a SessionCustomizer to call useDirectDriverConnect(driver, url, url) to workaround the issue.

  • Application running in OC4J (10.1.3.4)Getting issue in OC4J (10.1.3.5) Ver.

    Hi,
    Below log issue appearing while deploying same application running in OC4J (10.1.3.4 Getting issue in with OC4J (10.1.3.5) .
    Tried importing relevant jar files into our application library
    backport-util-concurrent-3.1.jar
    com.springsource.edu.emory.mathcs.backport-sources-2.2.0.jar
    clover-2.4.2.jar
    js-14.jar
    Still issue is not resolved, Any one please advice, We are using Spring, Struts 1.2 and Hibernate 3.0 in this applicaiton.
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@07:49:28 DEBUG (ClassUtils.java:164) - Class [edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap] or one of its dependencies is not present: oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap
    Dependent class: org.springframework.util.ClassUtils
    Loader: fzgpdtp.web.fzgpdtp:0.0.0
    Code-Source: /u01/app/oracle/product/oas/1013/j2ee/FZGPExternal/applications/fzgpdtp/fzgpdtp/WEB-INF/lib/spring-2.5.2.jar
    Configuration: WEB-INF/lib/ directory in /u01/app/oracle/product/oas/1013/j2ee/FZGPExternal/applications/fzgpdtp/fzgpdtp/WEB-INF/lib
    This load was initiated at fzgpdtp.web.fzgpdtp:0.0.0 using the loadClass() method.
    The missing class is not available from any code-source or loader in the system.
    02-14@07:49:28 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@07:49:28 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]18d085a: display name [Root WebApplicationContext]; startup date [Tue Feb 14 07:49:28 GST 2012]; root of context hierarchy
    02-14@07:49:28 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]
    02-14@07:49:29 ERROR (ContextLoader.java:214) - Context initialization failed
    java.lang.NullPointerException: name
    at java.util.zip.ZipFile.getEntry(ZipFile.java:247)
    at java.util.jar.JarFile.getEntry(JarFile.java:204)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:187)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:213)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1113)
    at java.lang.ClassLoader.getResource(ClassLoader.java:974)
    at oracle.classloader.PolicyClassLoader.findJREResource(PolicyClassLoader.java:1233)
    at oracle.classloader.JVMSearchPolicy.findResource(JVMSearchPolicy.java:36)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.getResource(PolicyClassLoader.java:1763)
    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:139)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:322)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1279)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1833)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:304)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:120)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:92)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:825)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:276)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@08:17:17 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@08:17:17 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]f20d33: display name [Root WebApplicationContext]; startup date [Tue Feb 14 08:17:17 GST 2012]; root of context hierarchy
    02-14@08:17:18 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]
    02-14@08:17:18 ERROR (ContextLoader.java:214) - Context initialization failed
    java.lang.NullPointerException: name
    at java.util.zip.ZipFile.getEntry(ZipFile.java:247)
    at java.util.jar.JarFile.getEntry(JarFile.java:204)
    at java.util.jar.JarFile.getJarEntry(JarFile.java:187)
    at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:213)
    at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1113)
    at java.lang.ClassLoader.getResource(ClassLoader.java:974)
    at oracle.classloader.PolicyClassLoader.findJREResource(PolicyClassLoader.java:1233)
    at oracle.classloader.JVMSearchPolicy.findResource(JVMSearchPolicy.java:36)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.askParentForResource(PolicyClassLoader.java:1405)
    at oracle.classloader.SearchPolicy$AskParent.findResource(SearchPolicy.java:78)
    at oracle.classloader.SearchSequence.findResource(SearchSequence.java:142)
    at oracle.classloader.PolicyClassLoader.getResourceUsingPolicy(PolicyClassLoader.java:1490)
    at oracle.classloader.PolicyClassLoader.getResource(PolicyClassLoader.java:1763)
    at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
    at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:139)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:322)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:296)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:353)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1279)
    at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:848)
    at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:435)
    at com.evermind.server.Application.getHttpApplication(Application.java:592)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:2280)
    at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:2199)
    at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1833)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:304)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:120)
    at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:92)
    at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:825)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:276)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
    at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    02-14@08:26:01 INFO (ContextLoader.java:188) - Root WebApplicationContext: initialization started
    02-14@08:26:02 INFO (AbstractApplicationContext.java:412) - Refreshing [email protected]125560f: display name [Root WebApplicationContext]; startup date [Tue Feb 14 08:26:02 GST 2012]; root of context hierarchy
    02-14@08:26:02 INFO (XmlBeanDefinitionReader.java:309) - Loading XML bean definitions from class path resource [../config/services-applicationContext.xml]

    Hi there,
    Check for jars you are importing with JVM. The version of jre and its compatibility with imported jars.
    Hope it helps !
    Reg,
    MS

  • Couldn't persist OneToMany JoinColumn/JoinTable (Unidir) using TopLink JPA

    Hi All,
    I am having a lot of difficulty deploying a OneToMany Unidirectional (Zipcode) record which consist of multiple Zipnames using TopLink on Glassfish v2r2, JDK1.6.0_06, MySQL 5.0, Netbeans 6.1 and Windows XP platform.
    Below are the relevant EJBs snippets:
    Zipcode class
    @Entity
    @Table(name="ZIPCODE")
    public class Zipcode implements Serializable {
    @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
    @JoinColumn(name="ZIPCODE_ID")    
                 or
        @JoinTable(name="ZIPCODE_ZIPNAME",          
                   joinColumns={@JoinColumn(name="ZIPCODE_ID")},
                   inverseJoinColumns={@JoinColumn(name="ZIPNAME_ID")})
        private Collection<Zipname> zipnames = new ArrayList<Zipname>();
        public Collection<Zipname> getNames()
         return zipnames;
        public void setZipnames(Collection<Zipname> zipnames)
         this.zipnames = zipnames;
    Zipname class does not maintain relationship back to Zipcode.
    public class ZipcodeApplicationClient {
    @PersistenceContext(unitName="GeographicalDB-PU")
    private static EntityManager manager;
        public ZipcodeApplicationClient() {
        public static void main(String[] args) {
            try {
                Zipcode zipcode_1 = new Zipcode();
                zipcode_1.setcode(9001);
                Zipname zipname_1 = new Zipname();
                zipname_1.setName("Harbour Cove");
                zipcode_1.getNames().add(zipname_1);
                // Can add one Zipname record with JoinTable but not JoinColumn
                Zipname zipname_2 = new Zipname();
                zipname_2.setName("Wonderland");
                zipcode_1.getNames().add(zipname_2);
                manager.persist(zipcode_1);   // line 45
    The same deployment error message below was generated from both JoinColumn and JoinTable methods:
    run-deploy:
    run-display-browser:
    run-ac:
    Copying 1 file to C:\Documents and Settings\Jack\GeographicalBean\dist
    Caught an unexpected exception!
    java.lang.NullPointerException
            at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:45)
            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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    run-InvestmentBean-app-client:The JoinColumn method would not work for one Zipname record. On the other hand, JoinTable approach would allow us to add a single Zipname record without error out.
    Q1. Can you confirm whether TopLink JPA 1.0 (Glassfish v2r2) support OneToMany JoinColumn Unidirectional at all?
    Q2. Does TopLink JPA 1.0 (Glassfish v2r2) support OneToMany JoinTable Unidirectional? If so, what is the cause of this issue? Otherwise, please make appropriate recommendation steps to take.
    This question has been posted on http://forums.sun.com/thread.jspa?threadID=5330670&tstart=0 and http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=78&t=004489&p=1 earlier in the hope a quicker response.
    Your guidance would be very much appreciated.
    Many thanks,
    Jack

    Hi,
    Below are some more error output from the OneToMany JoinTable Unidirectional approach:
    pre-run-deploy:
    Initial deploying InvestmentBean to C:\Documents and Settings\abc\InvestmentBean\dist\gfdeploy
    Completed initial distribution of InvestmentBean
    Start registering the project's server resources
    Finished registering server resources
    moduleID=InvestmentBean
    deployment started : 0%
    deployment finished : 100%
    Deploying application in domain completed successfully
    Trying to create reference for application in target server completed successfully
    Trying to start application in target server completed successfully
    WARNING:
    JDO76614: Deployment encountered SQL Exceptions:
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPCODE (ID INTEGER NOT NULL, DIALING_CODE VARCHAR(255), TIME_ZONE VARCHAR(255), CODE INTEGER, NEAREST_AIRPORT VARCHAR(255), LONGITUDE VARCHAR(255), NEAREST_TRAIN_STATION VARCHAR(255), NEAREST_URBAN_CENTRE VARCHAR(255), HOTELS VARCHAR(255), LATITUDE VARCHAR(255), NEARBY_FEATURES VARCHAR(255), COUNCIL VARCHAR(255), LOCALITY VARCHAR(255), PRIMARY KEY (ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipcode' already exists
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPCODE_ZIPNAME (ZIPCODE_ID INTEGER NOT NULL, ZIPNAME_ID INTEGER NOT NULL, PRIMARY KEY (ZIPCODE_ID, ZIPNAME_ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipcode_zipname' already exists
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPNAME (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipname' already exists
    JDO76609: Got SQLException executing statement "ALTER TABLE ZIPCODE_ZIPNAME ADD CONSTRAINT FK_ZIPCODE_ZIPNAME_ZIPCODE_ID FOREIGN KEY (ZIPCODE_ID) REFERENCES ZIPCODE (ID)": java.sql.SQLException: Can't create table '.\geographicaldb\#sql-434_4.frm' (errno: 121)
    JDO76609: Got SQLException executing statement "ALTER TABLE ZIPCODE_ZIPNAME ADD CONSTRAINT FK_ZIPCODE_ZIPNAME_ZIPNAME_ID FOREIGN KEY (ZIPNAME_ID) REFERENCES ZIPNAME (ID)": java.sql.SQLException: Can't create table '.\geographicaldb\#sql-434_4.frm' (errno: 121)Enable of InvestmentBean in target server completed successfully
    Enable of application in all targets completed successfully
    All operations completed successfully
    post-run-deploy:
    run-deploy:
    run-display-browser:
    run-ac:
    Copying 1 file to C:\Documents and Settings\Jack\GeographicalBean\dist
    Caught an unexpected exception!
    java.lang.NullPointerException
    at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:45)
    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 com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
    at com.sun.enterprise.appclient.Main.main(Main.java:200)
    run-GeographicalBean-app-client:
    run:
    I would like to correct an earleir comment where I stated that this method did work when adding a single Zipname record. This is no true.
    Thanks,
    Jack

  • TopLink and 9iAS/OC4J 9.0.2

    We are working on project that have
    to work with 9iAS/OC4J 9.0.2, upgrade
    to OC4J 9.0.3 in NOT an option.
    Our J2EE application will only use
    Servlets/JSP (NO EJBs), we need
    to do O/R mapping from Servlets to db.
    How can we install / use TopLink (9.0.3
    or earlier version) from 9iAS/OC4J 9.0.2 ?
    Regards, Radomir.

    Hi Radomir,
    This shouldn't be a problem, the easiest way to set things up would be to place the TopLink.jar file in the \j2ee\home\lib folder of OC4J v9.0.2. If there is something specific that you would like answered in terms of application deployment or setup and configurations, just ask.
    Darren Melanson

  • Problem using Toplink with JUnit

    Hi,
    I have a problem using Toplink with JUnit. Method under test is very simple: it use a static EntityManager object to open a transaction and persists data to db. When I invoke the method from a test method, it gives me the exception:
    java.lang.AssertionError
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.computePURootURL(PersistenceUnitProcessor.java:248)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:232)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:216)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:239)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:278)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:81)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:119)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
         at it.valerio.electromanager.model.EntityFacade.<clinit>(EntityFacade.java:12)
         at it.valerio.electromanager.business.ClienteBiz.insertIntoDatabase(ClienteBiz.java:36)
         at it.valerio.electromanager.test.model.ClienteTest.insertDBTest(ClienteTest.java:30)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
         at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
         at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
         at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
         at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
         at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
         at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
         at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Where is the problem???
    Regards,
    Valerio

    EntityFacade class is very simple and it uses a static EntityManager object. Here the code:
    public class EntityFacade {
         private static EntityManager em = Persistence.createEntityManagerFactory("ElectroManager").createEntityManager();
         private static Logger logger=Logger.getLogger(EntityFacade.class);
         public static void insertCliente(Cliente c)
              logger.debug("Inserisco cliente nel db: " + c);
              em.getTransaction().begin();
              c.setId(getNextIdForTable("Cliente"));
              em.persist(c);
              em.getTransaction().commit();
    If I call the method from inside a main it works well, so I think the problem is not the classpath neither the URL in the persistence.xml. However the URL is:
    <property name="toplink.jdbc.url" value="jdbc:derby:c:/programmi/ElectroManager/db/electroManager"/>
    I use the latest build version of TopLink.
    Thanks.

  • Using TopLink with SCM

    Hi!
    I was working with my .mw file with OSCM source control instead of appear this error:
    "An unexpected error has occurred.We are sorry for the inconvenience.
    Messagge:
    EXCEPTION DESCRIPTION: File already exists: [C:\Documents and Settings\mpedretti.DSI\Mis documentos\DocumentosToplink\Carpeta nueva\Table\Nueva 2.xml]
    Stack trace:
    Throwable Class Name:
    oracle.toplink.xml.XMLDataStoreException
    Message:
    EXCEPTION DESCRIPTION: File already exists: [C:\Documents and Settings\mpedretti.DSI\Mis documentos\DocumentosToplink\Carpeta nueva\Table\Nueva 2.xml]
    Stack trace:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-13005] (TopLink - 9.0.3 (Build 423)): oracle.toplink.xml.XMLDataStoreException
    EXCEPTION DESCRIPTION: File already exists: [C:\Documents and Settings\mpedretti.DSI\Mis documentos\DocumentosToplink\Carpeta nueva\Table\Nueva 2.xml]
         at oracle.toplink.xml.XMLDataStoreException.fileAlreadyExists(Unknown Source)
         at oracle.toplink.xml.XMLFileStreamPolicy.getWriteStream(Unknown Source)
         at oracle.toplink.xml.XMLFileStreamPolicy.getNewWriteStream(Unknown Source)
         at oracle.toplink.xml.XMLFileAccessor.getNewWriteStream(Unknown Source)
         at oracle.toplink.xml.XMLAccessorStreamPolicy.getNewWriteStream(Unknown Source)
         at oracle.toplink.xml.XMLInsertCall.getWriteStream(Unknown Source)
         at oracle.toplink.xml.XMLWriteCall.execute(Unknown Source)
         at oracle.toplink.sdk.SDKAccessor.executeCall(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
         at oracle.toplink.sdk.SDKQueryMechanism.executeCall(Unknown Source)
         at oracle.toplink.sdk.SDKQueryMechanism.executeNoSelectCalls(Unknown Source)
         at oracle.toplink.sdk.SDKQueryMechanism.insertObject(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown Source)
         at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(Unknown Source)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown Source)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWrite(Unknown Source)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.commitAndResume(Unknown Source)
         at oracle.toplink.workbench.ui.BldrSession.saveProject(Unknown Source)
         at oracle.toplink.workbench.ui.BldrMainView.saveProject(Unknown Source)
         at oracle.toplink.workbench.ui.BldrMainView.saveSelectedProjects(Unknown Source)
         at oracle.toplink.workbench.ui.BldrActionManager$104.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    This happen when I tried to save the project. Any suggestion??
    What are the best practices to apply SCM using Toplink?
    Thanks!!
    Matias

    Whenever this happens you should be able to do a "file>save as" and save the project in a new directory -- at least you won't be loosing your work.
    Basically I think the problem is either that somehow you corrupted the project with checkin/checkout process, or you did not check out a file that the Mapping Workbench is trying to update when you save the project.
    10g Mapping Workbench, I have heard, is going to have more intelligence in the area and note ahead of time which files need to be checked out when you save your project. I think a developer preview will be available any day now, keep your eyes peeled to the OTN webpage for TopLink.
    The mapping workbench reference guide has a couple pages that talk about how to use it with SCM systems. In TopLink 903 these docs are shipped with TopLink. See page 1-11 for more info.

  • Calling an Oracle stored procedure using Toplink API - Please help

    Hi,
    We are evaluating Toplink as a possible data access layer in large service-oriented application. The ability to call db stored procedures from within business object layer is crucial for our architechture.
    I am trying to follow toplink application developer's guide examples on how to call stored procedures using toplink.
    I have the folling java code:
    call.setProcedureName("PR_ROMAN_TEST");
    call.addNamedArgument("IN_PARAM");
    call.addNamedOutputArgument("OUT_PARAM");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("IN_PARAM");
    Vector params = new Vector();
    params.addElement(new Integer(5));
    Number result = (Number) session.executeQuery(query, params);
    This generates the following SQL statement:
    BEGIN PR_ROMAN_TEST(IN_PARAM=>5, OUT_PARAM=>?); END;
    An attempt to execute it causes a
    java.sql.SQLException: Invalid column index.
    As I understand it, this exception is thrown because of the "?" in place of the out-parameter value holder.
    The SQL statement that I would want toplink to generate and execute should look like:
    DECLARE result number; BEGIN PR_ROMAN_TEST(IN_PARAM=>5, OUT_PARAM=>result); END;
    , but how do I achieve it and how do I capture the return value, all using toplink api?
    Please help
    Thank you in advance,
    Roman

    I read the conversation above. I am running into a similar kind of problem. I get the following error.
    <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Error Code: 6550Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 38: PLS-00103: Encountered the symbol "NAME" when expecting one of the following:. ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like as between from using || The symbol "." was substituted for "NAME" to continue.ORA-06550: line 1, column 55: PLS-00103: Encountered the symbol "ID" when expecting one of the following:. ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 38:PLS-00103: Encountered the symbol "NAME" when expecting one of the following . ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like as between from using || The symbol "." was substituted for "NAME" to continue.ORA-06550: line 1, column 55:PLS-00103: Encountered the symbol "ID" when expecting one of the following: . ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Error Code: 6550 at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:227)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:733)
    at oracle.toplink.internal.databaseaccess.DatabasePlatform.executeStoredProcedureCall(DatabasePlatform.java:1605)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:649)
    at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:506)at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelect(CallQueryMechanism.java:175)
    at oracle.toplink.queryframework.DirectReadQuery.executeNonCursor(DirectReadQuery.java:65)
    at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:73)
    at oracle.toplink.queryframework.ValueReadQuery.execute(ValueReadQuery.java:59)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java:629)
    at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:392)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2246)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1055)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate$2.readFromSession(TopLinkTemplate.java:181)
    at com.eplinc.common.persistence.toplink.SessionReadCallback.doInTopLink(SessionReadCallback.java:59)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.execute(TopLinkTemplate.java:110)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:178)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:172)
    at com.epl.outletteller.dao.toplink.TopLinkOIDGeneratorDAO.generateId(TopLinkOIDGeneratorDAO.java:45)
    The call I am making is as follows :
    public long generateId(String name, long outletId) throws DataAccessException {
    TopLinkTemplate tlTemplate = new TopLinkTemplate();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("AUTONUM.GET_NEXT_VALUE");
    call.addNamedArgument("autonum name");
    call.addNamedArgument("outlet id");
    call.addNamedOutputArgument("OUTPUT_1");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("autonum name");
    query.addArgument("outlet id");
    Object[] parameters = new Object[2];
    parameters[0] = name;
    parameters[1] = Long.toString(outletId);
    Number uniqueNumber = (Number)tlTemplate.executeQuery(query,parameters);
    return uniqueNumber.longValue();
    This is my Table AUTONUM_SETTING
    AUTONUM_NAME AUTONUM_TYPE START_VAL END_VAL INCREMENT_VALUE
    TRAN_NUM GLOBAL 1 999999 1
    TRACE_NUM OUTLET 1 999999 1
    Any help would be appreciated. Thanks

  • Persistenance for Java Objects Using Toplink

    Hi All Happy New Year
    I am trying the a tutorial in Jdeveloper 10.1.3.0.4 called
    Provide Persistenance for Java Objects Using Toplink.
    I have followed the instructions and get the following error.
    com.evermind.reflect.UndeclaredExceptionTypeException: oracle.oc4j.rmi.OracleRemoteException
         at __Proxy1.persistEntity(Unknown Source)
         at acme.ejb.session.EmpSessionClient.main(EmpSessionClient.java:29)
    oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.lang.NoSuchMethodException: acme.ejb.session.EmpSession.persistEntity(java.lang.Object)
    The release notes mention TopLink POJO's Must Implement java.io.Serializable When Returned From a Session Bean's Remote Interface (4902787) When creating a session bean facade for TopLink POJO objects, you must implement java.io.Serializable for each of the TopLink POJO objects returned from the SessionBean facade through a remote interface. This is typically required when using ADF Swing, a EJB Sample Client, or when your EJB Session Bean resides on a separate application server from the client. You can also tell you you need to implement java.io.Serializable when you get the following exception:
    com.evermind.reflect.UndeclaredExceptionTypeException:
    /oracle.oc4j.rmi.OracleRemoteException/
    at __Proxy1.[Your Class Name Here] (Unknown Source)
    The workaround is to manually edit each POJO object to implement java.io.Serializable.
    I have only one POJO which is declared as follows:
    public class EmpInfo implements Serializable {
    Can anybody help me understand what I need to do to get it to work?
    Many Thanks in Advance

    Hi,
    can you send me your test scenario/project at anuj dot k dot jain at oracle dot com. I tried reproducing this but was unable to do so.
    Thanks,
    anuj dot k dot jain at oracle dot com

  • Problem using TopLink Grid on WebLogic

    I encountered an error using TopLink Grid with WebLogic.
    I have a servlet that persists an object through TopLink Grid, and then try to retrieve an object. It has the following setup:
    JPA 2.0
    TopLink 11.1.1.4.0
    Coherence 3.6.0.4 (bundled with WebLogic)
    WebLogic Server 10.3.4
    Cache config: Grid Entity
    Method of obtaining EntityManager: Injection of @PersistenceContext
    Transaction Management: JTA
    I put coherence-cache-config.xml and tangosol-coherence-override.xml in /APP-INF/classes in my EAR file.
    I did not use active-cache.jar in my servlet. After the WebLogic server is started, the Coherence cache client is to be launched when the persist operation is called.
    However, found that the insertion fails with error. Only when em.find() is called could the Coherence cache client be launched properly. I find it very strange because toplink grid complains about missing coherence-cache-config.xml when it tries to insert, but is perfectly ok when it tries to do an em.find().
    Has anybody encountered the same issue before?
    The log is: (the lines starting with #### are output by the servlet)
    #### Inserting new dept
    <Mar 7, 2011 10:17:43 AM CST> <Notice> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:43.816--EclipseLink, version: Eclipse Persistence Services - 2.1.2.v20101206-r8635>
    <Mar 7, 2011 10:17:43 AM CST> <Notice> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:43.82--Server: 10.3.4.0>
    <Mar 7, 2011 10:17:44 AM CST> <Notice> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:44.261--file:/C:/Oracle/Middleware_1034/user_projects/domains/base_domain/servers/ManagedServer01/tmp/_WL_user/TopLinkGridApp/6df6x4/APP-INF/lib/TopLinkGridJPA.jar_GridLinkJPA login successful>
    2011-03-07 10:17:45.113/50.199 Oracle Coherence 3.6.0.0 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from "zip:C:/Oracle/Middleware_1034/user_projects/domains/base_domain/servers/ManagedServer01/tmp/_WL_user/TopLinkGridApp/6df6x4/APP-INF/lib/coherence.jar!/tangosol-coherence.xml"
    2011-03-07 10:17:45.132/50.217 Oracle Coherence 3.6.0.0 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from "zip:C:/Oracle/Middleware_1034/user_projects/domains/base_domain/servers/ManagedServer01/tmp/_WL_user/TopLinkGridApp/6df6x4/APP-INF/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2011-03-07 10:17:45.141/50.226 Oracle Coherence 3.6.0.0 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from "file:/C:/Oracle/Middleware_1034/user_projects/domains/base_domain/servers/ManagedServer01/tmp/_WL_user/TopLinkGridApp/6df6x4/APP-INF/classes/tangosol-coherence-override.xml"
    2011-03-07 10:17:45.148/50.233 Oracle Coherence 3.6.0.0 <D5> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.6.0.0 Build 17229
    Grid Edition: Development mode
    Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
    <Mar 7, 2011 10:17:45 AM CST> <Warning> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:45.491--Exception [EclipseLink-38] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): oracle.eclipselink.coherence.exceptions.IntegrationException
    Exception Description: Unable to connect to Coherence Cache by name: Dept.
    Internal Exception: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
    Descriptor: RelationalDescriptor(test.gridlink.Dept --> [DatabaseTable(DEPT)])>
    <Mar 7, 2011 10:17:45 AM CST> <Warning> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:45.502--Exception [EclipseLink-38] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): oracle.eclipselink.coherence.exceptions.IntegrationException
    Exception Description: Unable to connect to Coherence Cache by name: Dept.
    Internal Exception: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
    Descriptor: RelationalDescriptor(test.gridlink.Dept --> [DatabaseTable(DEPT)])>
    <Mar 7, 2011 10:17:45 AM CST> <Warning> <EclipseLink> <BEA-2005000> <2011-03-07 10:17:45.584--Exception [EclipseLink-23011] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.TransactionException
    Exception Description: Error trying to format exception message: UnitOfWork [{0}] was rendered inactive before associated externally managed transaction was complete. The arguments are: [Exception [EclipseLink-4022] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Accessor or its connection has been set to null. This can occur if the ClientSession or UnitOfWork was released in a seperate thread, for instance if a Timeout occurred.]>
    <Mar 7, 2011 10:17:45 AM CST> <Warning> <JTA> <BEA-110401> <Ignoring error in afterCompletion. Object=[email protected]6e18, Exception=Exception [EclipseLink-23011] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.TransactionException
    Exception Description: Error trying to format exception message: UnitOfWork [{0}] was rendered inactive before associated externally managed transaction was complete. The arguments are: [Exception [EclipseLink-4022] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Accessor or its connection has been set to null. This can occur if the ClientSession or UnitOfWork was released in a seperate thread, for instance if a Timeout occurred.]
    Exception [EclipseLink-23011] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.TransactionException
    Exception Description: Error trying to format exception message: UnitOfWork [{0}] was rendered inactive before associated externally managed transaction was complete. The arguments are: [Exception [EclipseLink-4022] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
    Exception Description: Accessor or its connection has been set to null. This can occur if the ClientSession or UnitOfWork was released in a seperate thread, for instance if a Timeout occurred.]
         at org.eclipse.persistence.exceptions.TransactionException.inactiveUnitOfWork(TransactionException.java:118)
         at org.eclipse.persistence.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:203)
         at org.eclipse.persistence.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:79)
         at weblogic.transaction.internal.ServerSCInfo.doAfterCompletion(ServerSCInfo.java:1048)
         at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(ServerSCInfo.java:1023)
         Truncated. see log file for complete stacktrace
    >
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=[email protected]6e18
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): oracle.eclipselink.coherence.exceptions.IntegrationException
    Exception Description: Unable to connect to Coherence Cache by name: Dept.
    Internal Exception: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
    Descriptor: RelationalDescriptor(test.gridlink.Dept --> [DatabaseTable(DEPT)])
         at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1881)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:345)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:240)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:300)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:294)
         at test.gridlink.servlet.Test.process(Test.java:89)
         at test.gridlink.servlet.Test.doGet(Test.java:52)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: Exception [EclipseLink-38] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): oracle.eclipselink.coherence.exceptions.IntegrationException
    Exception Description: Unable to connect to Coherence Cache by name: Dept.
    Internal Exception: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
    Descriptor: RelationalDescriptor(test.gridlink.Dept --> [DatabaseTable(DEPT)])
         at org.eclipse.persistence.exceptions.DescriptorException.invalidIdentityMap(DescriptorException.java:822)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:362)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:327)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.getIdentityMap(IdentityMapManager.java:902)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.acquireLockNoWait(IdentityMapManager.java:160)
         at org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockNoWait(IdentityMapAccessor.java:101)
         at org.eclipse.persistence.internal.helper.WriteLockManager.attemptToAcquireLock(WriteLockManager.java:412)
         at org.eclipse.persistence.internal.helper.WriteLockManager.acquireRequiredLocks(WriteLockManager.java:284)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1601)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:340)
         at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
         at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:68)
         at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1239)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1214)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:116)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1316)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2132)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:272)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:239)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:299)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:293)
         at test.gridlink.servlet.Test.process(Test.java:89)
         at test.gridlink.servlet.Test.doGet(Test.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
         ... 9 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeConstructor(PrivilegedAccessHelper.java:350)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:357)
         ... 36 more
    Caused by: Exception [EclipseLink-80000] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): oracle.eclipselink.coherence.exceptions.IntegrationException
    Exception Description: Unable to connect to Coherence Cache by name: Dept.
    Internal Exception: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
         at oracle.eclipselink.coherence.exceptions.IntegrationException.unableToFindCoherenceCache(IntegrationException.java:76)
         at oracle.eclipselink.coherence.integrated.cache.CoherenceInterceptor.<init>(CoherenceInterceptor.java:84)
         ... 42 more
    Caused by: (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:419)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(DefaultCacheFactoryBuilder.java:113)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFactoryBuilder.java:173)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getConfigurableCacheFactory(DefaultCacheFactoryBuilder.java:149)
         at oracle.eclipselink.coherence.integrated.internal.cache.Coherence35Adaptor.getNamedCache(Coherence35Adaptor.java:34)
         at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.getNamedCache(CoherenceCacheHelper.java:240)
         at oracle.eclipselink.coherence.integrated.cache.CoherenceInterceptor.<init>(CoherenceInterceptor.java:79)
         ... 42 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:381)
         ... 48 more
    Caused by: (Wrapped: Failed to load cache configuration: coherence-cache-config.xml) java.io.IOException: The cache configuration is missing: "coherence-cache-config.xml", loader=null
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:330)
         at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:281)
         at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:396)
         at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:382)
         at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:148)
         ... 54 more
    Caused by: java.io.IOException: The cache configuration is missing: "coherence-cache-config.xml", loader=null
         at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:316)
         at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:281)
         at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:396)
         at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:382)
         at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:148)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:381)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(DefaultCacheFactoryBuilder.java:113)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFactoryBuilder.java:173)
         at com.tangosol.net.DefaultCacheFactoryBuilder.getConfigurableCacheFactory(DefaultCacheFactoryBuilder.java:149)
         at oracle.eclipselink.coherence.integrated.internal.cache.Coherence35Adaptor.getNamedCache(Coherence35Adaptor.java:34)
         at oracle.eclipselink.coherence.integrated.internal.cache.CoherenceCacheHelper.getNamedCache(CoherenceCacheHelper.java:240)
         at oracle.eclipselink.coherence.integrated.cache.CoherenceInterceptor.<init>(CoherenceInterceptor.java:79)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.invokeConstructor(PrivilegedAccessHelper.java:350)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:357)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.java:327)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.getIdentityMap(IdentityMapManager.java:902)
         at org.eclipse.persistence.internal.identitymaps.IdentityMapManager.acquireLockNoWait(IdentityMapManager.java:160)
         at org.eclipse.persistence.internal.sessions.IdentityMapAccessor.acquireLockNoWait(IdentityMapAccessor.java:101)
         at org.eclipse.persistence.internal.helper.WriteLockManager.attemptToAcquireLock(WriteLockManager.java:412)
         at org.eclipse.persistence.internal.helper.WriteLockManager.acquireRequiredLocks(WriteLockManager.java:285)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1601)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.issueSQLbeforeCompletion(RepeatableWriteUnitOfWork.java:342)
         at org.eclipse.persistence.transaction.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:157)
         at org.eclipse.persistence.transaction.JTASynchronizationListener.beforeCompletion(JTASynchronizationListener.java:69)
         at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1239)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1214)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:116)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1318)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2136)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:272)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:240)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:300)
         at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:294)
         at test.gridlink.servlet.Test.process(Test.java:89)
         at test.gridlink.servlet.Test.doGet(Test.java:52)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         ... 9 more
    #### Finding dept
    2011-03-07 10:17:45.783/50.868 Oracle Coherence GE 3.6.0.0 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded cache configuration from "file:/C:/Oracle/Middleware_1034/user_projects/domains/base_domain/servers/ManagedServer01/tmp/_WL_user/TopLinkGridApp/6df6x4/APP-INF/classes/coherence-cache-config.xml"
    2011-03-07 10:17:46.746/51.831 Oracle Coherence GE 3.6.0.0 <D4> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): TCMP bound to /10.222.60.143:8088 using SystemSocketProvider
    2011-03-07 10:17:48.288/53.373 Oracle Coherence GE 3.6.0.0 <Info> (thread=Cluster, member=n/a): Failed to satisfy the variance: allowed=16, actual=60
    2011-03-07 10:17:48.288/53.373 Oracle Coherence GE 3.6.0.0 <Info> (thread=Cluster, member=n/a): Increasing allowable variance to 21
    2011-03-07 10:17:49.355/54.440 Oracle Coherence GE 3.6.0.0 <Info> (thread=Cluster, member=n/a): This Member(Id=2, Timestamp=2011-03-07 10:17:49.299, Address=10.222.60.143:8088, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:2952, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) joined cluster "CoherenceClusterRock" with senior Member(Id=1, Timestamp=2011-03-07 09:53:59.431, Address=10.222.60.143:8098, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:1204,member:CacheServerRock01, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1)
    2011-03-07 10:17:49.419/54.504 Oracle Coherence GE 3.6.0.0 <D5> (thread=Cluster, member=n/a): Member 1 joined Service Cluster with senior member 1
    2011-03-07 10:17:49.421/54.506 Oracle Coherence GE 3.6.0.0 <D5> (thread=Cluster, member=n/a): Member 1 joined Service Management with senior member 1
    2011-03-07 10:17:49.421/54.506 Oracle Coherence GE 3.6.0.0 <D5> (thread=Cluster, member=n/a): Member 1 joined Service EclipseLinkJPAReadWrite with senior member 1
    2011-03-07 10:17:49.437/54.522 Oracle Coherence GE 3.6.0.0 <Info> (thread=[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Started cluster Name=CoherenceClusterRock
    Group{Address=224.3.6.0, Port=36000, TTL=4}
    MasterMemberSet
    ThisMember=Member(Id=2, Timestamp=2011-03-07 10:17:49.299, Address=10.222.60.143:8088, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:2952, Role=WeblogicServer)
    OldestMember=Member(Id=1, Timestamp=2011-03-07 09:53:59.431, Address=10.222.60.143:8098, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:1204,member:CacheServerRock01, Role=CoherenceServer)
    ActualMemberSet=MemberSet(Size=2, BitSetCount=2
    Member(Id=1, Timestamp=2011-03-07 09:53:59.431, Address=10.222.60.143:8098, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:1204,member:CacheServerRock01, Role=CoherenceServer)
    Member(Id=2, Timestamp=2011-03-07 10:17:49.299, Address=10.222.60.143:8088, MachineId=59535, Location=site:corp.oocl.com,machine:WONGST3-W7-TEST,process:2952, Role=WeblogicServer)
    RecycleMillis=1200000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    TcpRing{Connections=[1]}
    IpMonitor{AddressListSize=0}
    2011-03-07 10:17:49.578/54.664 Oracle Coherence GE 3.6.0.0 <D5> (thread=Invocation:Management, member=2): Service Management joined the cluster with senior service member 1
    2011-03-07 10:17:49.996/55.081 Oracle Coherence GE 3.6.0.0 <D5> (thread=DistributedCache:EclipseLinkJPAReadWrite, member=2): Service EclipseLinkJPAReadWrite joined the cluster with senior service member 1
    #### em: test.gridlink.Dept@bebae9
    #### em: TEST DEPT

    It seems Coherence is unable to load the config files using the application class loader. You could try placing the config files in a location that gives them the same visibility as your PersistenceUnit.

  • Help with useing toplink please..

    Hello
    I am writing J2EE apps that will run on a 10g app server. I thought that toplink was what I should be using to do my model layer. But there are several simple things I can't find out how to do. Things like make a LOV, how do I set a where clause and restrict what the end user is looking at?
    Should I be using the ADF stuff instead? I was under the impression TopLink was the future direction at oracle so thats why I picked it. I have worked all the toplink tutorials I found. I can create mappings and all that. Setting it up isn't the problem, using it once I have it set up thats what I need to figure out. Can anyone point me in the direction of some tutorials or examples on how to use toplink? (especially in j2ee apps).
    Thanks
    troy

    Troy,
    TopLink is a core piece of Oracle's enterprise Java strategy. We are dedicated to standardization of ORM persistence through EJB 3.0 and TopLink is our implementation and the basis of Sun's reference implementation. Additionally, the use of TopLink is not mutually exclusive to using ADF. Within ADF you can use a variety of persistence technologies including TopLink.
    Here is a sample workshop on building applications with TopLink in ADF: http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm
    In order to filter or restrict results coming back from the database you need to make use of queries. TopLink has 5 query options available:
    1. TopLink's Expression API
    2. EJB QL
    3. Custom SQL
    4. Stored Procedures
    5. Query By Example
    Quick Tour overview: http://www.oracle.com/technology/products/ias/toplink/quicktour904/que01_01.htm
    You can develop your queries directly in the API of your application or you can use the mapping editors (JDeveloper or Workbench) to declaratively construct your queries. I would recommend using the mapping editors and the expression framework. This will allow the tools to assist you as your application evolves. When mappings change you will be notified if they break any of your defined queries.
    In the 10.1.3 documentation you can start learning about queries at:
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/DP4/_html/persun005.htm#sthref5432
    Cheers,
    Doug

  • JPA cascading using TopLink

    Hi, I am writing DAOs for one of my workflow applications. I need to write to 2 tables A and B. Table A should have only the current operational data and Table B should have the history (for reporting/metrics info) of Table A. And to build the history, whenever there is an UPDATE event on Table A, I need to capture that as an INSERT in Table B, so that at any point of time I will have a list of events happened in Table B. I am planning to use JPA annotations and cascading features using TopLink for this. I know I can cascade INSERT and DELETE from Table A to Table B. My quiestion is - Is there a way I can cascade the updates in Table A as INSERTs in Table B? Any magic that annotations or JPA or even TopLink can provide? Any help/suggestions/thoughts are highly appreciated. Thanks!

    Hi Doug, I tried implementing this with my own object and data model and also registered the handler in the persistence.xml. I am getting the following error. I am wondering if I need any additional setup to start the listener and make it work, any idea? do you have any sample test case that you had run your application with the handler? Thanks for all your help on this.
    javax.persistence.RollbackException: java.lang.NullPointerException
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:105)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:45)
         at A.B.C.dao.jpa.BaseDao.save(BaseDao.java:215)
         at A.B.C.dao.jpa.BaseDao.save(BaseDao.java:1)
         at A.B.C.dao.jpa.JpaWorkflowTests.testGetTaskReturningSingleTask(JpaWorkflowTests.java:64)
         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:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
         at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.access$001(AbstractAnnotationAwareTransactionalTests.java:47)
         at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.run(AbstractAnnotationAwareTransactionalTests.java:115)
         at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTest(AbstractAnnotationAwareTransactionalTests.java:180)
         at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runTestTimed(AbstractAnnotationAwareTransactionalTests.java:153)
         at org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.runBare(AbstractAnnotationAwareTransactionalTests.java:111)
         at org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:159)
         at org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:239)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: java.lang.NullPointerException
         at A.B.C.model.TaskHistory.<init>(TaskHistory.java:296)
         at A.B.C.audit.TaskAuditingHandler.insertTaskHistory(TaskAuditingHandler.java:32)
         at A.B.C.audit.TaskAuditingHandler.aboutToInsert(TaskAuditingHandler.java:44)
         at oracle.toplink.essentials.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:649)
         at oracle.toplink.essentials.descriptors.DescriptorEventManager.notifyListeners(DescriptorEventManager.java:679)
         at oracle.toplink.essentials.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:198)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:452)
         at oracle.toplink.essentials.queryframework.InsertObjectQuery.executeCommit(InsertObjectQuery.java:74)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedWrite(DatabaseQueryMechanism.java:635)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.performUserDefinedInsert(DatabaseQueryMechanism.java:599)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.insertObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:495)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:130)
         at oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:283)
         at oracle.toplink.essentials.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:67)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:609)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:536)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:123)
         at oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:95)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2219)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:937)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:894)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:254)
         at oracle.toplink.essentials.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:175)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:2638)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1030)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:387)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1112)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:91)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:842)
         at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.commit(EntityTransactionImpl.java:87)
         ... 30 more

  • Using Toplink to generate UPDATE sql statements?

    I have a need to generate a UPDATE sql statement.
    This statement will run at startup and will not effect the cache, as no objects will be loaded prior to this command running.
    I realize that I can execute arbitrary SQL using Session, however, I have the additional requirement that this UPDATE is compatible with the DB it is running on.
    So, I want to use TopLink to generate an UPDATE statment perhaps using the query framework. Is this possible? Is there any way to use TopLink's ability to create SQL before passing this into a Session for execution?

    In the current versions your only option is to provide the UPDATE SQL directly using the executeCall(new SQLCall("UPDATE ...")).
    In 10.1.3 there exists an UpdateAllQuery intended to do such batch update calls. It will additionally invalidate any cached objects if they were to exist.
    Doug

Maybe you are looking for

  • Joint Venture Accounting documents

    Hi Experts, I need Joint Venture Accounting documents for a fresh implimentation. Any help will be well rewarded.. Please send the documents to my id which is visible in my profile Pratiksha

  • Reg Plant Maintenance Module

    There is a smartform developed for my client instead of SAPSCRIPT for program RIPCT00(i.e TCODE - IW32).  In smartform client wants to have 2 fields. 1 - How many Maintenance order created of the eqiupment 2 - Last Maintenance order of selected equip

  • SAPLRRKO Error when running Precalc Process

    The process for one of our precalcs failed with the following error :  "System Error in Program SAPLRRKO and form MEGA_SORT". I reran the Precalc Process and it was successful and it had been running successfully every night - any idea on why this er

  • IWeb Site List

    Here is a site listing many iWeb sites posted on .Mac. I opened all but 20 to their first page. Each loaded quickly. There's a lot of variety. - Fabe http://web.mac.com/athyrio/iWeb/iWeb_Sites/1.html

  • Issues with 'Mute' in Audio Track

    Hi All 1. Using Premiere Pro CC (Fully Up to Date) Was wondering if I could get assistance with what I believe is an issue with the Mute Button in an Audio Track. Firstly my understanding is that, if I use the 'Mute' button either in the Audio Mixer