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

Similar Messages

  • SAP MaxDB and EclipseLink/JPA?

    Folks;
    is anyone out here using MaxDB along with EclipseLink JPA 2.0 implementation, especially as far as it concerns automatic table creation using predefined @Entity classes? So far, I mainly happened to see a whole load of different error messages but yet haven't found a way of getting things to work cleanly, like, at the moment:
    Call: ALTER TABLE S_CFG_SS_CFG_ATTS ADD CONSTRAINT FK_S_CFG_SS_CFG_ATTS_atts_ID FOREIGN KEY (atts_ID) REFERENCES SS_CFG_ATTS (ID)
    Query: DataModifyQuery(sql="ALTER TABLE S_CFG_SS_CFG_ATTS ADD CONSTRAINT FK_S_CFG_SS_CFG_ATTS_atts_ID FOREIGN KEY (atts_ID) REFERENCES SS_CFG_ATTS (ID)")
    [EL Warning]: 2009-11-24 12:25:30.376--ServerSession(30633470)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091031-r5713): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: com.sap.dbtech.jdbc.exceptions.DatabaseException: [-5016] (at 71): Missing delimiter: )
    Error Code: -5016
    Does anyone around here know how (if so) to get EclipseLink to behave well teaming with MaxDB?
    TIA and all the best,
    Kristian

    Please check for the official EclipseLink MaxDB support. You might want to post this question to the Eclipse forum.
    [http://wiki.eclipse.org/EclipseLink/Development/DatabasePlatform/MaxDBPlatform]
    Harald

  • Eclipselink JPA error

    Hi,
    I'm using Oracle JDeveloper 11.1.2.2.0 and the eclipselink JPA provider (integrated in Toplink library). I can run my web application in IDE. However, when I deployed my application to the embedded WLS via a WAR file, I got the following error:
    Exception [EclipseLink-4021] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Unable to acquire a connection from driver [null], user [null] and URL [null]. Verify that you have set the expected driver class and URL. Check your login, persistence.xml or sessions.xml resource. The jdbc.driver property should be set to a class that is compatible with your database platform
    I compared the files in the WAR directory (AppData\Roaming\JDeveloper\system11.1.2.2.39.61.83.1\o.j2ee\drs\GCLD\GCLDWebWebApp.war\*.*. The directory was created when I run my app in the IDE) with the WAR file. The only difference I could find is the IDE added the following informatoin to the weblogic.xml (other files such as persistence.xml, web.xml, applicationContext.xml and library files are identical):
    <jsp-descriptor>
    <debug>true</debug>
    <working-dir>/D:/JDeveloper/mywork/GCLD/GCLDWeb/target/classes/.wlsjsps/</working-dir>
    <keepgenerated>false</keepgenerated>
    </jsp-descriptor>
    My persistence.xml is below. The datasource has been tested and working if I start my application in IDE.
    <?xml version="1.0" encoding="UTF-8"?>
    <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="GCLDWeb">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/GCLD-DS</jta-data-source>
    <class>gov.noaa.gcld.model.jpa.Users</class>
    <properties>
    <property name="eclipselink.logging.level" value="FINE"/>
    </properties>
    </persistence-unit>
    </persistence>
    I wonder what magic that the IDE did if I start my application in the IDE, could I resolve the issue in WAR/EAR file?
    Thanks for your help!

    Hi Shay,
    The datasource has been configured in the weblogic server. The issue is because I didn't specify the type of the entity manager. For some reason the persistence unit was calling the resource-local entity manager. The driver error has been fixed after I added "transaction-type" to the persistence-unit (see below):
    <persistence-unit name="GCLDWeb" transaction-type="JTA">
    However, the WAR file works only on a fresh start of the WebLogic server (no error encountered in the web application). If I undeploy then redeploy using the same WAR file, I get a very strange error:
    "gov.noaa.gcld.model.jpa.Users cannot be cast to gov.noaa.gcld.model.jpa.Users"
    The same entity bean cannot be cast to the same object. The error will disappear after I terminate the WebLogic server then do a fresh start. Some people said this might be a class loader issue. I wonder why the WLS couldn't close the entity manager or release the loaded manager class when we undeploy the application.
    Thanks very much for your help!

  • EclipseLink + JPA + Generic Entity + SINGLE_TABLE Inheritance

    I was wondering if it's possible in JPA to define a generic entity like in my case PropertyBase<T> and derive concrete entity classes like ShortProperty and StringProperty and use them with the SINGLE_TABLE inheritance mode? If I try to commit newly created ElementModel instances (see ElementModelTest) over the EntityManager I always get an NumberFormatException that "value" can't be properly converted to a Short. Strangely enough if I define all classes below as inner static classes of my test case class "ElementModelTest" this seems to work. Any ideas what I need to change to make this work?
    I'm using EclipseLink eclipselink-2.6.0.v20131019-ef98e5d.
    public abstract class PersistableObject
        implements Serializable {
        private static final long serialVersionUID = 1L;
        private String id = UUID.randomUUID().toString();
        private Long version;
        public PersistableObject() {
               this(serialVersionUID);
        public PersistableObject(final Long paramVersion) {
              version = paramVersion;
        public String getId() {
    return id;
        public void setId(final String paramId) {
      id = paramId;
        public Long getVersion() {
    return version;
        public void setVersion(final Long paramVersion) {
      version = paramVersion;
        public String toString() {
      return this.getClass().getName() + "[id=" + id + "]";
    public abstract class PropertyBase<T> extends PersistableObject {
        private static final long serialVersionUID = 1L;
        private String name;
        private T value;
        public PropertyBase() {
    this(serialVersionUID);
        public PropertyBase(final Long paramVersion) {
      this(paramVersion, null);
        public PropertyBase(final Long paramVersion, final String paramName) {
      this(paramVersion, paramName, null);
        public PropertyBase(final Long paramVersion, final String paramName, final T paramValue) {
      super(paramVersion);
      name = paramName;
      value = paramValue;
        public String getName() {
    return name;
        public void setName(final String paramName) {
      name = paramName;
        public T getValue() {
    return value;
        public void setValue(final T paramValue) {
      value = paramValue;
    public class ShortProperty extends PropertyBase<Short> {
        private static final long serialVersionUID = 1L;
        public ShortProperty() {
    this(null, null);
        public ShortProperty(final String paramName) {
      this(paramName, null);
        public ShortProperty(final String paramName, final Short paramValue) {
      super(serialVersionUID, paramName, paramValue);
    public class StringProperty extends PropertyBase<String> {
        private static final long serialVersionUID = 1L;
        protected StringProperty() {
    this(null, null);
        public StringProperty(final String paramName) {
      this(paramName, null);
        public StringProperty(final String paramName, final String paramValue) {
      super(serialVersionUID, paramName, paramValue);
    public class ElementModel extends PersistableObject {
        private static final long serialVersionUID = 1L;
        private StringProperty name = new StringProperty("name");
        private ShortProperty number = new ShortProperty("number");
        public ElementModel() {
    this(serialVersionUID);
        public ElementModel(final Long paramVersion) {
      super(paramVersion);
        public String getName() {
      return name.getValue();
        public void setName(final String paramName) {
      name.setValue(paramName);
        public Short getNumber() {
      return number.getValue();
        public void setNumber(final Short paramNumber) {
      number.setValue(paramNumber);
    <?xml version="1.0" encoding="UTF-8" ?>
    <entity-mappings version="2.1"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd">
    <mapped-superclass
      class="PersistableObject">
      <attributes>
      <id name="id">
      <column name="id" />
      </id>
      <version name="version" access="PROPERTY">
      <column name="version" />
      </version>
      </attributes>
    </mapped-superclass>
    <entity class="PropertyBase">
      <table name="PropertyBase" />
      <inheritance />
      <discriminator-column name="type"/>
      <attributes>
      <basic name="name">
      <column name="name" />
      </basic>
      <basic name="value">
      <column name="value" />
      </basic>
      </attributes>
    </entity>
    <entity class="StringProperty">
      <discriminator-value>StringProperty</discriminator-value>
    </entity>
    <entity class="ShortProperty">
      <discriminator-value>ShortProperty</discriminator-value>
    </entity>
    <entity class="ElementModel">
      <table name="ElementModel" />
      <inheritance />
      <discriminator-column name="type"/>
      <attributes>
      <one-to-one name="name">
      <join-column name="name" referenced-column-name="id" />
      <cascade>
      <cascade-all />
      </cascade>
      </one-to-one>
      <one-to-one name="number">
      <join-column name="number" referenced-column-name="id" />
      <cascade>
      <cascade-all />
      </cascade>
      </one-to-one>
      </attributes>
    </entity>
    </entity-mappings>
    public class ElementModelTest extends ModelTest<ElementModel> {
        public ElementModelTest() {
      super(ElementModel.class);
        @Test
        @SuppressWarnings("unchecked")
        public void testSQLPersistence() {
      final String PERSISTENCE_UNIT_NAME = getClass().getPackage().getName();
      new File("res/db/test/" + PERSISTENCE_UNIT_NAME + ".sqlite").delete();
      EntityManagerFactory factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
      EntityManager em = factory.createEntityManager();
      Query q = em.createQuery("select m from ElementModel m");
      List<ElementModel> modelList = q.getResultList();
      int originalSize = modelList.size();
      for (ElementModel model : modelList) {
          System.out.println("name: " + model.getName());
      System.out.println("size before insert: " + modelList.size());
      em.getTransaction().begin();
      for (int i = 0; i < 10; ++i) {
          ElementModel device = new ElementModel();
          device.setName("ElementModel: " + i);
        device.setNumber((short) i);
          em.persist(device);
      em.getTransaction().commit();
      modelList = q.getResultList();
      System.out.println("size after insert: " + modelList.size());
      assertTrue(modelList.size() == (originalSize + 10));
      em.close();

    This was answered in a cross post here java - EclipseLink + JPA + Generic Entity + SINGLE_TABLE Inheritance - Stack Overflow
    Short answer: No, it shouldn't work as the underlying database field type would be constant.  So either the Short or the String would have problems converting to the database type if they both mapped to the same table field. 

  • How to use Oracle Virtual Private Database (VPD) with EclipseLink JPA

    My project required to use VPD in database to isolate data access based on different user type. How can I use EclipseLink JPA with VPD? For instance, how I could set up server context in database for each database session? Thanks for any help.

    There is some information on Oracle proxy authentication here,
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/Oracle/Proxy
    VPD usage would be very similar.
    James : http://www.eclipselink.org : http://en.wikibooks.org/wiki/Java_Persistence

  • [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.

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • 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

  • CURRENT_DATE  in EclipseLink/JPA

    When I use CURRENT_DATE in JPA queries for date comparisions, it seems to be taking time into consideration as well. So when I comapre a date with CURRENT_DATE, even though the date I am comparing is today's date, the results state that CURRENT_DATE is greater because it takes the current time into consideration. Based on docs CURRENT_DATE in JPA queries is for Date only.
    CURRENT_DATE: Returns the current date.
    CURRENT_TIME: Returns the current time.
    CURRENT_TIMESTAMP: Returns the current timestamp.
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13946/ejb3_overview_query.html
    My query
    SELECT a FROM Approval a WHERE a.dateRange.endDate >= CURRENT_DATE
    In this case even though the endDate is todays's date, I get no results back because the end date has only date while the CURRENT_DATE has teh current time stamp as well.
    I would gretaly appreciate it if anyone has some ideas about this and can help me.

    What database are you running against? The platform should be auto-detected but you may need to set the property "eclipselink.target-database" in your persistence.xml file.

  • EclipseLink JPA multitenancy

    I am using EclipseLink to auto populate the column on inserts. (column i want it to auto update is COMPANY_ID)
    Table is like
    COMPANY_ID
    EMPLOYEE_ID
    NAME
    SALARY
    AGE
    My entity is
    @Entity
    @NamedQueries({
    @NamedQuery(name = "EmployeeVpd1.findAll", query = "select o from EmployeeVpd1 o")
    @Table(name = "EMPLOYEE_VPD_1")
    @Multitenant
    @TenantDiscriminatorColumn(name ="COMPANY_ID")
    public class EmployeeVpd1 implements Serializable {
    private Long age;
    @Id
    @Column(name="EMPLOYEE_ID", nullable = false)
    private Long employeeId;
    @Column(length = 30)
    private String name;
    private Long salary;
    public EmployeeVpd1() {
    public EmployeeVpd1(Long age, Long employeeId,
    String name, Long salary) {
    this.age = age;
    this.employeeId = employeeId;
    this.name = name;
    this.salary = salary;
    public Long getAge() {
    return age;
    public void setAge(Long age) {
    this.age = age;
    public Long getEmployeeId() {
    return employeeId;
    public void setEmployeeId(Long employeeId) {
    this.employeeId = employeeId;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public Long getSalary() {
    return salary;
    public void setSalary(Long salary) {
    this.salary = salary;
    Persistent class is (hard coded that tenant id to Oracle)
    <persistence-unit name="EJB">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>java:/app/jdbc/jdbc/VPDDS</jta-data-source>
    <class>ejb.EmployeeVpd1</class>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="javax.persistence.jtaDataSource"
    value="java:/app/jdbc/jdbc/VPDDS"/>
    <property name="eclipselink.jdbc.exclusive-connection.mode" value="Always" />
    <property name="eclipselink.tenant-id" value="Oracle"/>
    </properties>
    </persistence-unit>
    Java class for creating the entity and inserting it to db
    @PersistenceUnit
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("EJB");
    em=emf.createEntityManager();
    em.persist(employee1)
    Its inserting the row into the table but the COMPANY_ID is not getting set to Oracle . Its always setting to null

    Hi,
    The multitenancy feature wasn't implemented till 2.3. Can you try a more recent version?
    http://www.eclipse.org/eclipselink/downloads/nightly.php
    Cheers,
    Guy

  • JPA Namespace missing

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

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

  • 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");

  • Missing Deployment Descriptor

    Hi..
    have a little Web-Project (in Eclipse with Sun Application Server 9.1_01) for Persistence i Use Toplink. All work fine, until i change a jsp for example and eclipse do a redeploy. After this Redoploy i got the following error:
    [#|2008-03-03T16:33:32.829+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=dc10582e-b7f2-4c4e-8b24-bd0262149cdf;|StandardWrapperValve[data]: PWC1406: Servlet.service() for servlet data threw exception
    Local Exception Stack:
    Exception [TOPLINK-6007] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Missing descriptor for [class dd.entities.Dreminder].
    Query: ReadAllQuery(dd.entities.Dreminder)
         at oracle.toplink.essentials.exceptions.QueryException.descriptorIsMissing(QueryException.java:419)
         at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkDescriptor(ObjectLevelReadQuery.java:412)
         at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:494)
         at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:433)
         at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:575)
         at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
         at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
         at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
         at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
         at dd.servlets.DataManager.service(DataManager.java:43)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
         at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    |#]
    I test it in a very ! Simple Program. Just one Servlet and One Entity, her ist my Code. I hope somebody could help me.
    Entity:
    @Entity
    @Table(name="dreminder")
    public class Dreminder implements Serializable {
         @Id
         @GeneratedValue
         private int id;
    ....+ getter & setter
    My Servlet:
    @PersistenceUnit
         private EntityManagerFactory factory = Persistence.createEntityManagerFactory("default");
         @Override
         protected void service(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
              EntityManager em = factory.createEntityManager();
              Query query;
              query = em.createNativeQuery("select * from Dreminder", Dreminder.class);
              for (Dreminder reminder:(List<Dreminder>) query.getResultList()) {
                   arg1.getWriter().write("ID: " + reminder.getId());
              em.close();
    my Persistence.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <class>dd.entities.Dreminder</class>
    <properties>
    <property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:derby:C:\DerbyDatabases\dreminder2;create=true"/>
    <property name="toplink.jdbc.user" value="admin"/>
    <property name="toplink.jdbc.password" value="admin123"/>
    <property name="toplink.logging.level" value="INFO"/>
    </properties>
    </persistence-unit>
    </persistence>
    thanks for helping !!!
    D

    ...have the first mistake...i really don't know where eclipse has stored the Persistence-Unit name "default", but if i change it in persistence.xml, he get the Factory i thing. But now i have my old Problem: "missing deployment descriptor" (only with eclipse)
    Exception:
    [#|2008-03-12T16:12:27.954+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=6547fbd4-c661-4d2a-960d-e9cd78ab290d;|StandardWrapperValve[data]: PWC1406: Servlet.service() for servlet data threw exception
    Local Exception Stack: Exception [TOPLINK-6007] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.QueryException
    Exception Description: Missing descriptor for [class dd.entities.Dreminder].
    Query: ReadAllQuery(dd.entities.Dreminder)
    at oracle.toplink.essentials.exceptions.QueryException.descriptorIsMissing(QueryException.java:419)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkDescriptor(ObjectLevelReadQuery.java:412)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:494)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.checkEarlyReturn(ObjectLevelReadQuery.java:433)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:575)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
    at dd.servlets.DataManager.getData(DataManager.java:107)
    at dd.servlets.DataManager.service(DataManager.java:87)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    |#]

Maybe you are looking for

  • Iphone 5 battery draining ultra fast

    No, im not talking about the usual rapid draining here... Got a Iphone 5, iOS 7. Almost everyday the phone could show 50%  + - left, and in just a couple of minutes its down to 10% and then shortly after turns of telling me its empty, how is that pos

  • Configurable dialog with timeouts and default capabilities

    I would like to have a native LabVIEW dialog in the functions pallet that will allow you to set a default value and a time out feature.  This allows a user to pick a desired behaviour if present but if not present the dialog times out and program con

  • Copy data from one table to another

    Hello everyone, I have a student table with fields sno, sname. I created another table student1 with same fields sno, sname and with one new field class. Now i want to copy data from sno, sname of student table to sno, sname of student1 table when th

  • Is there an easy way to move multiple icons from one screen to another?

    I have multiple screens on my iphone 5c display.  I want to move multiple icons at the same time from one screen to another.  Is there a way to do this?

  • How do i add recordsets to a .dwt.asp-generated page

    help - i am at wits end..... below is code for a page (test3.asp) based on a template called "catalogue.dwt.asp". i need various recordsets on various pages based on this template. f i try to add a recordset to test3.asp, i'm told "making this change