HeapSpace Error in JPA

Hi,
Exception :
Out of Memory Error: Java Heap Space
This is exception is occured when retrieving large amount of records from database through JPA..
How to solve this issue.
Regards
Sucharitha.

Looks like you ran out of memory.
<p>
If you are just reading in lots of data, and need more memory, then you can increase your JVM through the JVM -Xmx512M setting.
<p>
Did you need to read all of the data at once? You may consider splitting the data up and either creating a new EntityManager for each segment, or calling clear() on the EntityManager after each segment.
<p>
You may also need to investigate what caching options you are using.
<p>
-- James : EclipseLink

Similar Messages

  • How to determine the exact database error in JPA?

    For example you are going to add a record in the database which primary already exist
    in one of the records in that table in the database. This will cause an error, but how do
    I know this error in human readable form just like "Same record with the same PK in the
    the table already exist" in JPA.
    My current procedure is that I will first check all the records in the database in that table
    and compare those PK's in the current record, if there is a conflict then I know the error.
    But this procedure is so slow considering there are a lot of records in the database.
    Fetch and compare is so slow.
    Anyone help me on this.

    For example you are going to add a record in the database which primary already existin one of the records in that table in the database. This will cause an error, but how do
    I know this error in human readable form just like "Same record with the same PK in the
    the table already exist" in JPA>
    Why would you do that though? If you're using autogenerated keys it can't occur. If you're using business keys you should be checking for the existence of the key before trying to insert. Any other case is likely to be a bug, so don't do that.

  • Deployment error in jpa(wl10.3.3)

    I tried to write a simple appn using jpa
    BookBank.java
    package entity.library;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import java.util.Collection;
    import javax.persistence.*;
    import java.io.Serializable;
    @Entity
    @Table(name="bookbank")
    public class BookBank implements Serializable {
    long id;
    String title;
    String author;
    double price;
    //protected Collection <LineItems> lineitems;
    public BookBank() {
    super();
    public BookBank(String title, String author, double price) {
    super();
    this.title = title;
    this.author = author;
    this.price = price;
    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    // Getter and setter methods for the defined properties..
    public long getId() {
    return id;
    public void setId(long id) {
    this.id = id;
    public String getTitle() {
    return title;
    public void setTitle(String title) {
    this.title = title;
    public String getAuthor() {
    return author;
    public void setAuthor(String author) {
    this.author = author;
    public double getPrice() {
    return price;
    public void setPrice(double price) {
    this.price = price;
    Business Interface:BookCatalogInterface.java
    package entity.library;
    import javax.ejb.Remote;
    import java.util.Collection;
    @Remote
    public interface BookCatalogInterface {
    public void addBook(String title, String author, double price);
    public Collection <BookBank> getAllBooks();
    SessionBean : BookCatalogBean.java
    package entity.library;
    import java.util.Iterator;
    import java.util.Collection;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import java.io.Serializable;
    import javax.ejb.Remote;
    @Remote(BookCatalogInterface.class)
    @Stateless
    public class BookCatalogBean implements Serializable, BookCatalogInterface {
    @PersistenceContext(unitName="EntityBean")
    EntityManager em;
    protected BookBank book;
    protected Collection <BookBank> bookList;
    public void addBook(String title, String author, double price) {
    // Initialize the form
    if (book == null)
    book = new BookBank(title, author, price);
    em.persist(book);
    public Collection <BookBank>getAllBooks() {
    bookList=em.createQuery("from BookBank b").getResultList();
    return bookList;
    persitent.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="EntityBean" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>JNDIDS</jta-data-source>
    <non-jta-data-source>JNDIDS</non-jta-data-source>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.logging.level" value="FINEST"/>
    </properties>
    </persistence-unit>
    </persistence>
    But getting error at the time of deployment on weblogic 10.3.3 server:
    Unable to deploy EJB: BookCatalogBean from book.jar:
    No persistence unit named 'EntityBean' is available in scope book.jar. Available persistence units: []
    at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467)
    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
    at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.IllegalArgumentException: No persistence unit named 'EntityBean' is available in scope book.jar. Available persistence units: []
    at weblogic.deployment.ModulePersistenceUnitRegistry.getPersistenceUnit(ModulePersistenceUnitRegistry.java:132)
    at weblogic.deployment.BasePersistenceContextProxyImpl.<init>(BasePersistenceContextProxyImpl.java:38)
    at weblogic.deployment.TransactionalEntityManagerProxyImpl.<init>(TransactionalEntityManagerProxyImpl.java:35)
    at weblogic.deployment.BaseEnvironmentBuilder.createPersistenceContextProxy(BaseEnvironmentBuilder.java:974)
    at weblogic.deployment.BaseEnvironmentBuilder.addPersistenceContextRefs(BaseEnvironmentBuilder.java:8
    please suggest solution

    thanks for your interest
    BookCatalogBean.java specify @Stateless(mappedName="entity/library/BookCatalogInterface")
    and WebClient.jsp with bci = (BookCatalogInterface) ic.lookup("entity/library/BookCatalogInterface");
    But getting error
    Error:Unable to resolve 'entity.library.BookCatalogInterface'. Resolved 'entity.library'
    I check jndi tree on console which specify Binding Name:     
    entity.library.BookCatalogInterface#entity.library.BookCatalogInterface
    java.lang.NullPointerException
    at jsp_servlet.__webclient._jspService(__webclient.java:132)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    try to be more clear, i'm in lack of ideas in this problem, even it sounds like a classic :I have spend hours trying to play around with this but have got nowhere.

  • JCO Runtime error with JPAAS

    Hi,
    I am currently facing the following issue while using JCO 3
    I use the same code in stand alone java project i can connect to the system using JCO and get the results but the same when i try to use it with JPAAS inside a web application i get the following error.
    Can anyone help me out on what could be the problem?
    here is the stack trace
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:107)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:323)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    root cause
    org.apache.cxf.interceptor.Fault: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
         org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:162)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
         java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         java.util.concurrent.FutureTask.run(FutureTask.java:138)
         org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    root cause
    java.lang.NoClassDefFoundError: Could not initialize class com.sap.conn.jco.rt.JCoRuntimeFactory
         com.sap.conn.jco.rt.RuntimeEnvironment.<init>(RuntimeEnvironment.java:43)
         sun.reflect.GeneratedConstructorAccessor14.newInstance(Unknown Source)
         sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         java.lang.Class.newInstance0(Class.java:355)
         java.lang.Class.newInstance(Class.java:308)
         com.sap.conn.jco.ext.Environment.getInstance(Environment.java:155)
         com.sap.conn.jco.ext.Environment.isDestinationDataProviderRegistered(Environment.java:401)
         com.sap.did.integration.direct.ABAP_System_Connect.<init>(ABAP_System_Connect.java:43)
         com.sap.did.services.impl.IntegrationServiceImpl.getOpenInvoices(IntegrationServiceImpl.java:37)
         com.sap.did.rest.impl.VendorsImpl.getVendorInvoices(VendorsImpl.java:61)
         sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:597)
         org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
         org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:162)
         org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
         java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         java.util.concurrent.FutureTask.run(FutureTask.java:138)
         org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
         org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
         org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
         org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
         org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
         org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
         org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
         org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:112)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)
    note The full stack trace of the root cause is available in the SAP logs.
    Both the jar file and the dll file are present in the war file and still i get this error.
    Regards,
    Suhas

    I am experiencing exactly the same problems on one of two identical machines after something happened in the registry.
    The first problem that appered was an error 1325 "Favorites is not a valid short name".
    I did find the registry key involved (%userprofile%\Favorites) and fixed it.
    So now the the next one: yours.
    I think the solution can be found in the list of registry keys that Adobe Reader is accessing.
    btw Eusing registry cleaner did not find this key to be in error.
    Problem is that the Reader does not ask for an alternative location after stumbling on the key.
    Who can gnerate a list of keys accessed?

  • 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

  • HAVING clause error in JPA 2 examples

    In Chapter 8: Query Language of the Pro JPA 2 Mastering the Java Persistence API book, the jpqlExamples WAR has this query:
    SELECT e, COUNT(p)
    FROM Employee e JOIN e.projects p
    GROUP BY e
    HAVING COUNT(p) >= 2
    When executed, the following error occurs:
    java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
    Exception Description: Error compiling the query [SELECT e, COUNT(p) FROM Employee e JOIN e.projects p GROUP BY e HAVING COUNT(p) >= 2], line 1, column 80: invalid HAVING expression [COUNT(p) >= 2] for query with grouping [GROUP BY e]. The HAVING clause must specify search conditions over the grouping items or aggregate functions that apply to grouping items.
    I bring this us because I have an application which is getting the same error and need a fix. If the query is indeed legal in JPA 2, then why the error? If if it is my setup however, then I would like suggestions on fixing it. I am using GlassFish v3 (build 74.2), updated regularly with the Update Tool.

    The bug has been reopened. Now it says:
    Reopening because there is some debate about whether this should be supported
    by the spec. Some people read the spec to say the above query is allowed - I
    am not convinced, but discussion can be appended to this bug if necessary.
    This is Bug 308482, and I assume at least a few might want to take a look.
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=308482

  • Error deploying jpa from oepe tutorial example on Weblogic 12c server

    I am having the next error trying to deploy jpa in to Weblogic 12c server from the oepe tutorial example at http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/11/eclipse_intro/eclipse_intro.html. The "I---------I" markups are below, "bean.Hello", "hello" and "response.jsp". I've tried to find a solution on the web but nothing. I'll apreciate any help. thanks.
    greeting.jsp:1:1: Needed class "bean.Hello" is not found.
    ^
    greeting.jsp:5:44: The bean type "bean.Hello" was not found.
    <jsp:useBean id="hello" scope="page" class="bean.Hello"></jsp:useBean>
    I----------I
    greeting.jsp:6:23: This bean name does not exist.
    <jsp:setProperty name="hello" property="*" />
    I-----I
    greeting.jsp:34:18: Error in "C:\Users\Andres Tobar\workspace\DemoEARWeb\WebContent\pages\response.jsp" at line 13: This bean does not exist.
    <%@ include file="response.jsp" %>
    I------------I

    I have started again all the tutorial from the begining, trying to not miss any configuration setting even the ones displayed on pictures, finding that the tutorial example now works. I think the first time i have tryed it i missed to activate the anotations facet in project properties because this configuration step is not explained in the tutorial unless you take a close look into the tutorial images. Probably that was the cause of the mentioned error, not so sure, but the tutorial example really works.

  • OpenJPA error

    I am getting these errors for JPA . We are actually using OpenJPA 1.1.2 on eclipse but it still shows Open JPA1.1.1 in error . Also is there something wrong in query/code ?
    DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage] [See nested exception: batch.exception.BatchEjbException: batch.exception.DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error>org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage]]
    at batch.job.BatchJob.execute(BatchJob.java:47)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Caused by: batch.exception.BatchEjbException: batch.exception.DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage]
    at batch.ejb.BatchEjb.findJobHistoryByJobStatusCode(BatchEjb.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke

    I am getting these errors for JPA . We are actually using OpenJPA 1.1.2 on eclipse but it still shows Open JPA1.1.1 in error . Also is there something wrong in query/code ?
    DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage] [See nested exception: batch.exception.BatchEjbException: batch.exception.DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error>org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage]]
    at batch.job.BatchJob.execute(BatchJob.java:47)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
    Caused by: batch.exception.BatchEjbException: batch.exception.DaoException: <openjpa-1.1.1-SNAPSHOT-r422266:807362 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter "select h from JobHistory h where h.jobStatusCode = :jobStatusCode order by h.jobHistoryId". Error message: The name "JobHistory" is not a recognized entity or identifier. Perhaps you meant JobHistory, which is a close match. Known entity names: [ReportPrint, FileHistory, ReportHistory, ReportTemplate, JobHistory, FileGeneration, JobMessage]
    at batch.ejb.BatchEjb.findJobHistoryByJobStatusCode(BatchEjb.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke

  • JPA Namespace missing

    Hello,
    I'm trying to follow "SAP JPA 1.0, EJB 3.0 and WebService -Modeling Your First JPA Entity in CE 7.1" tutorial.
    All is running well till I try to generate the DDL file (on my ejb project, I right click and select JPA Tools).
    Each time I'm getting the same error : "ERROR:  Namespace in FORMINFO is missing (Rule: namespace_suffix)" where FORMINFO is the name of the table to which my JPA entity FormInfo is linked.
    I get also the same error in JPA entity class.
    I was not able to fin a way to solve this issue. Anyone can help?
    Thanks,

    I am working with 7.2 ... and it seems that the DDL is not generated (at least it is nowhere I searched )
    It initially complained that it was not connected to the dictionnary.
    After I restarted the IDE, it did not complained anymore
    The only major difference I find between the Tutorial and my project is the file persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <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="LocalDevelopment~LocalDevelopment~employee_app~demo.vertomind.com">
        <jta-data-source>EMPLOYEE_DS</jta-data-source>
      </persistence-unit>
    <!--
    Trying to map the name used generated Errors
      <persistence-unit name="EMPLOYEE_PU">
      </persistence-unit>
       -->
    </persistence>
    \T,
    I feel like an idiot ...
    I created a new Connection employee_conn2 and now DDL generation worked ....
    Grrrrrrrrrrrr ...
    Edited by: tsmets on Aug 13, 2010 4:15 PM
    Edited by: tsmets on Aug 13, 2010 4:18 PM

  • Error clientUrlPart with @PersistenceUnit

    Hi all, I have a error with JPA and JSF+PrimeFaces, netbeans 8, whenI add the next code line: 
    @PersistenceUnit(unitName="namePU")
    EntityManagerFactory emf;
    and compile, i have the next error:
    Starting GlassFish Server 4 1
    GlassFish Server 4 1 is running.
    GlassFish Server 4 1, deploy, null, false
    ......\nbproject\build-impl.xml:1050: The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 12 seconds)
    1049: <target if="netbeans.home" name="-run-deploy-nb">
    1050:         <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
    1051: </target>
    But if I remove the:
    @PersistenceUnit(unitName="namePU")
    EntityManagerFactory emf;
    Works fine....
    Ideas???
    Thanks!

    What is the persistence.xml? Is namePU defined?

  • Image file

    I'm trying to open a file from the JFileChooser and turn the selected file into a BufferedImage and display it in a panel.
    I've got no issue selecting an image in the file chooser, however when I tell it to create an Image from the selection, it fails.
    JFileChooser jf = new JFileChooser();
        MyFileFilter ff = new MyFileFilter(new String[] {"jpg", "gif", "png", "tiff"});
        jf.setFileFilter(ff);
        int val = jf.showOpenDialog(this);
        if(val == JFileChooser.APPROVE_OPTION) {
            Image i = getToolkit().getDefaultToolkit().getImage(jf.getSelectedFile().getAbsolutePath());The absolute path is definitely pointing to an image, I've checked this, but the error I receive when trying to then convert to a bufferedImage is that the width and height of the image are -1 and not what they should be
    Why is this happening?
    Thanks

    This method
    Toolkit.getImage(...)caches previous images, so you'll eventually get a HeapSpace error if you use it. Read the API. What you want is
    Toolkit.createImage(...);Furthermore, Toolkit images need to be flushed when you're ready for them to be garbage disposed (to release native resources). BufferedImage don't need to be flushed.
    image.flush();But in all honesty, forget the Toolkit and go with
    javax.imageio.ImageIO.read(...);That method returns a BufferedImage already.
    EDIT
    This bit of code
    g2d.drawImage(BI, 0, 0, this);Dosen't make sense. You're drawing an image onto itself.

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

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

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

  • Uses a non-entity as target entity

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

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

  • Problem: cannot implement TABLE_PER_CLASS inheritance

    Hello, I'm using Jdev 11g, JPA (with EclipseLink 1.1.1) & EJB 3.0. I'm trying to build TABLE_PER_CLASS inheritance.
    Here is entities' code:
    Parent:@Entity
    @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
    @NamedQueries( { @NamedQuery(name = "Doc.findDoc",
    query = "select o from Doc o where o.docDate between :begDate and :endDate")
    public abstract class Doc implements Serializable {
    @Id
    @Column(name = "ID")
    private Long id;
    @Column(name = "DOC_NUMBER")
    private String docNum;
    @Column(name = "DOC_DATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date docDate;
    public Doc() {
    super();
    Child:@Entity
    @Table(name = "PAY_DOC")
    public class PayDoc extends Doc implements Serializable{
    @Column(name = "SUM")
    private BigDecimal sumOfMoney;
    public PayDoc() {
    super();
    persistence.xml looks like this:<?xml version="1.0" encoding="UTF-8" ?>
    <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"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="context">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>java:/app/jdbc/jdbc/inform_oracam00DS</jta-data-source>
    <class>Doc</class>
    <class>PayDoc</class>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.target-database" value="Oracle10g"/>
    <property name="javax.persistence.jtaDataSource"
    value="java:/app/jdbc/jdbc/inform_oracam00DS"/>
    </properties>
    </persistence-unit>
    </persistence>
    When I'm trying to call method, which calls Doc.findDoc query:
    public List<Doc> queryDoc() {
    Date begDate = new GregorianCalendar(2007, 10, 1).getTime();
    Date endDate = new Date();
    return em.createNamedQuery("Doc.findDoc").setParameter("begDate",
    begDate,
    TemporalType.TIMESTAMP).setParameter("endDate",
    endDate,
    TemporalType.TIMESTAMP).getResultList();
    I get no table found SQL error and JPA is trying to execute query like
    SELECT FROM DOC WHERE ...
    Looks like EclipseLink sets wrong table name.
    P.S. When I added second child, the query was the same and there was no union in it.
    Edited by: tag on 26.08.2009 21:27

    Hello,
    As Anindita mentioned, this query will force reading from all the tables in the inheritance heirarchy, including the DOC table. Since it does not exist, you get the exception. I do not believe that any JPA provider could work in this senario, since the specification requires providers to query on Doc since it is marked as an Entity, even though you have marked it as an abstract class
    I believe you might get past this problem if you mark the Doc class as a @MappedSuperClass instead of an entity. This will cause it to be correctly interpreted as not being instantiated, and so will not require a DOC table be defined.
    Best Regards,
    Chris

  • Problem with connect to sql server ..

    I have problem with connect to sql server2005
    i use jpa(hibernate) and jsf
    javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
    root cause
    javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
    javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    javax.faces.component.UICommand.broadcast(UICommand.java:315)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    root cause
    javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
    org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)
    org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
    org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1371)
    org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
    servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    org.apache.el.parser.AstValue.invoke(AstValue.java:262)
    org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    javax.faces.component.UICommand.broadcast(UICommand.java:315)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    root cause
    org.hibernate.exception.JDBCConnectionException: Could not open connection
    org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131)
    org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
    org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304)
    org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
    org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
    org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
    org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
    org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
    servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    org.apache.el.parser.AstValue.invoke(AstValue.java:262)
    org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    javax.faces.component.UICommand.broadcast(UICommand.java:315)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    root cause
    java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost;databaseName=MIS
    java.sql.DriverManager.getConnection(Unknown Source)
    java.sql.DriverManager.getConnection(Unknown Source)
    org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)
    org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276)
    org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
    org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
    org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
    org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
    org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
    org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
    servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    org.apache.el.parser.AstValue.invoke(AstValue.java:262)
    org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
    com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
    javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
    javax.faces.component.UICommand.broadcast(UICommand.java:315)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
    note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
    persistance.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    <persistence-unit name="PrzychodnieLekarskiePU" transaction-type="RESOURCE_LOCAL">
    <class>model.Przychodznia</class>
    <properties>
    <property name="hibernate.connection.username" value="a"/>
    <property name="hibernate.connection.password" value="a"/>
    <property name="hibernate.connection.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
    <property name="hibernate.connection.driver_class" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
    <property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
    <property name="javax.persistence.jdbc.user" value="a"/>
    <property name="javax.persistence.jdbc.password" value="a"/>
    <property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    </properties>
    </persistence-unit>
    </persistence>
    Edited by: 985713 on 2013-02-02 07:12
    Edited by: 985713 on 2013-02-02 07:37

    it works ok : I don't known where is error in jpa .. ?
    public class MyConnection {
         public static Connection getConnection () throws SQLException{
              String url = "jdbc:sqlserver://ABADDON1;databaseName=MIS";
              String user = "a";
              String pass = "a";
              DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
              Connection conn = DriverManager.getConnection(
                        url,user,pass);
              System.out.println("OK");;
              return conn;
    try {
                   conn = MyConnection.getConnection();
                   } catch (SQLException ex) {
                        System.out.println("Error: " + ex.getErrorCode()
                                  + ex.getMessage());
                   }

Maybe you are looking for

  • Reading the xml file in customized table.

    Hi Experts , I have a requirement to read the xml file in one "z" table . Can anyone let me know the exact steps . Thank you Ashutosh

  • Email account hijacked?

    I recently sold something on eBay and during the auction, I received an odd question about my sale. The link supplied for replying directed me to login first on a page that looked IDENTICAL to eBay's login page, with one exception...it asked for my e

  • View history screen in FC Valuation of previous months

    Dear Experts; I am a newbie in SAP FICO, and looking for your value helps; In 31.12.2011, my customer ran FC Valuation through FAGL_FC_VAL - Foreign Currency Valuation (New) and several postings had been made, including valuation postings for AR open

  • Rac node failure crs cleanup failing

    I have a three node rac database, 10.2.0.4 running on Windows server 2008. I lost a hard drive on one of the servers and it corrupted the mirror disk as well so I am having to rebuild. I am going through these procedures, RAC on Windows: How to Clean

  • Post Children Before Parent

    First, I just want to apologize if this isn't appropriate here. Feel free to lock/delete/move my post elsewhere :) I'm having a BC4J related problem in the OA Framework on JDeveloper 9.0.3.5 and Oracle EBS 11.5.10. I have two EOs that are linked by c