Remove association refrence using JPA Toplink-essentials

Hey,
I have this model:
@Entity
public class Employee {
@OneToMany(Cascade={CascadeType.PERSIST,CascadeType.MERGE})
private Address address;
@Entity
public class Address{
private String city;
Default Scenario :
If i persist an employee object in the db.So the address object will also persist in the db.if i delete the employee object,address object will not deleted since
Our needs is :
if i delete the employee object , The address data will be not deleted.
Any help?

Not sure I understand, the CascadeType.REMOVE controls if the remove operation is cascaded. Since you have not specified cascade remove a remove will not be cascaded, which seems to be what you want?

Similar Messages

  • Unable to deploy Web App using JPA TopLink Essentials in Tomcat5.5.17

    Hi All,
    I am trying to deploy a Web App ( used Top Link Essentials ) to Tomcat and i am getting the following Error..
    I am strating tomcat using -javaagent:/Path/To/spring-agaent.jar
    Dec 14, 2006 9:52:46 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load oracle.toplink.essentials.internal.weaving.ClassDetails.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:84)
            at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
            at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
            at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.newInstance0(Class.java:321)
            at java.lang.Class.newInstance(Class.java:303)
            at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:396)
            at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1438)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:509)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
            at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks
    Sateesh

    Spring 2.0 provides custom support for TopLink Essentials in Tomcat out-of-the-box. You should follow the instructions here: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-jpa-setup-lcemfb-tomcat
    Essentially, Spring provides a custom class loader for Tomcat and doesn't use an agent.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • JPA / Toplink Essentials / How to set Table Qualifier?

    Hello!
    How can i set a table qualifier for toplink essentials (JPA)?
    Using toplink I can use setTableQualifier("...");
    regards
    Harald.

    If I add orm.xml along to persistence.xml in the META-INF directly, TopLink JPA obviously finds it regarding to its log output:
    Searching for default mapping file in file:/C:/<path_to_webapp>/WEB-INF/classes/
    Found a default mapping file at file:/C:/<path_to_webapp>/WEB-INF/classes/META-INF/orm.xml for root URL file:/C:/<path_to_webapp>/WEB-INF/classes/
    But it seems as the "schema" property I set under persistence-unit-defaults is ignored. The orm.xml file looks like this:
    <persistence-unit-metadata>
         <persistence-unit-defaults>
              <schema>schema_name</schema>     
         </persistence-unit-defaults>
    </persistence-unit-metadata>
    The queries logged by TopLink JPA to not add qualifiy table names with the schema_name configured above!!!
    Any idea?
    Hans

  • JPA Toplink Essentials SDO_GEOMETRY ORDIMAGE

    I need to support Oracle types such as SDO_GEOMETRY and ORDIMAGE. I've read the chapters in the TopLink 10g Developers Guide on Object Relational Mapping but I'm hoping that someone at Oracle has already done this for the more complex multimedia types required to use options such as Spatial and InterMedia.
    My current limited interest is just in the JPA and I'm only using TopLink Essentials as the Entity Manager provider.

    Answering my own question with respect to Spatial I found the following link
    http://java-persistence.blogspot.com/2007/04/oracle-spatial-using-toplink-essentials.html

  • How to handle journal table using JPA+TopLink

    Hi,
    I am using JDev10.1.3.3 with Swing and EJB + JPA + TopLink using Oracle database. Every business table has a journal table. Does TopLink have any journal features or do I have to write my own code to insert data into the journal table.
    Thanks,
    Jim

    Depends what's in your journal table? TopLink does have support for historization (see HistoryPolicy or docs).
    Otherwise you could use TopLink events to insert into the table, or use database triggers.
    -- James : http://www.eclipselink.org

  • How to get the TransactionManager in a stateful EJB (using JPA toplink)

    I use weblogic 10.3
    This is my stateful EJB and I need to get the TransactionManager because I want to suspend my transaction...
    Here it is ok for the UserTransaction ut but I got an error with the TransactionManager
    EJB Code
    //@Stateless(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @Stateful(name = "MyFacadeEJB", mappedName = "MyFacadeEJB")
    @TransactionManagement(TransactionManagementType.BEAN)
    @Remote
    @Local
    public class MyFacadeEJBBean implements MyFacadeEJB, MyFacadeEJBLocal, Serializable {   
    @Resource javax.transaction.UserTransaction ut;
    @Resource javax.transaction.TransactionManager tm;
    Error Message at the deploy EJB
    Unable to deploy EJB: MyFacadeEJB from PocJTA-PEJB-ejb:
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
    weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'test.ejb.MyFacadeEJBBean/tm' declared in the ejb-jar.xml descriptor or annotation has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor or corresponding annotation.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:639)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:247)

    Chpruvos,
    Hi, I ran into a similar issue when specifying WebLogic specific descriptors in ejb-jar.xml and the corresponding weblogic-ejb-jar.xml. I no longer use this approach in our example code - we just use annotations. see: http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Tutorial_Source
    My session bean is stateless - I don't know how much it will help with your statefull bean managed config but here are copies of the ejb.jar configuration xml I used to use. All the resource*ref elements (see the resource-description* element) ended up in the weblogic specific weblogic-ejb-jar.xml descriptor file.
    ejb-jar.xml
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd]" version="3.0"&gt;
    *&lt;enterprise-beans&gt;*
    *&lt;session&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;ejb-class&gt;org.eclipse.persistence.example.unified.business.ApplicationService&lt;/ejb-class&gt;*
    *&lt;session-type&gt;Stateless&lt;/session-type&gt;*
    +&lt;!-- default to CMP Container managed transations not BMP --&gt;+
    +&lt;!-- transaction-type&gt;Bean&lt;/transaction-type--&gt;+
    +&lt;!-- resource-env-ref id="ResourceEnvRef_1080980284303"&gt;+
    +&lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;+
    +&lt;resource-env-ref-type&gt;javax.sql.DataSource&lt;/resource-env-ref-type&gt;+
    +&lt;/resource-env-ref--&gt;+
    +&lt;!-- resource-ref&gt;+
    +&lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;+
    +&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;+
    +&lt;res-auth&gt;Application&lt;/res-auth&gt;+
    +&lt;/resource-ref--&gt;+
    *&lt;/session&gt;*
    *&lt;/enterprise-beans&gt;*
    &lt;/ejb-jar&gt;
    weblogic-ejb-jar.xml
    &lt;?xml version="1.0"?&gt;
    &lt;weblogic-ejb-jar&gt;
    *&lt;weblogic-enterprise-bean&gt;*
    *&lt;ejb-name&gt;ApplicationService&lt;/ejb-name&gt;*
    *&lt;stateless-session-descriptor&gt;*
    *&lt;pool&gt;*
    *&lt;max-beans-in-free-pool&gt;8&lt;/max-beans-in-free-pool&gt;*
    *&lt;initial-beans-in-free-pool&gt;2&lt;/initial-beans-in-free-pool&gt;*
    *&lt;/pool&gt;*
    *&lt;/stateless-session-descriptor&gt;*
    {color:#008000}&lt;resource-description&gt;
    &lt;res-ref-name&gt;localOracle10RemoteDS&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-description&gt;
    &lt;resource-env-description&gt;
    &lt;resource-env-ref-name&gt;localOracle10RemoteDS&lt;/resource-env-ref-name&gt;
    &lt;jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name&gt;
    &lt;/resource-env-description&gt;
    {color}+&lt;!-- jndi-name&gt;localOracle10RemoteDS&lt;/jndi-name--&gt;+
    *&lt;/weblogic-enterprise-bean&gt;*
    &lt;/weblogic-ejb-jar&gt;
    thank you
    /michael
    [http://www.eclipselink.org|http://www.eclipselink.org/]
    Edited by: michael_obrien on Feb 26, 2009 9:56 AM

  • How to call a stored procedure from EJB3/toplink essentials..?

    Hi,
    I want to call a stored procedure residing in the oracle 10 g Database from my application's data access layer, which is designed using EJB3/toplink essentials.
    I think this feature is not available right now in the EJB3 spec...any workaround with code if possible will be very help full...
    Thanks & Regards,
    Sarvesh

    This should help you....
    how to execute a stored procedure from ejb3.0 bean using entity manager

  • Error in JPA Toplink

    Hi,
    I'm using JPA (toplink implementation). When I'm running following named query
    *@NamedQuery(name = "Class.search",*
    query =  "select c "
    + "from Clazz c, Subject sub, School sch "
    + "where sub = c.subject"
    + " and lower(c.name) like :name"
    + " and lower(sub.name) like :subject"
    + " and lower(sch.name) like :school"
    + " and sch = c.school "
    + "order by c.name"
    inside the 11g container, an sqlexception happens. In the exception I can see that the query is translated into following
    SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    As you can see, the prefix on the class table is class in the select part while it is t0 in the rest of the sql.
    If I run this query in my test outside the container (j2se), then it works fine. I'm using preview 4.
    What is the problem.
    BR
    Jakup

    Hi,
    Here is the exception (I have to cut the last part because it is exceding the maximum length):
    2008-10-06 11:28:48 com.evermind.server.ejb.logging.EJBMessages logException
    SEVERE: [TeachingService:public java.util.List fo.samteld.vitanet.services.TeachingServiceBean.searchClasses(java.lang.String,java.lang.String,java.lang.String)] exception occurred during method invocation: javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz); nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz)
    javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz); nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz)
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:447)
         at oracle.toplink.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:583)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2480)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2438)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:467)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:445)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:899)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2697)
         at oracle.toplink.tools.profiler.DMSPerformanceProfiler.profileExecutionOfQuery(DMSPerformanceProfiler.java:693)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1072)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)
         at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:377)
         at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:488)
         at fo.samteld.vitanet.services.TeachingServiceBean.searchClasses(TeachingServiceBean.java:112)
         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 com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:27)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:52)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:182)
         at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:511)
         at oracle.oc4j.security.JaasModeImpl$DoAsPrivilegedExecutor.execute(JaasModeImpl.java:301)
         at oracle.oc4j.security.JaasModeImpl$BasicExecutor.execute(JaasModeImpl.java:161)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:57)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:58)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:104)
         at TeachingService_LocalProxy_5ndopdi.searchClasses(Unknown Source)
         at fo.samteld.vitanet.ui.backing.teaching.ClassSearchBean$CriteriaPane.search(ClassSearchBean.java:95)
         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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1213)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:62)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:174)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:66)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:62)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:174)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:66)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:153)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$GrabEvents.broadcastEvents(LifecycleImpl.java:1109)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:283)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:77)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:111)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:472)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:422)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1089)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:204)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:861)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:945)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1303)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3556)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3608)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1341)
         at oracle_jdbc_driver_OraclePreparedStatementWrapper_Proxy.executeQuery(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:813)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:539)
         ... 99 more
    javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz); nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz)
         at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:96)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:93)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:52)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:182)
         at oracle.oc4j.security.SecurityServices.doAsPrivileged(SecurityServices.java:511)
         at oracle.oc4j.security.JaasModeImpl$DoAsPrivilegedExecutor.execute(JaasModeImpl.java:301)
         at oracle.oc4j.security.JaasModeImpl$BasicExecutor.execute(JaasModeImpl.java:161)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:57)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:58)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:104)
         at TeachingService_LocalProxy_5ndopdi.searchClasses(Unknown Source)
         at fo.samteld.vitanet.ui.backing.teaching.ClassSearchBean$CriteriaPane.search(ClassSearchBean.java:95)
         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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1213)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:62)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:174)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:66)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:62)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:174)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:66)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:153)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$GrabEvents.broadcastEvents(LifecycleImpl.java:1109)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:283)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:178)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adfinternal.view.faces.webapp.rich.SharedLibraryFilter.doFilter(SharedLibraryFilter.java:135)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:69)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at oracle.adfinternal.view.faces.activedata.ADSFilter.doFilter(ADSFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:281)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:241)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:198)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:141)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:334)
         at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:942)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:843)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:658)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:626)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:417)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:163)
         at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.java:275)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:237)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:29)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:877)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 11g Technology Preview 4 (11.1.1.0.0) (Build 080422)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
    Error Code: 904
    Call: SELECT CLASS.ID, CLASS.NAME, CLASS.VERSION_NO, CLASS.CURRICULUM, CLASS.MODIFIED_BY, CLASS.CREATED_BY, CLASS.CREATED_DATE, CLASS.ACTIVE, CLASS.MODIFIED_DATE, CLASS.TEACHING_MATERIAL, CLASS.START_DATE, CLASS.END_DATE, CLASS.SUBJECT_ID, CLASS.SCHOOL_ID FROM CLASS t0, SCHOOL t2, SUBJECT t1 WHERE (((((t1.ID = t0.SUBJECT_ID) AND (LOWER(t0.NAME) LIKE ?)) AND (LOWER(t1.NAME_FO) LIKE ?)) AND (LOWER(t2.NAME) LIKE ?)) AND (t2.ID = t0.SCHOOL_ID)) ORDER BY t0.NAME ASC
         bind => [%, %, %]
    Query: ReadAllQuery(fo.samteld.vitanet.domain.teaching.Clazz)
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:613)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:447)
         at oracle.toplink.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:117)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:250)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:583)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2480)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2438)
         at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:467)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:445)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:899)
         at oracle.toplink.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2697)
         at oracle.toplink.tools.profiler.DMSPerformanceProfiler.profileExecutionOfQuery(DMSPerformanceProfiler.java:693)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1072)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)
         at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:377)
         at oracle.toplink.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:488)
         at fo.samteld.vitanet.services.TeachingServiceBean.searchClasses(TeachingServiceBean.java:112)
         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 com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:27)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:101)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         ... 65 more
    Caused by: java.sql.SQLException: ORA-00904: "CLASS"."SCHOOL_ID": ugyldig identifikator
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:77)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:111)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:472)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:422)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1089)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:204)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:861)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:945)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1303)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3556)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3608)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1341)
         at oracle_jdbc_driver_OraclePreparedStatementWrapper_Proxy.executeQuery(Unknown Source)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:813)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:539)
         ... 99 more
    BR
    Jakup

  • Toplink Essentials JPA doesn't use GenerationType.IDENTITY

    Based on EJB 3 and JPA I want to store some entities (@Entity) in a database. For some of those entites the database auto increments the primary key. In these cases I defined a @TableGenerator and a @GeneratedValue using GenerationType.IDENTITY as strategy in order to get the primary key (@Id) updated after the entity has been persisted.
    Short example:
    @Entity
    @Table(name = "orders")
    public class POrder implements PEntity {
         @TableGenerator(name = "orderIdGenerator", initialValue = 0, allocationSize = 1)
         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "orderIdGenerator")
         @Column(name = "orderNumber", nullable = false)
         private Integer orderNumber;
    ...I am running the application on GlassFish. I added a corresponding JDBC resource to the server configuration, using the specific MySql driver interfaces.
    Persisting entities which doesn't use a TableGenerator works, but as soon as I try to persist an entity which should use a TableGenerator I am running in the following exception:
    beergame.server.exception.BeergameServerException: nested exception is: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b55-fcs (10/10/2008))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'beergame3.sequence' doesn't exist
    Error Code: 1146
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
         bind => [1, roleIdGenerator]
    Query: DataModifyQuery()
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.1 (Build b55-fcs (10/10/2008))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'beergame3.sequence' doesn't exist
    Error Code: 1146
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
         bind => [1, roleIdGenerator]
    Query: DataModifyQuery()
         at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:654)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:703)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:492)
         at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeCall(AbstractSession.java:690)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:257)
         at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:237)
         at oracle.toplink.essentials.queryframework.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:86)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:1845)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
         at oracle.toplink.essentials.sequencing.QuerySequence.update(QuerySequence.java:344)
         at oracle.toplink.essentials.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:283)
         at oracle.toplink.essentials.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:96)
         at oracle.toplink.essentials.sequencing.Sequence.getGeneratedVector(Sequence.java:281)
         at oracle.toplink.essentials.internal.sequencing.SequencingManager$Preallocation_Transaction_NoAccessor_State.getNextValue(SequencingManager.java:420)
         at oracle.toplink.essentials.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:846)
         at oracle.toplink.essentials.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:110)
         at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:240)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.assignSequenceNumber(UnitOfWorkImpl.java:355)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:3266)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:432)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3226)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:221)
         at com.sun.enterprise.util.EntityManagerWrapper.persist(EntityManagerWrapper.java:440)
         at beergame.server.model.trans.impl.TExtensionOfPEntityImpl.persist(TExtensionOfPEntityImpl.java:130)
         at beergame.server.model.trans.impl.TRoleImpl.<init>(TRoleImpl.java:61)
         at beergame.server.logic.trans.impl.GameLogicImpl.assignUserToValueChainLevel(GameLogicImpl.java:81)
         at beergame.server.logic.remote.impl.UserSessionBean.createGame(UserSessionBean.java:65)
    I wonder why a sequence table has to be update whereas IDENTITY is defined as strategy. I tried also AUTO as strategy but it doesn' matter, the result is the same.
    I read several posts in forums, but couldn't find a solution. So I still have no idea how to get IDENTITY used as strategy. Any one of you does?
    My configuration:
    IDE: Eclipse 3.4.0
    Server: GlassFish V2 Java EE 5
    JPA Implementation: Toplink Essentials v2.1-b55
    JPA driver: oracle.toplink.essentials.PersistenceProvider
    Database: MySQL 5.0.51a
    JDBC driver: mysql-connector-java-5.1.5

    I did it. I must admit, I was a little bit confused by the annotation TableGenerator. It is not responsible for generating ids of a table at all but only in conjunction with a table which should provide ids.
    After I removed @TableGenerator and also the corresponding reference within @GeneratedValue the persistence works as expected. Now the code looks like this:
    @Entity
    @Table(name = "orders")
    public class POrder implements PEntity {
         @Id
         @GeneratedValue(strategy = GenerationType.IDENTITY)
         @Column(name = "orderNumber", nullable = false)
         private Integer orderNumber;
    ...Edited by: TomCat78 on Oct 12, 2008 3:38 PM

  • How to use (toplink essentials)JPA with EJB 2.1 spec in oc4j 10.1.3.2

    I have an application that uses EJB 2.1 spec with SLSB (no entity beans) and uses DAO pattern with hibernate2 for persistence. I want to replace hibernate with toplink-essentials (JPA). I cannot upgrade the EJB spec version as we use some thirdparty beans. The application uses DAO pattern so I should be able to hook in a new toplink DAO impl. What I am struggling with is how do I get hold of the EntityManagerFactory in my EJB 2.1 SLSB. Also I need CMT with XA transactions as our application interacts with jms and database using MDBs and SLSBs.
    Prantor

    You should be able to use Persistence.createEntityManagerFactory(<your-persistence-unit-name>, properties), and create your EntityManager from that.
    To have TopLink integrated with JTA, in your persistence.xml (or properties) you need to use a JTA DataSource, and set the ServerPlatform for your JEE server.

  • TopLink Essentials: Using spring session scope on the EntityManagerFactory

    Hi,
    In one of our projects we are trying to utilize the 2nd level cache of TopLink Essentials. The server code is using the Spring (2.0.7) and is deployed to a web container. We are using a Java client and serializes every object between the client and the server.
    When a client is started a lot of "static/common" data is read from the server. The first client started will therefor pay some extra performance cost, but additional clients should hopefully be able to perform better due to the cache. Most of the static data is accessed not using JPQL and should therefor not bypass the cache.
    If we configure the EntityManagerFactory using default Spring scoping (singleton) it seems like we are not able to utilize the cache. We can see from the log files that each time a client is started a lot of SQL is executed towards the database (Oracle).
      <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
          <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
            <property name="showSql" value="false" />
            <property name="generateDdl" value="$repository{toplink.generateDdl}" />
            <property name="database" value="$repository{toplink.database}" />
          </bean>
        </property>
        <property name="jpaProperties">
          <props>
            <prop key="toplink.weaving">static</prop>
            <prop key="toplink.logging.level">FINEST</prop>
          </props>
        </property>
      </bean>When we changes the scoping to spring session the behavior is very different. Then we can see that the first client generates a lot of SQL towards the database and pays a startup cost, while subsequently clients seems to be able to utilize the cache.
      <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" scope="session">
        <aop:scoped-proxy />
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
          <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
            <property name="showSql" value="false" />
            <property name="generateDdl" value="$repository{toplink.generateDdl}" />
            <property name="database" value="$repository{toplink.database}" />
          </bean>
        </property>
        <property name="jpaProperties">
          <props>
            <prop key="toplink.weaving">static</prop>
            <prop key="toplink.logging.level">FINEST</prop>
          </props>
        </property>
      </bean>Having read the documentation of the spring session scope I'm having a hard time explaining this behavior. As I understand it the EntityManagerFactory will be stored in the HTTP session resulting in a new EntityManagerFactory for each session. I cannot understand how this may result in that we are able to utilize the 2nd level cache? What are the relationship between the EntityManagerFactory and the 2nd level cache?
    Is this an accepted way of configuring the EntityManagerFactory or will there be a downside?
    I hope someone are able to explain this behavior for me:-)
    Best regards,
    Rune

    Hi Rune,
    To understand the shared cache behavior you actually need to understand more about what TopLink Essentials does than what Spring does. When a new factory is created, TopLink Essentials actually just proxies the server session with a factory instance, so the same server session is used. This is why you are seeing the same cache used across multiple factories of the same session.
    In the first case, if you are not using JPQL then what are you using to load the data and why are you thinking that it will not bypass the cache?
    Using a factory instance for each session is not what I would recommend doing as there are some additional costs associated with establishing a factory (even though the session already exists). The first way should be the correct way, I am just not sure what the circumstances are that are causing your cache to not be warmed. You may want to post more details about that so people can better help you out with that angle.
    -Mike

  • How to verify OC4J uses Oracle Toplink 10.x and not Toplink Essentials

    Hi,
    We dont want to use the default JPA provider "Toplink *Essentials*" that comes with OC4J. Rather we want to use Oracle Toplink 10.x
    I downloaded [Oracle Toplink 10.x|http://www.oracle.com/technology/software/products/ias/htdocs/1013topsoft.html] and followed the installation instructions:- http://www.oracle.com/technology/products/ias/toplink/doc/10131/install/install.html#CHDBBIFB
    When i deploy my EJB 3.0 appliation and invoke a JPA Entity, i can see the server log:- NOTIFICATION TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    Do i have to do any other configuration/setting to ensure that i use Oracle Toplink and not Toplink Essentials in OC4J?
    Thanks in Advance,
    Prashant Tejura
    Edited by: user1186295 on May 26, 2009 10:33 AM

    rashant,
    Hi, there are currently the following providers to choose from - you may want to consult your rep for any details on moving from 10.1.3.4 to 10.1.3.5.
    1) TopLink or EclipseLink using EclipseLink JPA - the RI for JPA for WebLogic, OC4J and GlassFish
    - EclipseLink JPA is focus of all current JPA development as part of EclipseLink and TopLink
    2) Another open-source JPA implementation like OpenJPA or Hibernate
    Deprecated:
    3) TopLink using TopLink JPA - replaced by (1) TopLink using EclipseLink JPA
    4) TopLink using TopLink Essentials JPA - replaced by (1) TopLink using EclipseLink JPA
    Changes to server.xml as follows:
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Modify_server.xml
    <shared-library name="oracle.persistence" version="1.0" library-compatible="true">
              <code-source path="../../../eclipselink/eclipselink.jar"/>
              <code-source path="../../../eclipselink/javax.persistence_*.jar"/>
              <import-shared-library name="oracle.jdbc"/>
         </shared-library>
    Changes to persistence.xml as follows: (container-managed JTA datasource)
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Persistence.xml
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="example" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/OracleDS</jta-data-source>
    <class>org.eclipse.persistence.example.jpa.server.business.Cell</class>
    <properties>
    <property name="eclipselink.target-server" value="OC4J"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    </properties>
    </persistence-unit>
    </persistence>
    You should see output similar to the following in your server log:
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/OC4J_Web_Tutorial#Console_Output
    [EL Finest]: 2009-02-26 14:04:34.464--ServerSession(8634980)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Begin deploying Persistence Unit example; state Predeployed; factoryCount 1
    [EL Info]: 2009-02-26 14:04:34.542--ServerSession(8634980)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--EclipseLink, version: Eclipse Persistence Services - ***
    [EL Fine]: 2009-02-26 14:04:35.213--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Detected Vendor platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    [EL Config]: 2009-02-26 14:04:35.26--ServerSession(8634980)--Connection(5230779)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--Connected: jdbc:oracle:thin:@//1y.yyy.yy.yy:1521/ORCL
         User: SCOTT
         Database: Oracle Version: Oracle Database 11g Release 11.1.0.0.0 - Production
         Driver: Oracle JDBC driver Version: 10.1.0.5.0
    [EL Finest]: 2009-02-26 14:04:35.385--UnitOfWork(5746770)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--PERSIST operation called on: org.eclipse.persistence.example.jpa.server.business.Cell@9107088( id: null state: null left: null right: null parent: null references: null).
    [EL Fine]: 2009-02-26 14:04:35.807--ClientSession(5748500)--Connection(6653899)--Thread(Thread[HTTPThreadGroup-4,5,HTTPThreadGroup])--INSERT INTO EL_CELL (ID, STATE, TSEQ, RIGHT_ID) VALUES (?, ?, ?, ?)
         bind => [551, null, null, null]
    thank you
    /michael
    www.eclipselink.org

  • Using an Oracle SQL Function from JPA/TopLink

    How do I get the return value from a simple (one string input parameter, returns a string) Oracle SQL Function?
    Thanks!

    If you mean calling a stored function in Oracle, you might try something like:
        ValueReadQuery vrq = new ValueReadQuery();
        SQLCall call = new SQLCall("begin ###res := pkg.funcInp(#inp); end;");
        vrq.setCall(call);
        Query q = em.createNativeQuery("");   // we need a Query; any query would do; we replace its contents below
        ((EJBQuery)q).setDatabaseQuery(vrq);
        q.setParameter("inp", "paramValue");
        String result = (String)q.getSingleResult();
        // #=input; ###=output; ####=input/output;
        // if you want to explicitly specify the type of an output parameter, use #### instead of ###,
        // because pure "output" parameters are always treated as java.lang.StringThis will only work in TopLink Essentials, though. I don't know how to do it in Hibernate. I have dealt mainly with TopLink, and just a little with Hibernate.
    In my opinion, it's a HUGE omission not to have support for stored procedures in JPA. Virtually every project I have worked on (in two large companies) has consisted of a large portion of code in stored procedures (sometimes as much as 50% of the overall code). It's a pain to have to go through all that trouble to call the stored procedures.
    Also, pay special attention to TopLink's shared L2 cache. If a stored procedure changes something in the database, TopLink won't know about it and chances are that you will end up with stale objects in the cache which you will either have to refresh, or you'd have to invalidate TopLink's cache for these objects.
    Best regards,
    Bisser

  • Problem with standalone Toplink Essentials (Spring/JPA)

    I'm using the Glassfish/Toplink JPA implementation in combination with the new JPA code in 2.0M5. Works great when I run my web app from within Maven using the jetty6 maven plugin.
    But, when I deploy my app as a WAR to an application server I get the following exception:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: URI scheme is not "file"
    Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
    at java.io.File.<init>(File.java:338)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistentClassNamesFromURL(PersistenceUnitProcessor.java:556)
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.buildPersistentClassSet(PersistenceUnitProcessor.java:401)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.buildEntityList(EntityManagerSetupImpl.java:159)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:492)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:154)
    at org.springframework.orm.jpa.ContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(ContainerEntityManagerFactoryBean.java:181)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:232)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:901)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:870)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:393)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:256)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:167)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:253)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:332)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:292)
    This happens with both Glassfish and plain Tomcat.
    I don't really understand the problem. It looks like some classpath issue, but it is not clear what Toplink is looking for.
    S.

    Hello,
    Does this work if you set the <exclude-unlisted-classes> tag to true and list your classes in the persistence.xml as described in:
    http://www.oracle.com/technology/products/ias/toplink/jpa/howto/java-se-usage.html
    If it works, the problem might be with searching the persistence context for entities using a non-url classloader.
    Best Regards,
    Chris

  • Crucial question about Toplink Essentials JPA in OC4J 10.1.3.3

    Hi all!
    I'm developing an EJB 3.0 service which will be deployed to an OracleAS 10.1.3.3 and even after I've read lots of docs and articles, I still got an unanswered question:
    I know JPA leaves concurrent data access to the application's responsibility (or the vendor implementation's), that Oracle explicitly recommends using @Version to enable JPA's standard optimistic locking and also that Toplink Essentials JPA is OC4J's default persistence provider for EJB 3.0 modules. Considering this last important fact, what will be the default locking mode assumed by Toplink Essentials if I don't use @Version?
    Looking at Toplink Essentials JPA extensions doc preview for OC4J 11g (http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html), I found that I can use @OptimisticLocking to define the locking policy when defining an entity and use a lock type that doesn't require me to define a @Version field. But that annotation doesn't exist in version 10.1.3.3. Is there another way to define locking policy and type (on global or per entity basis) in version 10.1.3.3?
    Any help will be really welcome!
    TIA,
    Eduardo.

    Quoting Mr. Doug Clarke:
    "Eduardo,
    The only way to ensure that concurrent writers to the database don't overwrite one another is to either lock optimistically or pessimistically (i.e.: SELECT ... FOR UPDATE). Both of these approaches are supported by Oracle TopLink as well as TopLink Essentials. If neither is used then no locking is applied and the last writer will succeed leaving the database in a potentially corrupted state. Also note that minimal writes are used so each thread only updates the columns it changes so the resulting state of the database could be a combination of the two concurrent writes. Users of JPA are strongly recommended to use optimistic locking to ensure concurrent writing scenarios do not produce unexpected result in their database.
    Our JPA implementation in 10.1.3.3 is TopLink Essentials which is the Open Source references implementation of JPA derived from Oracle TopLink developed in GlassFish. This edition of TopLink only has support for JPA's @Version annotation as you noted. This approach does require a dedicated column in the database table for comparison on write to detect changes made since this thread's version of the original data was read.
    In Oracle TopLink 11g we have implemented JPA 1.0 in our product. This means that full capabilities of TopLink are available through JPA along with some custom annotations to assist in configuring them. This includes the additional optimistic locking policies provided for schemas where adding version columns is not possible. These capabilities are not included in TopLink Essentials. Customers can access these capabilities in the 11gR1 technology previews as well as in the new Eclipse Persistence Services Project "EclipseLink" which is the full functionality of Oracle TopLink developed as an open source solution. Oracle TopLink 11g and its distribution of EclipseLink are not yet available in a supported release."

Maybe you are looking for

  • Update Reason of Rejection field in Sales Orders

    Hi all, My scenario is: 1) To Close all the open sales orders with a customized Reason of Rejection (ABGRU) field 2) Only when the Sales Order Created Date is 1 month behind the Current Date. The report program which shall be developed should be run

  • Any way to get .fla frame rate at runtime?

    I would like to query at runtime to see what the frame rate of the .swf is set to. Is there a way to do this? I saw in help that you can access this for Camera, Netstream and Tween, but what about for the .swf itself? Thanks to anyone who can help.

  • Software doesn't seem to work in Bootcamp partition

    I recently created a 32GB Bootcamp partition (FAT 32) and installed Win XP Pro SP2 in it. The Windows installation completed successfully. After this I installed Palm Desktop 4.6.2 to enable me to use my Palm Treo 650 handheld and sync it with the co

  • Repeating frame problem

    Hi, I've Matri with group report which prints 'region' level data in Repeating frame (down). But, for the Last region of the report, the report is prinitng twice the data. I observed this problem when I have more than one 'region' level data and then

  • ORA-06502 PL/SQL: numeric or value error ORA-06512 when calling a procedure

    Hi, I have been using ODP.net for a while now and have been calling lots of procedures without issue, however today I put together one to insert key, value parameters into a simple table and it is failing on me Intermittently with the ORA-06502... I