[TOPLINK-6007]: Exception Description: Missing descriptor for

Hi,
We developed an ADF application with TopLink in JDeveloper 10.1.3.3. All things are right in JDeveloper's embedded OC4J.
But after we deployed it to standalone OC4J 10.1.3.3, we find following errors (in CMD window):
TOPLINK-6007] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 07
*0428)): oracle.toplink.exceptions.QueryException*
*Exception Description: Missing descriptor for [class oracle.model.class1].*
Query: ReadObjectQuery(oracle.model.class1)
And find other erros related to this class1 (in this application's application.log)
javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'allNameList' from bean of type oracle.view.backing.UserPrivilege: java.lang.ClassCastException: oracle.model.class1
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190)
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143)
     at javax.faces.component.UISelectItems.getValue(UISelectItems.java:130)
     at oracle.adfinternal.view.faces.renderkit.uix.SelectItemSupport.addSelectItems(SelectItemSupport.java:262)
     at oracle.adfinternal.view.faces.renderkit.uix.SelectManyShuttleRenderer._getSelectItems(SelectManyShuttleRenderer.java:178)
     at oracle.adfinternal.view.faces.renderkit.uix.SelectManyShuttleRenderer.encodeBegin(SelectManyShuttleRenderer.java:60)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeBegin(UIXComponentBase.java:593)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:297)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
     at oracle.adfinternal.view.faces.ui.composite.ContextPoppingUINode$ContextPoppingRenderer.render(ContextPoppingUINode.java:224)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderIndexedChildren(BorderLayoutRenderer.java:42)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.BorderLayoutRenderer.renderContent(BorderLayoutRenderer.java:71)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:346)
     at oracle.adfinternal.view.faces.ui.BaseUINode.render(BaseUINode.java:301)
     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.renderWithNode(UINodeRenderer.java:90)
     at oracle.adfinternal.view.faces.ui.composite.UINodeRenderer.render(UINodeRenderer.java:36)
     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.RowLayoutRenderer.renderChild(RowLayoutRenderer.java:95)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:317)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:262)
     at oracle.adfinternal.view.faces.uinode.UIComponentUINode.render(UIComponentUINode.java:239)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderChild(BaseRenderer.java:412)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:330)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:222)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.renderContent(BaseRenderer.java:129)
     at oracle.adfinternal.view.faces.ui.BaseRenderer.render(BaseRenderer.java:81)
     at oracle.adfinternal.view.faces.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:69)
     at oracle.adfinternal.view.faces.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:177)
     at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:53)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
     at oracle.adfinternal.view.faces.renderkit.RenderUtils.encodeRecursive(RenderUtils.java:54)
     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeChild(CoreRenderer.java:242)
     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeAllChildren(CoreRenderer.java:265)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:65)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:117)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:147)
     at oracle.adfinternal.view.faces.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:60)
     at oracle.adfinternal.view.faces.renderkit.core.CoreRenderer.encodeEnd(CoreRenderer.java:169)
     at oracle.adf.view.faces.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:624)
     at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:645)
     at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:568)
     at oracle.adf.view.faces.webapp.UIXComponentTag.doEndTag(UIXComponentTag.java:100)
     at UserPrivilegejspx._jspService(_UserPrivilege_jspx.java:1169)
     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:287)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
     at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
     at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
     at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: Error getting property 'allNameList' from bean of type oracle.view.backing.UserPrivilege: java.lang.ClassCastException: oracle.model.class1
     at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:109)
     at oracle.adfinternal.view.faces.model.FacesPropertyResolver.getValue(FacesPropertyResolver.java:92)
     at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:187)
     at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:171)
     at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
     at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:160)
     ... 138 more
Caused by: java.lang.ClassCastException: oracle.model.class1
     at oracle.view.backing.UserPrivilege.getAllNameList(UserPrivilege.java:60)
     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.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
     ... 143 more
How to resolve?
Thanks,
Melody

There was a recent thread on this issue,
Missing Descriptor in Servlet
Basically TopLink does not get notified of the undeployment of an app, so cannot remove the session from the SessionManager. (unless you are using CMP)
If you can receive notification of the deploy/undeploy you could remove or refresh the session from the session manager.
A simple way to do this would be to keep a static boolean variable in your apps class that accesses the session from the session manager. The first time you access the session refresh it and set the static to true.
To refresh a session from the session manager use the API,
SessionManager.getSession(XMLSessionConfigLoader/XMLLoader xmlLoader, String sessionName, ClassLoader classLoader, boolean shouldLoginSession, boolean shouldRefreshSession)
i.e.
SessionManager.getManager().getSession(new XMLSessionConfigLoader/XMLLoader("sessions.xml/or your file name/path"), "yourSessionName", yourClassLoader, true, true);
Only use this API the first time you access the session from the app.
You can also use the following code to remove a session,
SessionManager.getManager().getSessions().remove("yourSessionName");
I have logged this issue internally, hopefully a better solution will be provided in the 10.1.3 release.

Similar Messages

  • Exception Description: Missing descriptor for ...

    I have this to query:
    codes:
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    Vector params = new Vector(1);
    params.add(argCompanyId);
    VsaSpaVendor result = (VsaSpaVendor)uow.executeQuery("findVendorByCompanyId", VsaSpaVendor.class, params);
    uow.commit();
    return result;
    then I startup the embedded oc4j in jdeveloper,I got the following errors,
    but when I deploy my application to a standalone oc4j server, it works.
    errors:
    Caused by: Exception [TOPLINK-6007] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.QueryException
    Exception Description: Missing descriptor for [class com.vs.espa.model.VsaSpaVendor].
    Query: ReadObjectQuery(com.vs.espa.model.VsaSpaVendor)
         at oracle.toplink.exceptions.QueryException.descriptorIsMissing(QueryException.java:358)
         at oracle.toplink.queryframework.ReadObjectQuery.checkDescriptor(ReadObjectQuery.java:211)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:566)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:501)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:564)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:388)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:836)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2604)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:950)
         at oracle.toplink.publicinterface.Session.readObject(Session.java:2541)
         at com.vs.espa.model.EspaPublicFacadeBean.findVendorByCompanyId(EspaPublicFacadeBean.java:1037)
         at com.vs.espa.model.EspaPublicFacadeBean.findUserByUserName(EspaPublicFacadeBean.java:796)
         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:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         ... 129 more
    Anyone can tell me why?
    Jerry

    Thank you, James
    I create SessionFactory by this:
    public EspaPublicFacadeBean() {
    this.sessionFactory =
    new SessionFactory("META-INF/sessions.xml", "default");
    the sessions.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink Sessions 9.0.4//EN" "sessions_9_0_4.dtd">
    <toplink-configuration>
    <session>
    <name>default</name>
    <project-xml>META-INF/espaMap.xml</project-xml>
    <session-type>
    <server-session/>
    </session-type>
    <login>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <datasource>jdbc/devvsDS</datasource>
    <platform-class>oracle.toplink.platform.database.oracle.Oracle10Platform</platform-class>
    <user-name>vsc</user-name>
    <encryption-class-name>oracle.toplink.internal.security.JCEEncryptor</encryption-class-name>
    <encrypted-password>03B2E88B1EC44B3883BEF6EB790DF0F8D62D1A19DF561D1E</encrypted-password>
    <uses-native-sequencing>true</uses-native-sequencing>
    <sequence-preallocation-size>1</sequence-preallocation-size>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    </login>
    <external-transaction-controller-class>oracle.toplink.transaction.oc4j.Oc4jTransactionController</external-transaction-controller-class>
    <enable-logging>true</enable-logging>
    <logging-options>
    <log-debug>true</log-debug>
              <log-level>fine</log-level>
    <print-thread>true</print-thread>
    </logging-options>
    </session>
    </toplink-configuration>
    class-mapping-descriptor defined in espaMap.xml
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <opm:class>com.vs.espa.model.VsaSpaVendor</opm:class>
    <opm:alias>VsaSpaVendor</opm:alias>
    <opm:primary-key>
    <opm:field table="VSA_SPA_VENDOR" name="COMPANY_ID" xsi:type="opm:column"/>
    </opm:primary-key>
    <opm:events xsi:type="toplink:event-policy"/>
    <opm:querying xsi:type="toplink:query-policy">
    <opm:queries>
    <opm:query name="findVendorByCompanyId" xsi:type="toplink:read-object-query">
    <opm:criteria operator="equal" xsi:type="toplink:relation-expression">
    <toplink:left name="companyId" xsi:type="toplink:query-key-expression">
    <toplink:base xsi:type="toplink:base-expression"/>
    </toplink:left>
    <toplink:right xsi:type="toplink:parameter-expression">
    <toplink:parameter name="argCompanyId" xsi:type="opm:column"/>
    </toplink:right>
    </opm:criteria>
    <opm:arguments>
    <opm:argument name="argCompanyId">
    <opm:type>java.lang.Integer</opm:type>
    </opm:argument>
    </opm:arguments>
    <toplink:timeout>0</toplink:timeout>
    <toplink:reference-class>com.vs.espa.model.VsaSpaVendor</toplink:reference-class>
    <toplink:cache-usage>primary-key</toplink:cache-usage>
    <toplink:lock-mode>none</toplink:lock-mode>
    </opm:query>
    Any ideas? Or could you give me some sample codes?
    Jerry

  • Exception Description: Missing descriptor

    Hello,
    I am dumping data from one table to another table with 2 database connection, 2 sessions.xml and 2 descriptors.
    When I run the code and while trying to write to table, I am getting
    oracle.toplink.exceptions.ValidationException
    Exception Description: Missing descriptor for [class toplink.TestHist]. 
    Verify that the descriptor has been properly registered with the Session.I think the exception is throwing from this line
    uow2.registerAllObjects(v1);where v1 is a vector which reads data from another table.
    What could be the reason for getting the above exception?
    Regards

    Hello,
    Do all the object types in the v1 collection have a descriptor? The exception suggests that the collection contains a toplink.TestHist instance, and that the toplink.TestHist doesn't have a descriptor in this session.
    Best Regards,
    Chris

  • Missing descriptor for class ...

    I have this code to query (using SQLCall)
    Session session = TopLinkSession.getSession();
         SQLCall call = new SQLCall("select c_pays_fonds from TDT31_UEB where no_cli=#no_cli");
         ReadObjectQuery query = new ReadObjectQuery(Tdt31Ueb.class);
         query.setCall(call);
         query.addArgument("no_cli");
         query.bindAllParameters();
         Vector arguments = new Vector();
         arguments.add(getCompte().getClientGarant().getNoCli());
         result = (Tdt31Ueb) session.executeQuery(query, arguments);
    session.release();
    When running, i have the error :
    EXCEPTION [TOPLINK-6007] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: Missing descriptor for [class com.bnpparibas.bfi.ebo.atlas.dto.Tdt31Ueb].
    QUERY: ReadObjectQuery(com.bnpparibas.bfi.ebo.atlas.dto.Tdt31Ueb)
         at oracle.toplink.exceptions.QueryException.descriptorIsMissing(Unknown Source)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkDescriptor(Unknown Source)
         at oracle.toplink.queryframework.ReadObjectQuery.checkEarlyReturn(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at com.bnpparibas.bfi.fmk.server.toplink.FmkDatabaseSession.executeQuery(Unknown Source)
         at com.bnpparibas.bfi.ebo.atlas.rg.EboRG032.getValue(EboRG032.java:38)
         at com.bnpparibas.bfi.eau.atlas.extracteur.ExtracteurStructure.extrait(Unknown Source)
         at com.bnpparibas.bfi.ebo.atlas.extracteur.ExtracteurGarantie.extraitGarantie(Unknown Source)
         at com.bnpparibas.bfi.ebo.atlas.extracteur.ExtracteurGarantie.extrait(Unknown Source)
         at com.bnpparibas.bfi.ebo.atlas.exe.ExtractionGarantie.execute(Unknown Source)
         at com.bnpparibas.bfi.ebo.atlas.exe.ExtractionGarantie.main(Unknown Source)
    Any idea?
    Laurent

    There are a couple of possibilities that come to mind not knowing all the details of your code.
    One, are you getting the session that has a descriptor defined for your class Tdt31Ueb? You may have more than one session defined and you aren't getting the right one.
    Two, you're getting the right session but you either haven't defined a descriptor for Tdt31Ueb or you haven't exported an up to date project.xml from the Workbench (if you're using it). In JDeveloper the project.xml is automatically regenerated when you build your project so this isn't a problem in that environment.
    Even if you use a SQLCall, TopLink needs a descriptor with mappings for your class so it know how to map all of the fields of your objects to the result set returned from the query.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • TopLink to EclipseLink migration - Missing class for indicator field value

    I am migrating Toplink 11g to EclipseLink 12.1.3.  I have EclipseLink.jar to the classpath. I have few mapping xml files. When executing the application, i am getting following error.
    Exception [EclipseLink-9005] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the project-xml file [META-INF/Business.xml].
    Internal Exception: Exception [EclipseLink-43] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:object-type-mapping] of type [class java.lang.String].
    Descriptor: XMLDescriptor(org.eclipse.persistence.mappings.DatabaseMapping --> [DatabaseTable(attribute-mapping)]).
    How to resolve this.

    Ooooops, sorry, guys!
    I was using TopLink 10.1.3.0 JARs to run a project created via TopLink 10.1.3.1 Workbench. That was the reason for the exception.
    I ran across the REAL problem, however. The one that was occurring when I created the TopLink project via JDeveloper 10.1.3.1 and ran it via JDeveloper 10.1.3.1. That's why I decided to try with TopLink 10.1.3.1 Workbench instead of JDeveloper 10.1.3.1.
    I will report the problem in a clean separate post.

  • Uow registerObject: Missing descriptor for java.lang.Integer

    I get this message on uow.registerObject
    Missing descriptor for java.lang.Integer.
    Any help greatly appreciated,
    Thanks,
    Vivek

    Are you trying to register an Integer with the UOW? You don't have to register primitives. Odds are you're not doing this, but this exception will still be thrown if you have accidentally mapped a DTF as a 1-1 (i.e, if an Order has a price that is an Integer and you accidentally have it as a 1-1 mapping). Or, if you have a 1-M relationship and an Integer gets into the collection. Etc.
    In a nutshell, this error is saying that somehow you have an Integer where TopLink is expecting some sort of business class mapped.
    - Don

  • [JPA] Exception Description: Missing meta data

    I'm getting the following error message trying to compile a simple EE App that
    contains a single Entity Class.
    Exception Description: Missing meta data for class [java.lang.Integer].
    Ensure the class is not being excluded from your persistence unit by a
    <exclude-unlisted-classes>true</exclude-unlisted-classes> setting.
    If this is the case, you will need to include the class directly by adding a
    <class>[java.lang.Integer]</class> entry for your persistence-unit.That class contains a private Map<Long, Integer> list and I'm using SJSAS 9 and NetBeans 5.5.
    Thanks in advance,
    Stefano

    I'm also experiencing this problem.
    I'm pretty sure the cause of this is your "Map<Long, Integer>" and my "List<Integer>".
    Doesn't GlassFish implement this JPA specification?
    I see the post is been unreplied for a month: Please, somebody help us!
    Tks,
    Raul Oliver

  • Missing descriptor for [class com.... (In EJB Context)

    After a hot redeploy am getting this exception... Basically Toplink cannot find any desriptor classes any more.
    Used to work fine in weblogic 6.1, not working any more in weblogic 8.1.
    I do have this code to tell Toplink to get descriptor classes from current class loader:
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    Server s = SessionManager.getManager().getSession(SESSION_NAME, cl);
    And no, putting my classes in weblogic classpath is NOT an option for me.
    Thanks,
    - Rustam -

    I assume this is your ejbRemove of a SessionBean. This is probably not a good idea, the session is normally shared by mutliple session bean instances (normally you do not have a single session bean). This means that in a concurrent system you could be removing the session that other instances of the session bean are using. Also every time a new session bean is created it will have to rebuild the entire session and have an empty cache.
    It would be better to do something like have a getSession() method on your session bean or your app that was used to access the TopLink. It should then refresh this session when the app is redeployed.
    i.e.
    static boolean hasSession = false;
    public Session getSession() {
    if (! hasSession) {
    return SessionManager.getManager().getSession(getClass().getClassLoader(), "TOPS", true, true);
    return SessionManager.getManager().getSession(getClass().getClassLoader(), "TOPS");

  • EclipseLink JPA 2: Missing Descriptor

    Hi All,
    I have a SessionBean that, when initialized, also initializes a LookupJpaController class. Here is the code for LookupJpaController:
    public class LookupJpaController {
    private static final String _QueryGetLookupForUI =
    "SELECT l "
    + "FROM lookup l "
    + "WHERE l.lookup_type = :LookupType "
    + "AND lookup_domain = :Domain";
    public List<SelectItem> getLookupForUI(enumLookupType lookupType, String domain) throws Exception {
    if (domain == null || domain.trim().equals(""))
    throw new Exception("Parameter domain cannot be null or empty.");
    else if (!this.isInitialized())
    throw new Exception("Entity Manager not set.");
    Query query = this._EM.createNativeQuery(_QueryGetLookupForUI, Lookup.class);
    query.setParameter("LookupType", lookupType.toString());
    query.setParameter("Domain", domain.trim());
    List<SelectItem> selectItems = null;
    List<Lookup> lookupList = (List<Lookup>) query.getResultList();
    if (lookupList == null || lookupList.size() < 1)
    return null;
    else {
    selectItems = new ArrayList<SelectItem>(lookupList.size());
    for (Lookup lookUp : lookupList) {
    selectItems.add(new SelectItem(lookUp.getLookupValue(), lookUp.getLookupName()));
    return selectItems;
    When LookupJpaController is called with the following parameters ("Global", "Compound/Project Code"), it fails with the following exception:
    Caused by: Exception [EclipseLink-6007] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.QueryException
    Exception Description: Missing descriptor for [class Novartis.OTM.Data.Db.Entities.Lookup].
    Query: ReadAllQuery(referenceClass=Lookup sql="SELECT l FROM lookup l WHERE l.lookup_type = :LookupType AND lookup_domain = :Domain")
    at org.eclipse.persistence.exceptions.QueryException.descriptorIsMissing(QueryException.java:433)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkDescriptor(ObjectLevelReadQuery.java:660)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.prePrepare(ObjectLevelReadQuery.java:1895)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:748)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:681)
    at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:619)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:958)
    at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:432)
    at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1021)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2857)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
    at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1181)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:453)
    at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:681)
    at Novartis.OTM.Data.Db.Controllers.LookupJpaController.getLookupForUI(LookupJpaController.java:92)
    at Novartis.OTM.Data.DataManager.getLookupForUI(DataManager.java:59)
    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 org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
    at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
    at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
    at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
    at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
    at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
    at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:201)
    ... 81 more
    I don't understand what is going on here as my entity Lookup is there and this code also jives with Pro JPA 2.0, written by Oracle gurus. Thanks!
    Chris
    Edited by: user10773481 on Feb 11, 2011 8:37 AM
    Edited by: user10773481 on Feb 11, 2011 8:43 AM
    Edited by: user10773481 on Feb 11, 2011 12:10 PM

    Chris,
    At first glance, your code looks fine. I assume that you are injecting your (this._EM) entityManager on your session bean via the @PersistenceContext DI annotation. If so can you verify that your entity is getting processed on the predeploy of your ear. Or check the metamodel on the EM or EMF (you don't need to enable JPA 2 in persistence.xml) and see if your model is loaded there correctly.
    From your logs and the fact that you are using SVN rev# 6600 (2.0.1.v20100213-r6600) - it looks like you are using GlassFish 3.0.1.
    The following changes to your persistence.xml will enable finer logs so that you can see metadata processing and verify that your descritors are being loaded (they should be if you are running on the container - unless you are using multiple locations)
          <property name="eclipselink.logging.level" value="FINEST"/>
          <!-- enable SQL parameter binding visibility logging to override ER 329852 -->
          <property name="eclipselink.logging.parameters" value="true"/>thank you
    Michael O'Brien
    http://www.eclipselink.org

  • Missing Descritpor for One to One Mapping

    Hi,
    I have a one to one mapping from an Object A to Object B. When I execute the code, I get an exception as given below. Has any one encountered the same problem ?
    Appreciate your help.
    Thanks
    Priya
    Local Exception Stack:
    Exception [TOPLINK-7009] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): oracle.toplink.exceptions.ValidationException
    Exception Description: Missing descriptor for [class oracle.toplink.indirection.ValueHolder]. Verify that the descriptor has been properly registered with the Session.
         at oracle.toplink.exceptions.ValidationException.missingDescriptor(ValidationException.java:599)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3086)
         at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:50)
         at oracle.toplink.internal.indirection.BasicIndirectionPolicy.cloneAttribute(BasicIndirectionPolicy.java:82)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:160)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2261)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3093)
         at com.starkey.cqm.dao.PersistenceManager.createObject(PersistenceManager.java:65)
         at com.starkey.cqm.bcs.AdminService.saveRoute(AdminService.java:217)
         at com.starkey.cqm.web.RouteAction.processCreate(RouteAction.java:183)
         at com.starkey.cqm.web.AdminAction.execute(AdminAction.java:50)

    Looks like you've mapped from ObjectA to ObjectB but accidentally set the target class to be ValueHolder. Except for the checkbox in the Mapping Workbench, you shouldn't need to specify ValueHolder in any of your mappings.

  • Descriptor exception for "missing mapping for field"

    I am using TopLink 9.0.3, oracle database 9, JVM 1.4.
    I got one DescirptorException that states that the descriptor misses mapping for one database field.
    However I have such field mapped through workbench.
    The is the exception.
    -----------------exception-----------------------
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-45] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.DescriptorException
    EXCEPTION DESCRIPTION: Missing mapping for field [DatabaseField(DEVICEDB.DEVICEID)].
    DESCRIPTOR: Descriptor(ContactDB --> [DatabaseTable(DEVICEDB)])
    at oracle.toplink.exceptions.DescriptorException.missingMappingForField(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.extractValueFromObjectForField(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.extractValueFromObjectForField(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.extractForeignKeyFromReferenceObject(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.executeBatchQuery(Unknown Source)
    at oracle.toplink.mappings.OneToManyMapping.extractResultFromBatchQuery(Unknown Source)
    at oracle.toplink.internal.indirection.NoIndirectionPolicy.valueFromBatchQuery(Unknown Source)
    at oracle.toplink.mappings.ForeignReferenceMapping.batchedValueFromRow(Unknown Source)
    at oracle.toplink.mappings.ForeignReferenceMapping.valueFromRow(Unknown Source)
    at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(Unknown Source)
    at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectsInto(Unknown Source)
    at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(Unknown Source)
    at oracle.toplink.queryframework.ReadAllQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
    at oracle.toplink.threetier.ServerSession.internalExecuteQuery(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
    at oracle.toplink.internal.indirection.QueryBasedValueHolder.instantiate(Unknown Source)
    at oracle.toplink.internal.indirection.DatabaseValueHolder.getValue(Unknown Source)
    at oracle.toplink.indirection.IndirectList.buildDelegate(Unknown Source)
    at oracle.toplink.indirection.IndirectList.getDelegate(Unknown Source)
    at oracle.toplink.indirection.IndirectList.isEmpty(Unknown Source)
    The is my mapping file for DeviceDB and ContactDB. The ContactDB is a subclass of the DeviceDB.
    Clearly from the mapping below, the DeviceDB has a mapping for the database filed DeviceID.
    The ContactDB is a subclass of DeviceDB. Therefore the ContactDB also should have a mapping for
    database field deviceID
    ----------------------- partial mapping file for DeviceDB----------
    public Descriptor buildDeviceDBDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(DeviceDB.class);
         descriptor.addTableName("DEVICEDB");
         descriptor.addPrimaryKeyFieldName("DEVICEDB.DBID");
         // Inheritance properties.
         descriptor.getInheritancePolicy().setClassIndicatorFieldName("DEVICEDB.CLASS");
         descriptor.getInheritancePolicy().addClassIndicator(ContactDB.class, "c");
         descriptor.getInheritancePolicy().addClassIndicator(ContentDB.class, "f");
         OneToOneMapping deviceMapping = new OneToOneMapping();
         deviceMapping.setAttributeName("device");
         deviceMapping.setReferenceClass(Device.class);
         deviceMapping.setRelationshipPartnerAttributeName("databases");
         deviceMapping.dontUseIndirection();
         deviceMapping.readOnly();
         deviceMapping.addForeignKeyFieldName("DEVICEDB.DEVICEID", "DEVICE.DEVICEID");
         descriptor.addMapping(deviceMapping);
         return descriptor;
    ---------------------------partial mapping for ContactDB --------------
    public Descriptor buildContactDBDescriptor() {
         Descriptor descriptor = new Descriptor();
         descriptor.setJavaClass(com.access.sync.business.contact.ContactDB.class);
         descriptor.addTableName("DEVICEDB");
         // Inheritance properties.
         descriptor.getInheritancePolicy().setParentClass(com.access.sync.framework.systemObj.DeviceDB.class);
    Any help is really appreciated.
    jason

    Your 1-1 mapping must not be read-only.
    deviceMapping.readOnly();Read-only means the mapping will not write the field, and should only be used when another mapping does write the field.

  • Missing mapping for field error

    Here is the set up:
    Person extends Party using InheritanceType.JOINED
    Household extends Party_Relationship using InheritanceType.JOINED
    Household has a Set of Persons mapped One to Many unidirectional
    When I use PrimaryKeyJoinColumn on the Person and/or Household to rename the column say to PERSON_POID instead of PARTY_POID and when adding Persons to the Household Set the following error occurs:
    oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Missing mapping for field [PERSON.PARTY_POID].
    Descriptor: RelationalDescriptor(com.dhsnet.cms.domain.Person --> [DatabaseTable(PARTY), DatabaseTable(PERSON)])
    What am I missing? If I do not use the PrimaryKeyJoinColumn mapping this error does not occur. I am stumped! Any help is greatly appreciated.
    Here are the mappings:
    @Entity
    @TableGenerator(name="party", table="generator", pkColumnName="table_name",
    valueColumnName="key_value", pkColumnValue="party", allocationSize=1)
    @Table(name="PARTY")
    @Inheritance(strategy=InheritanceType.JOINED)
    @DiscriminatorColumn(name = "PARTY_TYPE")
    public abstract class Party extends AbstractEntity{
    @Entity
    @DiscriminatorValue("PERSON")
    @PrimaryKeyJoinColumn(name="PERSON_POID")
    public class Person extends Party{
    @Entity
    @Table(name="PARTY_RELATIONSHIP")
    @TableGenerator(name="party_relationship", table="generator", pkColumnName="table_name",
    valueColumnName="key_value", pkColumnValue="party_relationship", allocationSize=1)
    @Inheritance(strategy = InheritanceType.JOINED)
    @DiscriminatorColumn(name = "PARTY_RELATIONSHIP_TYPE", discriminatorType=DiscriminatorType.STRING)
    public abstract class PartyRelationship extends AbstractEntity {
    @Entity
    @DiscriminatorValue(value="HOUSEHOLD")
    @PrimaryKeyJoinColumn(name="HOUSEHOLD_POID")
    public class Household extends PartyRelationship {
    On the Household Object:
    @OneToMany
    @JoinTable(joinColumns = @JoinColumn(name="HOUSEHOLD_POID"),
    inverseJoinColumns = @JoinColumn(name="PERSON_POID"))
    protected Set<Person> getMembers() {
    return members;
    }

    This looks to be the same/related issue that has already been entered. See
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=1586
    The alternative like you mentioned, is to not use a PrimaryKeyJoinColumn to rename the column in the joined inheritance case.
    Cheers,
    Guy

  • Missing class for indicator field value [changed-fields-locking-policy]

    -------<br>
    Edit:<br>
    Please, ignore the post below. I found the problem here. The real problem is reported in my other post.<br>
    -------<br>
    <br>
    Hello,<br>
    <br>
    In order to test the optimistic locking by fields, I created a very simple TopLink project via the TopLink Workbench. It only consists of one table that was mapped via TopLink's own "Add or Update Existing Tables from Database". I made no modifications to the automatically generated mappings.<br>
    <br>
    After I set up the rest of the project, I ran it and it ran okay.<br>
    <br>
    Then I went to the table descriptor, then to the "Locking" tab, and then I selected "Optimistic Locking" -> "By Fields" -> "Changed Fields".<br>
    <br>
    That was ALL I changed.<br>
    <br>
    And when I tried to run the project this time, I got the following exception:
    <blockquote>
    Exception [TOPLINK-43] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Missing class for indicator field value [toplink:changed-fields-locking-policy] of type [class java.lang.String].<br>
    Descriptor: XMLDescriptor(oracle.toplink.descriptors.VersionLockingPolicy --> [DatabaseTable(locking-policy)])<br>
         at oracle.toplink.exceptions.DescriptorException.missingClassForIndicatorFieldValue(DescriptorException.java:878)<br>
         at oracle.toplink.internal.ox.QNameInheritancePolicy.classFromRow(QNameInheritancePolicy.java:109)<br>
         at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:150)<br>
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
         at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
         at oracle.toplink.ox.mappings.XMLCompositeCollectionMapping.buildCompositeObject(XMLCompositeCollectionMapping.java:157)<br>
         at oracle.toplink.mappings.foundation.AbstractCompositeCollectionMapping.valueFromRow(AbstractCompositeCollectionMapping.java:735)<br>
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1012)<br>
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:241)<br>
         at oracle.toplink.internal.ox.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:128)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:284)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:265)<br>
         at oracle.toplink.internal.ox.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:152)<br>
         at oracle.toplink.ox.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:339)<br>
         at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:162)<br>
         at oracle.toplink.tools.workbench.XMLProjectReader.read(XMLProjectReader.java:209)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:307)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)<br>
         at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)<br>
         at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
    </blockquote>
    Can anybody tell me what that means? And why do I see "VersionLockingPolicy" in the stack trace? I explicitly specified locking "By Fields".<br>
    <br>
    Here's a fragment from the project XML file:
    <blockquote>
    <toplink:locking xsi:type="toplink:changed-fields-locking-policy"/>
    </blockquote>
    Is this a TopLink bug or am I doing something wrong? (By the way, if I choose optimistic locking by "All fields", it works. But locking by "Changed fields" doesn't.)<br>
    <br>
    Best regards,<br>
    Bisser
    Message was edited by:
    bisser

    Ooooops, sorry, guys!
    I was using TopLink 10.1.3.0 JARs to run a project created via TopLink 10.1.3.1 Workbench. That was the reason for the exception.
    I ran across the REAL problem, however. The one that was occurring when I created the TopLink project via JDeveloper 10.1.3.1 and ran it via JDeveloper 10.1.3.1. That's why I decided to try with TopLink 10.1.3.1 Workbench instead of JDeveloper 10.1.3.1.
    I will report the problem in a clean separate post.

  • Exception Description: No conversion value provided for the attribute

    Hi!,
    The following is printed when I try to persist an entity with a an enum attribute in it. It deployted succuessfully and mapped fine a table, my configuration is, Windows2003, SJSAS 9 FCS, Derby DB.
    Exception [TOPLINK-115] (Oracle TopLink Essentials - 2006.4 (Build 060412)): ora
    cle.toplink.essentials.exceptions.DescriptorException
    Exception Description: No conversion value provided for the attribute [NEW].
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMapping[status-->REPORT
    .STATUS]
    Descriptor: RelationalDescriptor(com.namespace1.reports.persistence.Report --> [
    DatabaseTable(REPORT)])
    The Entity class is the following:
    * Report.java
    * Created on 25 ����� �����, 2006, 06:07 �
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.namespace1.reports.persistence;
    import java.io.*;
    import java.util.*;
    import javax.persistence.*;
    * @author Administrator
    @javax.persistence.Entity(name="Report")//name used in EJB-QL.
    public class Report implements Serializable {
    public enum ReportStatus{
    NEW,
    OPEN,
    SUBMITTED,
    ACCEPTED,
    REJECTED
    @javax.persistence.Id
    @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
    private long id;
    @Transient
    private int currentEntryId;
    @Column(length=256)
    private String title;
    private String ownerName;
    @Enumerated(EnumType.ORDINAL)
    @Basic
    private ReportStatus status;
    @OneToMany(mappedBy="report",targetEntity=ReportEntry.class,cascade=CascadeType.ALL)
    private Map<Integer,ReportEntry> reportEntries;
    /** Creates a new instance of Report */
    public Report() {
    public long getId() {
    return id;
    public void setId(long id) {
    this.id = id;
    public int hashCode() {
    int hash = 0;
    hash += (int)getId();
    return hash;
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof Report)) {
    return false;
    Report other = (Report)object;
    if (this.getId() != other.getId()) return false;
    return true;
    public String toString() {
    return "com.namespace1.reports.persistence.Report[id=" + getId() + "]";
    public int getCurrentEntryId() {
    return currentEntryId;
    public void setCurrentEntryId(int currentEntryId) {
    this.currentEntryId = currentEntryId;
    public String getTitle() {
    return title;
    public void setTitle(String title) {
    this.title = title;
    public String getOwnerName() {
    return ownerName;
    public void setOwnerName(String ownerName) {
    this.ownerName = ownerName;
    public ReportStatus getStatus() {
    return status;
    public void setStatus(ReportStatus status) {
    this.status = status;
    public Map<Integer, ReportEntry> getReportEntries() {
    return reportEntries;
    public void setReportEntries(Map<Integer, ReportEntry> reportEntries) {
    this.reportEntries = reportEntries;
    }

    This problem is side effect of issue 193 (https://glassfish.dev.java.net/issues/show_bug.cgi?id=193) and is described in details in issue 634 (https://glassfish.dev.java.net/issues/show_bug.cgi?id=634). Your choices are to use the work around described in the above issue or switch to the GlassFish build with the fix.
    regards,
    -marina

  • Exception [TOPLINK-48] Multiple writable mappings exist for field

    Hi All
    I am quite new to JPA and Toplink and I am trying to write simple JPA application using toplink essentials as the persistence provider however, when I comppile the code, get errors below saying that Multiple writable mappings exist for a given field i.e. http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. The thing is, I havent tried to map this field i.e. J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE to multiple maps so I'm a bit confused as to why I'm getting this error. I have attached all the the associated code and error messages. I was hoping that some one will be able to help. I am using Eclipse Galileo and OC4j Standalone 10.1.3.4
    The error are
    Runtime Exceptions:
    ; nested exception is:
    javax.persistence.PersistenceException: Exception TOPLINK-0 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://branch_Addr_Road_Name-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://bankName-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    Exception TOPLINK-48 (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field http://J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMappinghttp://branch_Addr_Locality-->J2EEUSER.BANKS.BRANCH_ADDR_POSTCODE
    Descriptor: RelationalDescriptor(com.gworx.Bank --> http://DatabaseTable(J2EEUSER.BANKS))
    The entity class is
    package com.gworx;
    import java.io.Serializable;
    import javax.persistence.*;
    import javax.persistence.CascadeType;
    @Entity
    @IdClass(BankPK.class)
    @Table(name = "BANKS", schema = "J2EEUSER")
    public class Bank implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "BRANCH_SORTCODE", nullable = false, precision = 6, insertable=false, updatable=false)
    long sortcode;
    @Basic()
    @Column(name = "BANK_NAME", nullable = false, insertable=false, updatable=false)
    String bankName;
    @Basic()
    @Column(name = "BRANCH_NAME", nullable = false, insertable=false, updatable=false)
    String branchName;
    @Basic()
    @Column(name = "BRANCH_ADDR_HOUSE_NAME", nullable = false, insertable=false, updatable=false)
    String branch_Addr_House_Name;
    @Basic()
    @Column(name = "BRANCH_ADDR_ROAD_NAME",nullable = false, insertable=false, updatable=false)
    String branch_Addr_Road_Name;
    @Basic()
    @Column(name = "BRANCH_ADDR_LOCALITY", nullable = false, insertable=false, updatable=false)
    String branch_Addr_Locality;
    @Basic()
    @Column(name = "BRANCH_ADDR_CITY",nullable = false, insertable=false, updatable=false)
    String branch_Addr_City;
    @OneToOne(cascade=CascadeType.ALL)
    @Basic()
    @Column(name = "BRANCH_ADDR_POSTCODE", nullable = false)
    String branch_Addr_Postcode;
    public Bank(){}
    public Bank(
    String bankName,
    String branchName,
    long sortcode,
    String branch_Addr_House_Name,
    String branch_Addr_Road_Name,
    String branch_Addr_Locality,
    String branch_Addr_City,
    String branch_Addr_Postcode)
    this.bankName=bankName;
    this.sortcode=sortcode;
    this.branchName = branchName;
    this.branch_Addr_House_Name=branch_Addr_House_Name;
    this.branch_Addr_Road_Name=branch_Addr_Road_Name;
    this.branch_Addr_Locality=branch_Addr_Locality;
    this.branch_Addr_City=branch_Addr_City;
    this.branch_Addr_Postcode=branch_Addr_Postcode;
    public void setSortcode(long sortcode){
    this.sortcode =sortcode;
    public long getSortCode(){
    return this.sortcode;
    The PK class is
    public class BankPK implements Serializable {
    public long sortcode;
    public BankPK(long sortcode){
    this.sortcode = sortcode;
    public boolean equals(Object obj){
    if(obj==null || !(obj instanceof BankPK)){
    return false;
    else if (((BankPK)obj).sortcode ==sortcode)
    return true;
    else
    return false;
    public int hashCode(){
    StringBuffer buff = new StringBuffer();
    buff.append(sortcode);
    int hashCode =buff.hashCode();
    return hashCode;
    My stateless session bean that I use to create to create the entity is
    package com.gworx;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.*;
    import javax.ejb.Remote;
    import com.gworx.BankBeanRemote;
    @Stateless
    public class BankBean implements BankBeanRemote {
    @PersistenceContext
    EntityManager entMgr;
    public Account account;
    long sortcode, cust_id;
    //Bank Details
    String bankName,branchName,branch_Addr_House_Name,
    branch_Addr_Road_Name,branch_Addr_Locality,
    branch_Addr_City, branch_Addr_Postcode;
    public BankBean() {
    // TODO Auto-generated constructor stub
    // entMgr=emf.createEntityManager();
    public void make_A_Bank(
    String bankName,
    String branchName,
    long sortcode,
    String branch_Addr_House_Name,
    String branch_Addr_Road_Name,
    String branch_Addr_Locality,
    String branch_Addr_City,
    String branch_Addr_Postcode
    this.sortcode=sortcode;
    this.bankName =bankName;
    this.branchName = branchName;
    this.branch_Addr_House_Name=branch_Addr_House_Name;
    this.branch_Addr_Road_Name=branch_Addr_Road_Name;
    this.branch_Addr_Locality=branch_Addr_Locality;
    this.branch_Addr_City=branch_Addr_City;
    this.branch_Addr_Postcode=branch_Addr_Postcode;
    Bank bank = new Bank( bankName,branchName,sortcode,branch_Addr_House_Name,
    branch_Addr_Road_Name,branch_Addr_Locality,
    branch_Addr_City, branch_Addr_Postcode);
    entMgr.persist(bank);
    }

    Hi quophyie,
    try removing the @OneToOne annotation, after all your postcode is just a string, there's nothing to cascade.
    And it would help a lot if you formatted your code.
    Zsom

Maybe you are looking for

  • Can't insert text

    The Text tool just draws a flat line. Is there a setting that I may have accidentally changed? I have worked on this for many hours and have given up so thought maybe someone on the forum could help me. Thank-you.

  • Timed Out Requests

    I turned on performance monitoring on our CF server this morning to hunt down a slowdown and noticed that the counter for timed out requests is constantly sitting at 125 no matter what any of the other counters do. Is this normal or is this an indica

  • J2EE Engine Status in R3

    Hello, Can anyone tell me how to check the status of J2EE engine thorugh R3?. Is there any T-code which shows that? Thanks& Regards, Joby

  • Trial question:  Can't open .doc files from web page

    I'm using Dreamweaver on a Mac, and I have a link on a page that should bring up a doc file. When I preview the page in Safari, it brings up a directory listing which highlights the file so that you can double-click and open the file. (Of course, I'd

  • Accessing G3 from Mac Pro

    I can't seem to figure out how to access my ethernet networked G3, running OS 9.1 from my Mac Pro. File sharing is turned on on the G3. Had no probs doing this from my old 3400 also running 9. I want to do a manual transfer/house cleaning of everythi