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

Similar Messages

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

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

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

  • Error when using Toplink Ant tasks - Several [3] SessionLoaderExceptions

    Hi,
    I'm trying to integrate toplink's session exports with my build process (Apache Ant). I've been working from the example here:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/b32441/mw.htm
    My Ant init target and the session validation target are shown below:
    <!-- =====================================================================================
         init Target
         ==================================================================================== -->
    <target name="init">
         <property name = "toplink.home" value = "C:/APPS/OC4J/toplink"/>     
         <property name = "oracle.home" value = "C:/APPS/OC4J"/>
         <property name = "toplink.log.dir" value = "${basedir}/../toplinklogs"/>
         <property name = "toplink.mwp.dir" value = "${basedir}/../java/mwb"/>
         <property name = "toplink.sessions.dir" value = "${basedir}/config"/>
         <property name = " myProject.classes" value = "${basedir}/../java/classes "/>
         <path id = "database.classpath">
              <pathelement path = "${oracle.home}/lib/dms.jar"/>
         </path>
         <path id = "toplink.classpath">
              <pathelement path = "${toplink.home}/jlib/toplink.jar"/>
              <pathelement path = "${oracle.home}/j2ee/home/lib/ejb.jar"/>
              <pathelement path = "${oracle.home}/lib/xmlparserv2.jar"/>
              <pathelement path = "${toplink.home}/jlib/antlr.jar"/>
         </path>
         <path id = "mw.classpath">
              <pathelement path = "${toplink.home}/jlib/tlmwcore.jar"/>
              <pathelement path = "${toplink.home}/jlib/toplinkmw.jar"/>
         </path>
         <path id = "mwplatforms.classpath">
              <pathelement path = "${toplink.home}/config"/>
         </path>
         <typedef file = "${basedir}/toplink-ant-lib.xml" classpathref = "mw.classpath" uri = "toplinklib" />
    </target>
    <!-- =====================================================================================
         validate session Target
         ==================================================================================== -->     
    <target name="validate.session" depends="export.project" if="export-completed">
         <toplink:session.validate
              sessionsfile = "${basedir}/../java/src/aquila/administrator/accounting/config/toplink/AccountingMapping.xml"
         sessionname = "AccountingMapping"
         property = "session-valid"
         classpathref = "toplink.classpath"
         classpath = "${myProject.classes}" >
              <toplink:classpath refid = "mw.classpath" />
         <toplink:classpath refid = "database.classpath" />
         <toplink:loginspec refid = "loginSpec" />
         </toplink:session.validate>
    </target>
    <!-- =====================================================================================
         Error
         ==================================================================================== -->
    validate.session:
    [toplink:session.validate] An error occured while validating project:
    [toplink:session.validate] Exception Description: Several [3] SessionLoaderExceptions were thrown:
    BUILD FAILED
    C:\Eclipse\Administrator\ant\example.xml:105: An error occured while validating project:
    Exception Description: Several [3] SessionLoaderExceptions were thrown:
    <!-- =====================================================================================
    Verbose Errors      ==================================================================================== -->
    When I turn on verbose mode in ant I can see more details of the error:
    Local Exception Stack:
    Exception [TOPLINK-9001] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: Unknown tag name: [toplink:login] in XML node: [toplink:object-persistence].
    Internal Exception: java.lang.NoSuchMethodException: oracle.toplink.tools.sessionconfiguration.XMLLoader.process_toplink:login_Tag(org.w3c.dom.Node, oracle.toplink.tools.sessionconfiguration.XMLLoader$ObjectHolder)
    Local Exception Stack:
    Exception [TOPLINK-9001] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: Unknown tag name: [opm:class-mapping-descriptors] in XML node: [toplink:object-persistence].
    Internal Exception: java.lang.NoSuchMethodException: oracle.toplink.tools.sessionconfiguration.XMLLoader.process_opm:class_mapping_descriptors_Tag(org.w3c.dom.Node, oracle.toplink.tools.sessionconfiguration.XMLLoader$ObjectHolder)
    Local Exception Stack:
    Exception [TOPLINK-9001] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: Unknown tag name: [opm:name] in XML node: [toplink:object-persistence].
    Internal Exception: java.lang.NoSuchMethodException: oracle.toplink.tools.sessionconfiguration.XMLLoader.process_opm:name_Tag(org.w3c.dom.Node, oracle.toplink.tools.sessionconfiguration.XMLLoader$ObjectHolder)
    <!-- =====================================================================================
    Help
    ==================================================================================== -->
    The 3 errors shown above correspond to the 3 tags at the same level in the session.xml file. I have tested this validation process with a session.xml file generated from the workbench and that failed too. Since its a NoSuchMethodException it looks like my ant process isn't finding the oracle.toplink.tools.sessionconfiguration.XMLLoader class, but that is in toplink.jar which is in the class path.
    Any help appreciated

    Dear Arun,
    The WLS server is the same for (integrated WLS and Production) . For JRF template I'm sure it is the same. I have deploy another application that used BC, and it work fine in production.
    Regards
    Faizul

  • How to handle journal table using JPA+TopLink

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

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

  • JPA/Toplink Tutorials

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

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

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

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

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

  • Spring JPA + Toplink Issues

    Heya,
    I followed a developer works tutorial on integrating Toplink with Spring, and everything seemed to go well, when I start up the application, it looks like Toplink finds all my annotations and validates them (if any where invalid, it sure lets me know). However, when I go to persist my object, I get an IllegalArgumentException:
    Caused by: java.lang.IllegalArgumentException: Object: au.gov.nla.aons2.registry.domain.Registry@f3b83 is not a known entity type.
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:3198)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:190)
         at org.springframework.orm.jpa.JpaTemplate$5.doInJpa(JpaTemplate.java:263)
         at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:191)
    My Registry should be valid; at first I thought it was something to do with class hierarchies, but I removed that from the equation and I'm still getting the error. My class looks like this:
    @Entity
    @Table(name="registry", uniqueConstraints= {@UniqueConstraint(columnNames={"name"})})
    public class Registry implements Serializable {
    private static final long serialVersionUID = -4335133039987702902L;
    @Id
    private Long id;
    private String name;
    @Temporal(TemporalType.TIMESTAMP)
         private Calendar lastRun;
    private String url;
    @OneToOne(cascade=CascadeType.ALL)
    @PrimaryKeyJoinColumn
         private Schedule schedule;
         private String status = ScheduleStatus.IDLE;
         public Long getId() {
              return id;
         public void setId(Long id) {
              this.id = id;
         public Calendar getLastRun() {
              return lastRun;
         public void setLastRun(Calendar lastRun) {
              this.lastRun = lastRun;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    @Transient
         public String getType()
    throw new RuntimeException("this should be overridden.");
         public String getUrl() {
              return url;
         public void setUrl(String url) {
              this.url = url;
         public Schedule getSchedule() {
              return schedule;
         public void setSchedule(Schedule schedule) {
              this.schedule = schedule;
         public String getStatus() {
              return status;
         public void setStatus(String status) {
              this.status = status;
    My Spring config looks like this:
         <bean id="entityManagerFactory"
              class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
              <property name="jpaVendorAdapter">
                   <bean
                        class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
                        <property name="generateDdl" value="true" />
                        <property name="showSql" value="true" />
                        <property name="databasePlatform"
                             value="oracle.toplink.essentials.platform.database.HSQLPlatform" />
                   </bean>
              </property>
              <property name="dataSource" ref="dataSource" />
              <property name="loadTimeWeaver">
                   <bean
                        class="org.springframework.instrument.classloading.SimpleLoadTimeWeaver" />
              </property>
         </bean>
    My persistence.xml looks like this:
    <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_1_0.xsd" version="1.0">
         <persistence-unit name="aons" transaction-type="RESOURCE_LOCAL">
         </persistence-unit>
    </persistence>
    Finally, and here's the really odd part, my log displays the registering of the Registry Class as a persistence object:
    [TopLink Config]: 2007.04.17 09:32:50.874--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.registry.domain.LcDfwRegistry] is being defaulted to: LcDfwRegistry.
    [TopLink Config]: 2007.04.17 09:32:50.890--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.registry.domain.Registry] is being defaulted to: Registry.
    [TopLink Config]: 2007.04.17 09:32:50.921--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Long au.gov.nla.aons2.registry.domain.Registry.id] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:50.937--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.registry.domain.Registry.name] is being defaulted to: NAME.
    [TopLink Config]: 2007.04.17 09:32:50.952--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.util.Calendar au.gov.nla.aons2.registry.domain.Registry.lastRun] is being defaulted to: LASTRUN.
    [TopLink Config]: 2007.04.17 09:32:50.952--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.registry.domain.Registry.url] is being defaulted to: URL.
    [TopLink Config]: 2007.04.17 09:32:50.983--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.registry.domain.Registry.status] is being defaulted to: STATUS.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The discriminator column name for the root inheritance class [class au.gov.nla.aons2.registry.domain.Registry] is being defaulted to: DTYPE.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.schedule.domain.DayOfMonth] is being defaulted to: DayOfMonth.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The table name for entity [class au.gov.nla.aons2.schedule.domain.DayOfMonth] is being defaulted to: DAYOFMONTH.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Long au.gov.nla.aons2.schedule.domain.DayOfMonth.id] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Integer au.gov.nla.aons2.schedule.domain.DayOfMonth.dayOfMonth] is being defaulted to: DAYOFMONTH.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.registry.domain.GdfrRegistry] is being defaulted to: GdfrRegistry.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.registry.domain.PronomRegistry] is being defaulted to: PronomRegistry.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.schedule.domain.Schedule] is being defaulted to: Schedule.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The table name for entity [class au.gov.nla.aons2.schedule.domain.Schedule] is being defaulted to: SCHEDULE.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Long au.gov.nla.aons2.schedule.domain.Schedule.id] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.schedule.domain.Schedule.scheduleType] is being defaulted to: SCHEDULETYPE.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Integer au.gov.nla.aons2.schedule.domain.Schedule.hour] is being defaulted to: HOUR.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Integer au.gov.nla.aons2.schedule.domain.Schedule.minutes] is being defaulted to: MINUTES.
    [TopLink Config]: 2007.04.17 09:32:50.999--ServerSession(21324485)--Thread(Thread[main,5,main])--Element [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to a one to many mapping.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--Element [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to a one to many mapping.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.schedule.domain.Schedule.descriptiveString] is being defaulted to: DESCRIPTIVESTRING.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The alias name for the entity class [class au.gov.nla.aons2.schedule.domain.Weekday] is being defaulted to: Weekday.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The table name for entity [class au.gov.nla.aons2.schedule.domain.Weekday] is being defaulted to: WEEKDAY.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.Long au.gov.nla.aons2.schedule.domain.Weekday.id] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String au.gov.nla.aons2.schedule.domain.Weekday.name] is being defaulted to: NAME.
    [TopLink Config]: 2007.04.17 09:32:51.015--ServerSession(21324485)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to one mapping element [private au.gov.nla.aons2.schedule.domain.Schedule au.gov.nla.aons2.registry.domain.Registry.schedule] is being defaulted to: class au.gov.nla.aons2.schedule.domain.Schedule.
    [TopLink Config]: 2007.04.17 09:32:51.108--ServerSession(21324485)--Thread(Thread[main,5,main])--The primary key column name for the mapping element [private au.gov.nla.aons2.schedule.domain.Schedule au.gov.nla.aons2.registry.domain.Registry.schedule] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.108--ServerSession(21324485)--Thread(Thread[main,5,main])--The foreign key column name for the mapping element [private au.gov.nla.aons2.schedule.domain.Schedule au.gov.nla.aons2.registry.domain.Registry.schedule] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.108--ServerSession(21324485)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: class au.gov.nla.aons2.schedule.domain.DayOfMonth.
    [TopLink Config]: 2007.04.17 09:32:51.155--ServerSession(21324485)--Thread(Thread[main,5,main])--The join table name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: SCHEDULE_DAYOFMONTH.
    [TopLink Config]: 2007.04.17 09:32:51.155--ServerSession(21324485)--Thread(Thread[main,5,main])--The source primary key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.155--ServerSession(21324485)--Thread(Thread[main,5,main])--The source foreign key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: Schedule_ID.
    [TopLink Config]: 2007.04.17 09:32:51.155--ServerSession(21324485)--Thread(Thread[main,5,main])--The target primary key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The target foreign key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.daysOfMonth] is being defaulted to: daysOfMonth_ID.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: class au.gov.nla.aons2.schedule.domain.Weekday.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The join table name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: SCHEDULE_WEEKDAY.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The source primary key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The source foreign key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: Schedule_ID.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The target primary key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: ID.
    [TopLink Config]: 2007.04.17 09:32:51.171--ServerSession(21324485)--Thread(Thread[main,5,main])--The target foreign key column name for the many to many mapping [private java.util.List au.gov.nla.aons2.schedule.domain.Schedule.weekdays] is being defaulted to: weekdays_ID.
    I really don't get it... I think I'm going to have a look at the source and see if I can figure it out. Apart from this problem, I was really enjoying JPA;P

    Okay, I think I've found the problem, but don't know what is causing it. When my code attempts to persist my object, it fails on the Class.equals method. For some reason (classloaders I'll bet), there are two instances of the Class Registry, with two different object ids - so when it calls:
    // Optimize descriptor lookup through caching the last one accessed.
    ClassDescriptor lastDescriptor = this.lastDescriptorAccessed;
    if ((lastDescriptor != null) && (lastDescriptor.getJavaClass().equals(theClass))) {
    return lastDescriptor;
    And should match, the Class.equals() fails:
    public boolean equals(Object obj) {
         return (this == obj);
    So... what now, if it is a class loading issue, how do I ensure that there is only one copy of the Registry class object instantiated. If it isn't a class loading issue, what else could it be?

  • Error with hsqldb toplink configuration in oc4j

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

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

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

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

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

  • How to 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.

  • 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

  • JPA Toplink, class cast exception when casting class A to class A

    I get a really strange exception from Toplink JPA. I used netbeans to create a persistence.xml and I generated a class (entity) from the table in a DB. Everything works fine, when I create a select query, I get the list of objects and the list is correctly typed. I can the objects in the list in debug mode with every field correctly set. But then I need to start working with the list, so I iterate through the list. And then I get ClassCastException from class A to class A (when A is the canonical name of the entity class).
    I was working with JPA for some time but never seen that. I am using glassfish v2, mysql, netbeans 6.1. I could post the classes and persistence xml, but persistence.xml is really simple (no class definitions) and the class is annotated by netbeans. Every field is annotated like this:
    @Column(name = "name", nullable = false)
    And Date columns have
    @Temporal(TemporalType.TIMESTAMP)
    The whole class is annotated with @Table.
    Does anyone has any idea, what can be wrong?

    DrClap wrote:
    Make sure your URLClassLoader cannot load the IAdapter class.
    That is not exactly correct. He needs to make sure his URLClassloader has access to the IAdapter class. Sure, it should not load it on its own, but if requested the URLClassloader should be able to ask a parent to load IAdapter. Which in the end looks the same. But is not the same.
    So set the parent classloader of your URLClassloader to a classloader capable of loading IAdapter.

  • JPA/TopLink

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

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

  • JPA/Toplink changes the query logic

    Hi,
    Iam currently using JPA with Toplink implementation , i guess that toplink has its own way of optimizing the provided JPA query ; on another words , toplink sometimes changes the way you are using joins and exists statement to what looks optimized , but unfor. this caused me troubles tracking a query that should work on a certain way but its not cause the generated query by Toplink ( can be captured on the log ) does not represent the same logic , is this a known issue or do i have to write my JPA query on a way on which can be translated correctly by toplink , i know i should provide the query it self , but the model structure is too complex.
    Thanks in advance

    Hello,
    JPQL does not directly translate to SQL, so there might be some differences in what you may be expecting due to JPA requirements on the results that are returned. If there is a problem with specific queries, please let us know and file a bug if it is not behaving the way it should. A workaround would be to use a native SQL query directly.
    Best Regards,
    Chris

  • Query - Hibernate to JPA/TopLink Conversion

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

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

Maybe you are looking for

  • Help Lenovo Y50-70 Win 8.1 clean install

    I'm new to Lenovo, Win 8 and to this forum. I'm considering buying Lenovo Y50-70 Notebook model 59441814 - Intel Core i7 4270HQ, 8GB DDR3L, 256GB SSD, NVIDIA GTX 860M 4GB, 15.6" Touchscreen, 4K UHD, USB 3.0, no DVD drive and Win 8.1 pre-installed. I

  • TCODE SARA and its variant in logical file name

    Hi forum, how can I create a logical file name (FILE tcode) with execution varian of SARA for archiving ? Regards. Ganimede Dignan.

  • Possible GPU Issues With Camera Raw 6.6

    Over the past day on my Windows 7 x64 workstation I've done some updates.  Specifically: The Adobe updater brought in Camera Raw 6.6, replacing 6.5. I updated the to the ATI Catalyst 11.12 display driver version from previous version 11.11. I allowed

  • Customer and vendor archive

    Hi,   how to carry out archiving of vedor and customer master and how to retrieve them.the database is oracle. Regards Anil

  • Changing Icons...What Am I Doing Wrong?

    Hi there I'm having a problem changing some icons on my Mac. I downloaded an Icon pack and they're in two forms, both .ico and .png. The problem is that they just show as Preview icons, so when I try to copy them and then paste them onto the folder I