JPA: Toplink vs Hibernate

I am using netbeans 5.5 and I want to use JPA. I am in favor of hibernate, but why does the netbeans has toplink being the default persistence library of JPA? What are the difference between toplink and hibernate if I'll be using JPA?
By the way, I've seen an article "Using JPA in tomcat" and I would really like to use JPA in tomcat as I think it is much faster and lighter than Glassfish. But the article also uses toplink as the persistence library? Could someone guide me in using hibernate?

This is an video from NetBeans site. Take a look.
It will open your eyes about Hibernate and TopLink and JPA after you checking the codes that will be generated on your own system application.
http://www.netbeans.org/download/flash/netbeans_6_gui_builder/netbeans_6_gui_builder.html

Similar Messages

  • Exception in JPA (NoClassDefFoundError: org/hibernate/AnnotationException)

    Hi,
    I´m having a serious problem when using JPA. I´m using Weblogic Server 10 and developing in Weblogic Workshop Studio. When I start the WLS in Workshop, all works fine, but when I use the "publish" over my WLS Server in Workshop because I change any class in the project (and I need to republish the project to send the changed class to WLS), the following error is reported when I try to use the JPA:
    Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.NoClassDefFoundError: org/hibernate/AnnotationException
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:353)
    at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
    at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
    at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884)
    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
    Why the AnnotationException class is no more found after a publish in a started Weblogic Server ?
    Thanks in advance,
    Sergio Stateri Jr.
    [email protected]

    Sergio,
    there are at least three implementation for JPA available: OpenJPA, TopLink, and Hibernate. The first two are or can easily installed in WLS. If you intend to use Hibernate as the persistence provider you should ensure that all libraries are in the class path of your application.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JPA/TopLink

    Hi Everyone,
    I am using JPA with vendor implementation toplink.
    For some complex queries like
    START WITH EMPLOYEE_ID = 100 CONNECT BY PRIOR EMPLOYEE_ID = MANAGER_ID ORDER SIBLINGS BY LAST_NAME, I am plannign to use TOplink api like ReadAllQuery and ExpressionBuilder.
    As per my understanding, We are using JPA to have Vendor independent api and implementaion will be provided in persistence.xml.
    If i use some toplink api's ,Tomorrow If i want to change the vendor from Toplink to hibernate. I need to change Toplink code to hibernate in my services.
    Is there anyway i can use JPA alone to get all the work done... Thanks in advance for all your suggestions.

    JPQL does not support connect by. If you need to use connect by, you must either use vendor specific functionality, or a native SQL query.
    James : http://www.eclipse.org/eclipselink/

  • TopLink vs Hibernate... revisited... again :)

    Would it be possible to get a Toplink versus Hibernate (or other ORM frameworks) going here?
    It seems like the explosive adoption of Hibernate and the associated popularity contest in the industry has put some of us in a position where we're constantly trying to sell the-right-tool-for-the-right-job which, at least for me, seems to disqualify hibernate a lot of times, esp when scalable persistence is a requirement. It seems to be really difficult to convince folks that the popularity of hibernate doesnt mean it's by default the right option.
    I've seen at least two threads on theserverside.com about hibernate versus cayenne, and despite the amount of noise in the threads, there were a few folks making some decent points. The TopLink folks were very quiet on the threads, but I know they were reading :)
    So, anyone out there have any experience comparing TopLink and Hibernate? What do you all see as the shortcomings of each, esp from a technical architecture standpoint? Are GUI tools as overrated as Gavin claims? Where's annotation support for TopLink? Is TopLink overpriced? Is Hibernate's multi-tier non-integrated caching biting anyone on big projects where persistence needs to scale, or is integrated caching overrated? Is Hibernate3 really going to fix shortcomings that TopLink already addresses in current releases? What do you all think the Hibernate crew is doing right that the TopLink crew is doing wrong and vice versa? I'm not assuming any of these questions even merit answer but just interested in some objective discussion in a forum where TopLink guys might have a stronger voice.
    Take care!

    Well, I've only got a few minutes, but I could go on for hours.
    I'll start by saying that I've been doing ORM for longer than many people knew that you could. I had been a previous TOPLink user but went for about two years without having to do any ORM.
    Then, last year I started a new project for a client who insisted we use SqlServer and was hesitant to pay for any software unless it was absolutely necessary. (This is common these days, as the fact that there is so much free software out there encourages folks to try out the free stuff before paying for something that may or may not be better). Comparing the feature list of Hibernate to TOPLink and doing a little checking seemed to indicate that going with Hibernate would be a perfectly reasonable thing to do.
    I will state, uncategorically, that this was the worst technical decision I have ever made in my life... twenty-plus years of Software Application Developing, most of it with object-oriented languages (Smalltalk and Java).
    NOTE: I must couch that statement with the caveat that part of this was due to my naivete about the architectural assumptions I made about Hibernate before including it in my application. If I would have merely learned about Hibernate's architectural assumptions (though this was not easy due to their poor documentation) and allowed these assumptions to drive my development, it would not have been nearly as painful, just yucky. Also, if my objects were much simpler/flatter and I didn't need caching to speed things up, Hibernate could have worked just fine out of the box. Problem is, I had a complex system, needed caching, and Hibernate gave me nightmares as I tried to navigate through it.
    As a test-first developer, I don't care about the GUI tools, as I'm happy to write tests to verify I can store and retrieve objects, then write the mappings and find out if it passes. What I would like is the ability to allow two threads to read the same object and not have to bring two copies of the object into memory or read the database twice. Call me crazy, but it just seems like object identity is a useful thing... perhaps my twenty years of developing object-oriented software has skewed my reasoning and I need to think like folks who haven't been programming as long.
    Hibernate's poor documentation did make it clear that it did not want me to think this way, but it also suggested that, if I wanted to think this way, it could cache objects for me so it wouldn't hit the database twice. And, I'm sure it could have cached objects in some form, but not the form I wanted. Though I thought I followed the instructions on how to set up my cache, I found that reading the same object twice didn't always get the same (as in "==") object back.
    To try to figure out why not (or why other things that an experienced object-oriented software developer couldn't figure out by reading the documentation), I had to dive into the code. This felt like diving into a water source in hopes of finding some gems, but discovering that I was swimming in a sewer full of, well, stuff that you'd find in a sewer.
    Although Hibernate advertises itself as a framework, it is much more of a blackbox framework than a whitebox. Most of the methods and many of the classes are private or protected final. There are very few places to extend what's there. And there are virtually none that allow you to override their architectural assumptions.
    The biggest architectural assumption I found to be problematic was that application developers can't be trusted to know which objects they intended to read and which they intended to write. Therefore, Hibernate "protects" you from having two sessions refer to (that's right, refer to, not modify) a collection of objects.
    In the end, we ended up having to open up the source code and make some modifications in order to make our application run with reasonable performance. We had a lot of fairly deep objects (objects that contained objects that contained objects...) and the idea of not caching the ones that were not being modified across sessions just didn't cut it for us.
    Additionally, we've spent the last few months supporting the app that we finally got into production, and greater than 75% of our bug fixing time has been due to the fact that Hibernate actually reads in objects from several places and it is difficult to tap into THE place an object is read in... because there isn't one. It goes through all sorts of intermediate states and we found out that having one process that is reading objects while another is trying to write the same object can cause some unfortunate side effects, even if you put synchronization locks in the obvious places.
    We ended up with many person months of effort and a lot of special classes getting Hibernate to do what we wanted it to do, and had to open the source code (which will make it hard to ever upgrade to the next version).
    Just recently we started a new project (where Oracle was the corporate standard DB) and decided we'd try to use TOPLink. Having not used it for several years, I had hoped it was going to be much cleaner than Hibernate to hook into our persistence layer. It was a piece of cake. In a few days we were doing what took us months to do with Hibernate, and we didn't have to perform any unnatural acts to get there.
    I would recommend Hibernate to anyone who didn't know how to build a reasonably factored object-oriented system and didn't mind forcing their system architecture to fit Hibernate's architectural assumptions. But, if you think you might have reason to define your own architecture or modify Hibernate's default behavior, TOPLink is well worth the licensing fees. Not to mention the cost of your sanity.
    Is Hibernate really free? Only if you don't value your time. I also found that you can buy outrageously priced support from JBoss to make up for their poor documentation on their poorly architected ORM blackbox framework. The documentation for TOPLink is far superior, and the simplicity of doing simple customizations and tweaks is like night and day.

  • 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

  • JPA Toplink OneToMany - ManyToOne Relation will not stored in DB

    Hi
    I am getting the error while inserting the data into Two tables by using the ManyToOne realation.
    i am using 2 tables. In parent table i am giving
    @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="meterInfo")
    @JoinColumn(name="METERID")
    private List<MeterSub> meterSubs=null;
    subtable i am giving
    @ManyToOne(optional=false,targetEntity=com.nexant.mdm.dto.MeterInfoDTO.class)
    @JoinColumn(name="METERID",nullable=false, insertable=false, updatable=false)
    private MeterInfoDTO meterInfo;
    i am inserting the data by using the test class like this:
    MeterInfoDTO mi = new MeterInfoDTO();
    mi.setMeterID(4);
    MeterSub ms = new MeterSub();
    ms.setMeterInfo(mi);
    ms.setMeterData("meterData12");
    ms.setMeterSubPk("103");
    //ms.setMeterID(2);
    List<MeterSub> set = new ArrayList<MeterSub>();
    set.add(ms);
    mi.setMeterSubs(set);
    mi.setMeterName("Sample Meter NAme");
    mi.setMeterTimeZone("TZ");
    Last i am saving the data.
    while inserting the data its giving the following error:
    ORA-02291: integrity constraint (SYSTEM.SYS_C0010451) violated - parent key not found
    Error Code: 2291
    Call: INSERT INTO METERSUB (METERSUBPK, METERDATA, METERID) VALUES (?, ?, ?)
    means its not taking METERID from parent and its giving 0. thats why the error coming like this.
    Can any please help me to resolve this
    Thanks
    Shannu

    Hi Tolls,
    i have one doubt while using the JPA Toplink.
    In my table it have primary key with 2 columns menas composite key acting as a primary key.
    So how i have to declare these fields in POJO class
    and also how to represent these Class and primary key in ONe to One realtion or Many to one relation.
    @ManyToOne(optional=true,targetEntity=com.nexant.mdm.dal.eo.Capability.class)
    @JoinColumn(name="CapabilityID",nullable=false, insertable=true, updatable=false)
    private Capability capability;
    here Capabity is the POjo calss and CapabilityID is the primary key , if in place of CapabilityID i have 2 keys acting as a primary key.
    So how can i represent this?
    waiting for ur valuble response :)

  • Toplink vs hibernate

    hi
    who can i determine which technology is better to use with oracle. Toplink or hybernate
    mostly we use hybernate but I want to know why toplink is better than hybernate
    thanks
    Message was edited by:
    Doug Clarke

    One of the key differences between TopLink and Hibernate is the caching implementation. TopLink provides an object cache where instances can be shared across the application, client, or transaction controlled by mapping metadata and application usage. The benefits of the shared cache are clear where read-only and read-mostly objects can be shared to avoid creating many copies of the objects unnecessarily (performance costs and extra garbage creation).
    If you have more volatile or data types that are not shared you can configure TopLink's caching to be isolated and therefore only cache the objects per client or transaction.
    If you have use cases where you need to ensure you get a transactionally isolated instance of an object you have configured to be held in the shared cache you can access the object within a UnitOfWork. This will make a read-repeatable copy of the object within the 'transaction' that will not be changed by concurrent writes from other committing UnitOfWork.
    Ultimately we work hard to offer TopLink/EclipseLink developers a solution with configurable and flexible options to address a wide variety of requirements. Understanding and leveraging our cache is a key success factor in any application development with TopLink.
    As far as the duplicate SQL comment goes I have reviewed the support request we recently received on this and the issue appears to be that if you change the existence-checking from its default of check-cache to check-database we have a bug where we incorrectly check the database for each registered new instance with a zero PK value. When we see an object with a zero primary key and sequencing configured it should be assumed to be new without requiring the select. We are working with support to get this issue addressed.
    Doug

  • JPA/Toplink Tutorials

    Hi ,
    iam looking for advanced JPA/Toplink Documentation (Books) , can any one help me on that ,
    Thanks
    Best Regards,

    TopLink documentation is here: http://www.oracle.com/technology/products/ias/toplink/doc/index.html, including the Developer's Guide.
    JPA resources are listed here: http://www.oracle.com/technology/products/ias/toplink/jpa/resources-index.html

  • Demo Application to Compare Toplink, JDBC, Hibernate

    Hi
    I Need a Demo Application which is implemented Using Toplink, JDBC, Hibernate to compare the overhead of using Toplink, Hibernate to Using JDBC.
    I got a link to Spring PetClinic Demo which is Implemented using Toplink, JDBC, Hibernate from Google but the spring site has removed this application.
    Please help to get this application or some other demo Application which can be used
    Excuse me for my bad english
    Thanks,
    Raghavendra

    PeClinic Demo Application is included in the Spring Frame work Dowload

  • 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

  • Can I implement the ORM task without TopLink and Hibernate?

    Can I implement the ORM (Objest/Relational Mapping) task without TopLink and Hibernate tools?

    Any opinions are welcome.

  • Query - Hibernate to JPA/TopLink Conversion

    Hi,
    I have some problems with a query. My query works fine in Hibernate but I have to work with TopLink.
    I have created the query below.
    int Language = 1;
    String hql = "SELECT DISTINCT g "
    +    "FROM GUI g "
    +    "JOIN FETCH g.gUINameAllocation gna "
    +    "JOIN FETCH g.elementAllocation gea "
    +    "JOIN FETCH gea.elementTextAllocation geta "
    +    "WHERE g.gUIID = " + java.lang.Integer.toString(GUI) + " "
    +    "AND gna.languageAllocation.languageID = " + java.lang.Integer.toString(Language)
    +    "AND geta.languageAllocation.languageID = " + java.lang.Integer.toString(Language);
    Query query = session.createQuery(hql);
    java.util.List<GUI> results = (java.util.List<GUI>)query.list();
    I have tried to translate the query to JPQL but it does not allow alias names for fetch joins. I have tried to translate it to the Criteria API classes but I will not work. I have tried the Criteria API with the join class and the fetch class.
    I can not use the fetch class in crit.where(...) expression. I can only use there the join classes as far as I understood.
    int Language = 1;
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<GUI> crit = cb.createQuery(GUI.class);
    crit.distinct(true);
    Root<GUI> c = crit.from(GUI.class);
    Join<GUI, GUIName> guiname = c.join("gUINameAllocation", JoinType.LEFT);
    Join<GUIName, Language> language = guiname.join("languageAllocation");
    Join<GUI, Element> guielement = c.join("elementAllocation", JoinType.LEFT);
    Join<Element, ElementText> guielementtext = guielement.join("elementTextAllocation", JoinType.LEFT);
    Join<ElementText, Language> language1 = guielementtext.join("languageAllocation");
    crit.where(cb.equal(language.get("languageID"), Language));
    crit.where(cb.equal(language1.get("languageID"), Language));
    Has somebody an idea for a solution?
    Thx in advance

    JPA does not allow alias names on fetch joins, I suspect partially because they could then be used in the filtering in the query - which is exactly what you are doing. This could cause potential caching issues, as the entity that is built might end up missing references that don't conform to the conditions in the where clause, as discussed here:
    http://www.coderanch.com/t/486454/ORM/databases/Join-Fetch-EclipseLink
    According to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=293775 this has been changed and is supported in EclipseLink 2.4 to some degree.
    If you cannot use EclipseLink 2.4 or later, the way to do this in JPQL is to use a separate join for the alias to be used in the query, and one for the fetch join.
    "SELECT DISTINCT g FROM GUI g "
    + "JOIN FETCH g.gUINameAllocation "
    + "JOIN FETCH g.elementAllocation "
    + "JOIN g.gUINameAllocation gna "
    + "JOIN g.elementAllocation gea "
    + "JOIN gea.elementTextAllocation geta "
    + "WHERE g.gUIID = " + java.lang.Integer.toString(GUI) + " "
    + "AND gna.languageAllocation.languageID = " + java.lang.Integer.toString(Language)
    + "AND geta.languageAllocation.languageID = " + java.lang.Integer.toString(Language);
    Unfortunately JPA does not allow nested fetch joins, so the only way to fecth gea.elementTextAllocation is through a query hint:
    query.setHint("eclipselink.join-fetch", "g.elementAllocation.elementTextAllocation");
    EclipseLink/TopLink's join-fetch query hint is described here:
    http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Query_Hints#Join_Fetch
    Best Regards,
    Chris

  • 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

  • Performance issue in JPA/Toplink

    Hey,
    As part of my Masters Thesis, I'm developing a benchmark framework to compare different JPA providers in different environments and databases. One benchmark does the following:
    1. create 100 transient entitiy-trees (marked cascade persit) and store them in a thread-safe queue
    2. start 100 threads, where each thread polls one entity-tree and calls persist on the root-element
    3. test if all entities are written to db correctly and queue is empty
    4. clear all db-tables
    5. repeat 10 times
    The period of starting the threads till the last one has finished is measured. The problem is, that each iteration takes longer than the last one, it starts with 2500 ms while the last one takes up to 5000 ms. This happens within Spring just as in a Glassfish-Application.
    When executed with OpenJPA or Hibernate the measured time is nearly constant.
    I'm pretty sure, that there are the same conditions before each iteration. Maybe there is something toplink-specific I don't consider? Any other ideas?
    Regards,
    Sebastian

    Thanks for your reply,
    I'm using Dependency Injection to get the EntityManager, so it's a new one in each iteration. For that reason there is no need to call clear().
    I'm using TopLink, not EclipseLink. I like to stay with that, cause i've already done many benchmarks, which I would have to perform with EclipseLink again otherwise. I tried the properties you mentioned with toplink.* instead of eclipselink.* but there is no advancement.
    Is there a possibility that this problem is solven in EclipseLink?
    Regards,
    Sebastian

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for