Cannot persist detached object with @ManyToOne

I have a simple table that holds named relationships between 2 objects. I am using a @ManyToOne type from the relationship object to each of the parent and child objects.
If the parent and child have NOT already been persisted everything works fine. However if either of them have been previously persisted I fail with a "Cannot persist detached object" error. Why is this, and what is the resolution?
Through much trial and error I was never able to get em.merge to resolve the issue. However I did implement a @PrePersist and registered both parent and child in the UnitOfWork and this did make the problem go away. This 'hack' however cannot be the right solution since its not portable in any fashion across other ORM providers.
It's seems as though the Cascade.PERSIST should handle the fact that the objects have already been persisted?
The following is the relationship class:
@Entity
@Table(name="UDM_RELATIONS")
public class UdmRelationship extends UdmPersistentObject
* If the parent has not be saved then let the persist of this object take care of it.
* Don't touch the parent if this relationship is removed.
@ManyToOne(cascade=CascadeType.PERSIST)
@JoinColumn(name="PARENT_ID")
protected UdmPersistentObject parent = null;
* If the child has not be saved then let the persist of this object take care of it.
* Don't touch the parent if this relationship is removed.
@ManyToOne(cascade=CascadeType.PERSIST)
@JoinColumn(name="CHILD_ID")
protected UdmPersistentObject child = null;
* Name the relationship for easier querying and viewing of direct table data.
@Column(name="REL_NAME")
protected String relationshipName = null;
// Initialization
public UdmRelationship(String relationshipName)
this.relationshipName = relationshipName;
public UdmRelationship()
Annotation annotation = this.getClass().getAnnotation(DiscriminatorValue.class);
if ( annotation != null )
DiscriminatorValue dv = (DiscriminatorValue) annotation;
this.relationshipName = dv.value();
// Data Management
@XmlAttribute(name="type")
protected String getRelationshipName() { return this.relationshipName; }
@XmlTransient
protected UdmPersistentObject getParent() { return this.parent; }
protected void setParent(UdmPersistentObject parent) { this.parent = parent; }
@XmlTransient
protected UdmPersistentObject getChild() { return this.child; }
protected void setChild(UdmPersistentObject child) { this.child = child; }
@PrePersist
public void merge()
Server server = (Server) SessionManager.getManager().getSession("udm-tests");
Session session = (Session)server.getActiveSession();
session.acquireUnitOfWork().registerObject(this.parent);
session.acquireUnitOfWork().registerObject(this.child);
The following is the error:
junit.framework.AssertionFailedError: Unable to create Personal Contact: [Persistent Object [com.riscs.tools.data.udm.support.PersonalContact] save failed.; nested exception is javax.persistence.EntityExistsException:
Exception Description: Cannot persist detached object [com.riscs.tools.data.udm.support.Person@1f47ae8].
Class> com.riscs.tools.data.udm.support.Person Primary Key> [403]]

Hello,
I wasn't clear. Merge is used on unmanaged objects to 'merge' the changes into the managed object. If the object is new, it will return a managed copy of the object. The only difference between merge and persist when passed in a new object, is that persist makes the passed in object managed, where as merge returns a managed copy - the object passed in remains unmanaged.
As for it being a no-op - it takes a unmanaged copy of an object and returns the managed copy. It will take any changes and merge them into the managed copy, which as you said, is a no-op if there aren't changes. But your object model must have changes - you set a parent-child bidirectional relationship. Also, merge will cascade over the tree. So if you call it on your parent, and you have added a new child in say a 1:M mapping, it will persist the child - if you have the relation set to cascade merge+persist.
What are the problems you run into with merge?
As for find - depending on your options, it will hit the cache. The point is that the spec requires you to only reference managed objects. I believe this is to allow the cache to maintain object identity - it would cause problems if you read back the newly persisted child and its referenced parent was unmanaged. Any changes to the parent (such as adding the child to its collection) also need to be managed, so the only way to do that is on a managed copy -either by first using find and then making the changes or by merging the changes made to a detached copy.
Best Regards,
Chris

Similar Messages

  • JPA - Cannot Persist Detached Entity (Java EE 5)

    Hi All,
    I need your advice on identify what appears to be a persisting a detached School (ManyToMany) entity but could not understand why this is occurring:
    1.     The data supplied is made up of detail between counties and surrounding schools. There are a dozen of schools on average in any county. However, there
    will be some over-lapping schools that are a long the border of adjacent counties. For instance, county 1 consists of A, B, C, D, E, F, G, H, I, J, K, L schools while county 2
    (next to each other) is made up of M, N, B, O, P, Q, R, E, S, T, U, H schools. The common ones are B, E and H and are stored as duplicate records in the
    SCHOOL table.
    2.     
    3.     Lets look at the following code snippets on my attempt to come up with a solution without success still for quite sometime:  
    4.      
    5.     @Entity 
    6.     @IdClass(CountyPK.class)  
    7.     @Table(name="COUNTY", catalog="CountyDB", schema="")  
    8.     public class County implements Serializable {  
    9.           
    10.         @Id 
    11.         @Column(name="ZIPCODE")  
    12.         private String zipcode;  
    13.      
    14.         @Id 
    15.         @Column(name="COUNTY")  
    16.         private String county;  
    17.      
    18.         @Id 
    19.         @Enumerated(EnumType.STRING)  
    20.         @Column(name="STATE")  
    21.         @ManyToMany(cascade={CascadeType.PERSIST}, fetch=FetchType.EAGER)  
    22.         @JoinTable(name="COUNTY_SCHOOL", catalog="CountyDB", schema="",  
    23.                    joinColumns={@JoinColumn(name="ZIPCODE", referencedColumnName="ZIPCODE"),  
    24.                                 @JoinColumn(name="COUNTY", referencedColumnName="COUNTY"),  
    25.                                 @JoinColumn(name="STATE", referencedColumnName="STATE")},  
    26.                    inverseJoinColumns={@JoinColumn(name="SCHOOL", referencedColumnName="ID")})  
    27.         private Set<School>; schools = new HashSet<School>();  
    28.         public Set<School> getSchools()  
    29.         {  
    30.         return schools;  
    31.         }  
    32.         public void setSchools(Set<School> hotels)  
    33.         {  
    34.         this.schools = schools;  
    35.         }  
    36.     }  
    37.      
    38.     @Entity 
    39.     @Table(name="SCHOOL", catalog="CountyDB", schema="")  
    40.     public class School implements Serializable {  
    41.      
    42.         @Id 
    43.         @GeneratedValue(strategy = GenerationType.IDENTITY)  
    44.         @Column(name="ID")  
    45.         private int id;  
    46.      
    47.         @Column(name="SCHOOL_NAME")  
    48.         private String schoolName;  
    49.      
    50.         @ManyToMany(mappedBy="schools", cascade={CascadeType.ALL}, fetch=FetchType.EAGER)  
    51.         private Set<County> counties = new HashSet<County>();  
    52.         public Set<County> getCounties()  
    53.         {  
    54.         return counties;  
    55.         }  
    56.         public void setCounties(Set<County> counties)  
    57.         {  
    58.         this.counties = counties;  
    59.         }  
    60.      
    61.     @Stateless 
    62.     public class CountyBean implements CountyRemote {  
    63.           
    64.         @PersistenceContext(unitName="CountyDB-PU") private EntityManager manager;  
    65.           
    66.         public void createCounty(County county)  
    67.         {  
    68.             manager.persist(county);  
    69.             manager.flush();
    70.         }  
    71.      
    72.         public void saveOrUpdateCounty(County county)  
    73.         {  
    74.             manager.merge(county);
    75.             manager.flush();
    76.         }  
    77.      
    78.      
    79.         public County findCounty(String zipcode, String county, State state)  
    80.         {  
    81.             CountyPK pk = new CountyPK(zipcode, county, state);  
    82.             return manager.find(County.class, pk);  
    83.         }  
    84.           
    85.         public List fetchCountiesWithRelationships()  
    86.         {  
    87.           List list = manager.createQuery("SELECT DISTINCT c FROM County c LEFT JOIN FETCH c.counties").getResultList();  
    88.           for (Object obj : list)  
    89.           {  
    90.              County county = (County)obj;  
    91.           }  
    92.           return list;  
    93.        }  
    94.      
    95.     @Stateless 
    96.     public class SchoolBean implements SchoolRemote {  
    97.           
    98.         @PersistenceContext(unitName="CountyDB-PU") private EntityManager manager;  
    99.           
    100.         public void createSchool(School school)  
    101.         {  
    102.             manager.persist(school);  
    103.         }  
    104.      
    105.         public void saveOrUpdateSchool(School school)  
    106.         {  
    107.             manager.merge(school);  
    108.         }  
    109.      
    110.         public School findSchool(int school_id)  
    111.         {  
    112.             return manager.find(School.class, school_id);  
    113.         }  
    114.      
    115.         public School findSchool(String schoolName)  
    116.         {  
    117.             School school = null;
    118.             Query query = manager.createQuery("Select s FROM School s where s.schoolName = :schoolName");
    119.             query.setParameter("schoolName", schoolName);
    120.             List list = query.getResultList();
    121.             for (Object obj : list)
    122.             {
    123.                 school = (School)obj;
    124.                 if (school.getSchoolName().matches(schoolName))
    125.                     return school;
    126.             }
    127.             return school;   
    128.         }  
    129.                 
    130.         public List fetchSchoolsWithRelationships()  
    131.         {  
    132.              List list = manager.createQuery("SELECT DISTINCT s FROM School s LEFT JOIN FETCH s.schools").getResultList();  
    133.              for (Object obj : list)  
    134.              {  
    135.                  School school = (School)obj;  
    136.              }  
    137.              return list;  
    138.         }  
    139.     }  
    140.      
    141.     public class ApplicationClientAddCounty {  
    142.      
    143.         @EJB 
    144.         private static CountyRemote remoteCountybean;  
    145.         @EJB 
    146.         private static SchoolRemote remoteSchoolbean;  
    147.      
    148.         public static void main(String[] args)
    149.         {  
    150.             BufferedReader br = new BufferedReader(new FileReader("COUNTY.XML"));   
    151.             while (countyList_iterator.hasNext())  
    152.             {  
    153.                 County county = new County();  
    154.                 county.setZipcode(((org.jdom.Element)countyList_iterator.next()).getChild("zipcode");  
    155.                 while (schoolList_iterator.hasNext())  
    156.                 {  
    157.                     String school_name = ((org.jdom.Content)schoolsList_iterator.next()).getValue();  
    158.                     if (school_name.length() != 0)  
    159.                     {  
    160.                          School school = null;  
    161.                          if (!school_name.contains("Schools:"))  
    162.                          {  
    163.                               school = remoteSchoolbean.findSchool(school_name);
    164.                               if (school == null)
    165.                               {
    166.                                   school = new School();
    167.                                   school.setSchoolName(school_name);
    168.                               }
    169.                               county.getSchools().add(school);  
    170.                           }  
    171.                      }
    172.                 }  
    173.            }  
    174.            remoteCountybean.createCounty(county);
    175.     } Below is the a simplistic set of the data available which resulted in deplicate School records being persisted:
    COUNTY
    ID     Name
    1     County 1
    2     County 2
    COUNTY_SCHOOL
    ID     COUNTY_ID     SCHOOL_ID
    1     County 2     1
    2     County 1     2
       SCHOOL
    ID     Name
    1     School A
    2     School A
    Yet I wanted only a single normalized School to be generated instead:
    COUNTY
    ID     Name
    1     County 1
    2     County 2
    COUNTY_SCHOOL
    ID     COUNTY_ID     SCHOOL_ID
    1     County 1     1
    2     County 2     1
       SCHOOL
    ID     Name
    1     School A    I am not clear on why the following behavior is taking place within JPA:
    ( i ) The ID for County 1 in COUNTY_SCHOOL is 2 instead of 1. Vice versa for County 2.
    ( ii ) More importantly, why is School A being populated twice even though the data is identical.
    There appears to be some transactional issue/delay using the container managed JTA. Another intriguing symptom is that the following exception occurred after having taken out the @GeneratedValue(strategy = GenerationType.IDENTITY) in School.java in the hope that only a single record is generated:
    *EJB5018: An exception was thrown during an ejb invocation on [CountyBean]*
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@ce9fa6].*
    Class> domain.School Primary Key> [0]
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@ce9fa6].*
    Class> domain.School Primary Key> [0]
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:224)
    at com.sun.enterprise.util.EntityManagerWrapper.persist(EntityManagerWrapper.java:440)
    at ejb.CountyBean.createCounty(CountyBean.java:18)
    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)
    oracle.toplink.essentials.exceptions.ValidationException
    *... 38 more*
    On the other hand, another database exception occurred when directly persisting County & School using remoteCountybean.createCounty(county) as opposed to sending it through a message queue with sendJMSMessageToMyQueue(county) which works:
    *02/02/2011 5:22:14 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>*
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@1fcea34].*
    Class> domain.School Primary Key> [1]
    Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@1fcea34].*
    Class> domain.School Primary Key> [1]
    at ejb._CountyRemote_Wrapper.createCounty(ejb/_CountyRemote_Wrapper.java)
    at addCounty(localImportCounty.java:296)I am running JDK1.6.0_17, GF 2.1 on XP. This is a Java EE 5 Enterprise Application.
    It would be much appreciated for some guidance in an unfamiliar territory. I have had many attempts and read up quite a number of similar threats
    But none offer concrete results.
    Thanks in advance,
    Jack

    Hi,
    A minor correction of the last statement in ApplicationClientAddCounty class below:
    141.     public class ApplicationClientAddCounty {  
    142.      
    143.         @EJB 
    144.         private static CountyRemote remoteCountybean;  
    145.         @EJB 
    146.         private static SchoolRemote remoteSchoolbean;  
    147.      
    148.         public static void main(String[] args)
    149.         {  
    150.             BufferedReader br = new BufferedReader(new FileReader("COUNTY.XML"));   
    151.             while (countyList_iterator.hasNext())  
    152.             {  
    153.                 County county = new County();  
    154.                 county.setZipcode(((org.jdom.Element)countyList_iterator.next()).getChild("zipcode");  
    155.                 while (schoolList_iterator.hasNext())  
    156.                 {  
    157.                     String school_name = ((org.jdom.Content)schoolsList_iterator.next()).getValue();  
    158.                     if (school_name.length() != 0)  
    159.                     {  
    160.                          School school = null;  
    161.                          if (!school_name.contains("Schools:"))  
    162.                          {  
    163.                               school = remoteSchoolbean.findSchool(school_name);
    164.                               if (school == null)
    165.                               {
    166.                                   school = new School();
    167.                                   school.setSchoolName(school_name);
    168.                               }
    169.                               county.getSchools().add(school);  
    170.                           }  
    171.                      }
    172.                 }
    173.                remoteCountybean.createCounty(county);
    173.            }  
    174.     } Thanks,
    Jack

  • Add-ADGroupMember : Cannot find an object with identity

    Season Greetings.
    I have this piece of code that does little else than add a userproxyfull
    user to a group in ADLDS.
    Get-ADGroup -server b-004:389 -searchbase $partition -credential $myCred -filter {distinguishedName -eq $groupdn} | Add-ADGroupMember -members $userDN
    $userDN equates to a valid DN e.g CN=user one,OU=myOrg,DC=D1,DC=MS,DC=MyCo,DC=COM
    $partition = "DC=D1,DC=MS,DC=MyCo,DC=COM"
    $groupDN = is a valid distinguished name of the group in AD LDS
    Unfortunately I get the error
    Add-ADGroupMember : Cannot find an object with identity: the valid dn under:
    searchbase
    Many thanks for any help

    Thanks for taking interest jrv. Let me explain further. I have two objects that are in the same OU. One Trevor George is a user object and the other Norbert Sillo is a userproxyfull object.
    I run the following command successfully on Trevor George
    get-adGroup -server b-004:389 -searchbase "DC=d1,
    dc=ms,DC=Glowworm,DC=COM" -filter {distinguishedName -eq "CN=EU-AccountsLeads-GR
    P,OU=AccountsDeptOU,DC=D1,DC=MS,DC=Glowworm,DC=COM" } |Add-ADGroupMember -Member
    s "CN=Trevor George,OU=Paradise,DC=D1,DC=MS,DC=Glowworm,DC=COM" -passthru
    DistinguishedName : CN=EU-AccountsLeads-GRP,OU=AccountsDeptOU,DC=D1,DC=MS,DC=Glowworm,DC=COM  
    GroupCategory     : Security
    GroupScope        : Global
    Name              : EU-AccountsLeads-GRP
    ObjectClass       : group
    ObjectGUID        : e69fd4b3-1f6e-41c1-b679-25a6858b290f
    SID               : S-1-445474926-831883002-345832690-1227415955-1684694678-413
                        9367165
    However running the same command for Norbert Sillo
    get-adGroup -server b-004:389 -searchbase "DC=d1,
    dc=ms,DC=Glowworm,DC=COM" -filter {distinguishedName -eq "CN=EU-AccountsLeads-GR
    P,OU=AccountsDeptOU,DC=D1,DC=MS,DC=Glowworm,DC=COM" } |Add-ADGroupMember -Member
    s "CN=Norbert Sillo,OU=Paradise,DC=D1,DC=MS,DC=Glowworm,DC=COM" -passthru
    produces the following error
    Add-ADGroupMember : Cannot find an object with identity: 'CN=Norbert Sillo,OU=P
    aradise,DC=D1,DC=MS,DC=Glowworm,DC=COM' under: 'DC=D1,DC=MS,DC=Glowworm,DC=COM'
    At line:1 char:202
    + get-adGroup -server b-004:389 -searchbase "DC=d1,dc=ms,DC=Glowworm,DC=COM" -f
    ilter {distinguishedName -eq "CN=EU-AccountsLeads-GRP,OU=AccountsDeptOU,DC=D1,D
    C=MS,DC=Glowworm,DC=COM" } |Add-ADGroupMember <<<<  -Members "CN=Norbert Sillo,
    OU=Paradise,DC=D1,DC=MS,DC=Glowworm,DC=COM" -passthru
        + CategoryInfo          : ObjectNotFound: (CN=Norbert Sill...Glowworm,DC=C
       OM:ADPrincipal) [Add-ADGroupMember], ADIdentityNotFoundException
        + FullyQualifiedErrorId : SetADGroupMember.ValidateMembersParameter,Micros
       oft.ActiveDirectory.Management.Commands.AddADGroupMember
    At the moment it appears to fail on any userproxyfull object. I have had a similar issue with Get-ADUser with user proxy objects but was able to get round it by using Get-ADObject instead

  • Cannot attach detached object

    I am writing a J2EE application that allows a user to modify some data
    retrieved from the database (via the server) and send it back to the
    server.
    In the following kpm is a private class instance of
    KodoPersistenceManager. The class is a singleton so,
    kpm = (KodoPersistenceManager) pmf.getPersistenceManager();
    kpm.setNontransactionalWrite(true);
    is done within the constructor.
    I do the following,
    Collection rtn = new LinkedList();
    Object obj = null;
    Extent e = kpm.getExtent(cls, true);
    Iterator i = e.iterator();
    while (i.hasNext())
    rtn.add(i.next());
    kpm.retrieveAll(rtn);
    kpm.detachAll(rtn);
    e.closeAll();
    return rtn;
    One of the objects is modified and then send back where the following code
    is invoked,
    kpm.currentTransaction().begin();
    kpm.attach(currency);
    kpm.currentTransaction().commit();
    However I get,
    kodo.util.UserException: An object with oid "416.0" already exists in this
    PersistenceManager; another cannot be persisted.
    FailedObject:com.lehman.clientseg.data.staticdata.Currency@27538
    at
    kodo.runtime.PersistenceManagerImpl.makePersistentInternal(PersistenceManagerImpl.java:1943)
    at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:1881)
    at
    kodo.runtime.AttachManager.makePersistent(AttachManager.java:383)
    at kodo.runtime.AttachManager.attach(AttachManager.java:250)
    at kodo.runtime.AttachManager.attach(AttachManager.java:54)
    at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:3548)
    When kpm.attach() is called.
    Any ideas what I'm doing wrong?
    Thanks,
    Steve

    Stephen-
    kpm.retrieveAll(rtn);
    kpm.detachAll(rtn);
    e.closeAll();
    return rtn;detachAll returns the detached copies; it does not detach in-place. Do
    you shoul be doing something like:
    kpm.retrieveAll(rtn);
    Collection detached = kpm.detachAll(rtn);
    e.closeAll();
    return detached;
    In article <ckm20f$jqr$[email protected]>, Stephen Sweeney wrote:
    I am writing a J2EE application that allows a user to modify some data
    retrieved from the database (via the server) and send it back to the
    server.
    In the following kpm is a private class instance of
    KodoPersistenceManager. The class is a singleton so,
    kpm = (KodoPersistenceManager) pmf.getPersistenceManager();
    kpm.setNontransactionalWrite(true);
    is done within the constructor.
    I do the following,
    Collection rtn = new LinkedList();
    Object obj = null;
    Extent e = kpm.getExtent(cls, true);
    Iterator i = e.iterator();
    while (i.hasNext())
    rtn.add(i.next());
    kpm.retrieveAll(rtn);
    kpm.detachAll(rtn);
    e.closeAll();
    return rtn;
    One of the objects is modified and then send back where the following code
    is invoked,
    kpm.currentTransaction().begin();
    kpm.attach(currency);
    kpm.currentTransaction().commit();
    However I get,
    kodo.util.UserException: An object with oid "416.0" already exists in this
    PersistenceManager; another cannot be persisted.
    FailedObject:com.lehman.clientseg.data.staticdata.Currency@27538
    at
    kodo.runtime.PersistenceManagerImpl.makePersistentInternal(PersistenceManagerImpl.java:1943)
    at
    kodo.runtime.PersistenceManagerImpl.makePersistent(PersistenceManagerImpl.java:1881)
    at
    kodo.runtime.AttachManager.makePersistent(AttachManager.java:383)
    at kodo.runtime.AttachManager.attach(AttachManager.java:250)
    at kodo.runtime.AttachManager.attach(AttachManager.java:54)
    at
    kodo.runtime.PersistenceManagerImpl.attach(PersistenceManagerImpl.java:3548)
    When kpm.attach() is called.
    Any ideas what I'm doing wrong?
    Thanks,
    Steve
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Persist object with Hashtable

    Hello, I am trying to persist an object with a Hashtable.
    I have a Feature object which has a hashtable of qualifiers. Both of the
    key and value are of java.lang.String data type.
    In my System.jdo:
         <package name="com.primaci.bioprojects.plugins.geneMap">
              <class name="Feature">
                   <field name="_qualifiers">
                        <map key-type="java.lang.String" embedded-key="true"
    value-type="java.lang.String" embedded-value="true"/>
                   </field>
              </class>
         </package>
    After running ant, when I try to run the web application, I got the
    following exception, is there anything wrong with the system.jdo?
    javax.servlet.UnavailableException: Startup exception:
    javax.jdo.JDOFatalUserException: The system could not initialize; the
    following registered persistent types are missing metadata or have not
    been enhanced: [class com.primaci.bioprojects.plugins.geneMap.Feature].
         at
    com.primaci.bioprojects.startup.StartupServlet.init(StartupServlet.java:68)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
         at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)
         at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
         at
    org.apache.catalina.core.StandardService.start(StandardService.java:388)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

    Alex,
    What you did looks about right. The exception that you are seeing is
    because you have not registered the Feature class with Kodo JDO. You can
    do this either by running the schematool or by enumerating all the
    persistent types in the 'persistent-types' preference. See the Kodo JDO
    User Guide for more information.
    -Patrick
    [email protected] (Alex Tang) writes:
    Hello, I am trying to persist an object with a Hashtable.
    I have a Feature object which has a hashtable of qualifiers. Both of the
    key and value are of java.lang.String data type.
    In my System.jdo:
         <package name="com.primaci.bioprojects.plugins.geneMap">
              <class name="Feature">
                   <field name="_qualifiers">
                        <map key-type="java.lang.String" embedded-key="true"
    value-type="java.lang.String" embedded-value="true"/>
                   </field>
              </class>
         </package>
    After running ant, when I try to run the web application, I got the
    following exception, is there anything wrong with the system.jdo?
    javax.servlet.UnavailableException: Startup exception:
    javax.jdo.JDOFatalUserException: The system could not initialize; the
    following registered persistent types are missing metadata or have not
    been enhanced: [class com.primaci.bioprojects.plugins.geneMap.Feature].
         at
    com.primaci.bioprojects.startup.StartupServlet.init(StartupServlet.java:68)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
         at
    org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)
         at
    org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
         at
    org.apache.catalina.core.StandardService.start(StandardService.java:388)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Scale Object with Panel, but what about inside a Tab control?

    The Scale Object with Panel option works very well for simple UI
    objects.  I like to use it for VIs that display tables or
    multicolumn listboxes, etc.  I am finding a limitation when I use
    the Tab control.  If I have a table or listbox in each tab, I
    would like them to scale with the panel.  I would also like the
    tab to scale.  It should look like an Excel workbook where all
    sheets scale with the window even though they are each on their own
    tab.  If I could only Group the various tables / lists with the
    Tab itself....
    This wouldn't be such an issue if the Bounds property of the
    multicolumn listbox was writable.  I can set the number of rows
    and columns, but column size can be variable and not uniform across all
    columns.  Also, that solution looks and behaves much different
    from the Scale Object with Panel approach.... not to mention the extra
    coding required.
    I'm guessing that this amounts to a feature request, but if anyone has a present-version workaround, I'd love to hear about it.
    See you at NI Week!
    Dan Press
    PrimeTest Automation

    Hi Kalin T,
    Thanks for your prompt reply. I am running version 8.01. My problem is that i cannot select "Scale object with pane" for the controls inside a Tab control if the Tab control "Scale object with pane" is turned on. I want both the Tab control and the controls inside to be scaled, for instance an Waveform graph or an textbox  when i resize my main window.
    Best regards,
    Mattis
    Attachments:
    Scale.vi ‏11 KB

  • Weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non clusterable object with jndiName ]

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

    Hi,
    I am trying to deploy an EJB module have 4-5 EJB's on weblogic 8.1 through JBuilder.
    I am getting following error during deployment.
    Exception:weblogic.management.ApplicationException: prepare failed for Sample.jar
         Module: Sample.jar     Error: Exception preparing module: EJBModule(Sample.jar,status=NEW)
    Unable to deploy EJB: SampleBean from Sample.jar:
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Cannot export non
    clusterable object with jndiName ]
         at weblogic.utils.Debug.assertion(Debug.java:57)
         at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:272)
         at weblogic.ejb20.internal.BaseEJBHome.setup(BaseEJBHome.java:95)
         at weblogic.ejb20.internal.StatelessEJBHome.setup(StatelessEJBHome.java:67)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:979)
         at weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)
         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283)
         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:2962)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1534)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Any clue?, what its talking about?
    Thanks
    Naresh

  • How to resolve error with code: 0xe7210001 cannot load powrprof, object:cls

    Hello there
    Doses anybody know how to resolve the error with code: 0xe7210001, message: cannot load powrprof, object:clsd-not-found;
    OR: Fingerprintsoftware error OR: THotkey.exe message window multiplicates and computer freezes
    Scanned maleware and viruses, also in safe mode, found no infection, reinstalled fingerprint driver but nothing changed.
    grateful for help!

    Hello
    > message: cannot load powrprof, object:clsd-not-found;
    In my opinion this would mean that there is a problem with Toshiba Power Saver
    What Toshiba notebook you have exactly?
    Maybe reinstalling Power Saver could help. You can find it on official Toshiba website.

  • Could not persist object with token:re00100000b7f6e12d419f(Error: INF)

    Post Author: saravanan rangaraj
    CA Forum: Migration to XI R2
    Hi everybody,
             I'm getting error, 'could not persist object with token:re00100000b7f6e12d419f(Error: INF)'  while refreshing reports in infoview. If I logoff and logon it's working fine. The error repeats everytime after refreshing 3-5 reports.Can anybody say why it happens?

    Post Author: saravanan rangaraj
    CA Forum: Migration to XI R2
    Hi everybody,
             I'm getting error, 'could not persist object with token:re00100000b7f6e12d419f(Error: INF)'  while refreshing reports in infoview. If I logoff and logon it's working fine. The error repeats everytime after refreshing 3-5 reports.Can anybody say why it happens?

  • Cannot Move Objects with Arrows - Ai CS5

    For some reason I cannot move objects with my arrow keys in Illustrator cs5. I can drag them and transform-move them but the arrow keys don't work. very annoying.
    Any clues as to what I can do to fix this?
    Thanks!

    Could happen if your keyboard increment value is zero or a very low number.

  • Webi Reports - Object with id ... cannot be created because it has no name

    I'm trying to launch a Webi report from our application using openDocument method. When the report is launched it fails with following error -
    30567: Unable to save the document to the repository due to the following error: The object with id number '27731' cannot be created because it has no name. (Error: WIS 30567)
    Before scheduling the report I'm calling setName method to set the name of the report but still it does not work. Any help would be greatly appreciated.
    Thanks
    Manas

    Hi John,
    I will try to give you some more background about this problem.
    From our application we are not directly launching the report. We schedule it to run immediately and then view the instance created (using the instance id returned by the schedule call).
    For scheduling we use the web services API (BIPlatform) and before scheduling we fetch all the prompts (again using a webservice API). The call is something like this -
    WebiProcessingInfo wProcessingInfo = boWebIReport_.getWebiProcessingInfo();
    After that we populate all the prompts with their corresponding values in application and schedule it. However the scheduling fails with the error I mentioned in the start of this thread and when we try to view it we are presented with a screen to enter prompts again.
    From the scheduling error it looks like its failing because the name could not be set but I really doubt if thats the case. We use same calls to schedule and view Crystal reports also and they work perfectly. Only Webi is giving this error.
    Thanks for looking into this.
    Manas
    Edited by: Manas Mandlekar on Sep 10, 2008 7:14 AM

  • Error while loading shared libraries: librt.so.1: cannot open shared object

    error while loading shared libraries: librt.so.1: cannot open shared object
    I cant run my apache server v2.2.3.
    Can someone help me?
    thanks in advance

    That could be an accessibility issue. Check the user with whom you installed Apache server. Check the user has permissions to access the libraries.
    -Mahendra.

  • Error 0(Native: listNetInterfaces:[3]) and error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

    Hi Gurus,
    I'm trying to upgrade my test 9.2.0.8 rac to 10.1 rac. I cannot upgrade to 10.2 because of RAM limitations on my test RAC. 10.1 Clusterware software was successfully installed and the daemons are up with OCR and voting disk created. Then during the installation of RAC software at the end, root.sh needs to be run. When I run root.sh, it gave the error: while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory. I have libpthread.so.0 in /lib. I looked up on metalink and found Doc ID: 414163.1 . I unset the LD_ASSUME_KERNEL in vipca (unsetting of LD_ASSUME_KERNEL was not required in srvctl because there was no LD_ASSUME_KERNEL in srvctl). Then I tried to run vipca manually. I receive the following error: Error 0(Native: listNetInterfaces:[3]). I'm able to see xclock and xeyes. So its not a problem with x.
    OS: OEL5 32 bit
    oifcfg iflist
    eth0 192.168.2.0
    eth1 10.0.0.0
    oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth1 10.1.1.0 global cluster_interconnect
    eth0 192.168.2.0 global public
    cat /etc/hosts
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    My questions are:
    should ping on sunny1vip and sunny2vip be already working? As of now they dont work.
    if you look at oifcfg getif, I initially had eth1 10.0.0.0 global cluster_interconnect,eth0 192.168.2.0 global public then I created eth1 10.1.1.0 global cluster_interconnect with setif. Should it be 10.1.1.0 or 10.0.0.0. I looked at the subnet calculator and it says for 10.1.1.1, 10.0.0.0 is the subnet. In metalink they had used 10.10.10.0 and hence I used 10.1.1.0
    Any ideas on resolving this issue would be very much appreciated. I had been searching on oracle forums, google, metalink but all of them refer to DOC Id 414163.1 but it does n't seem to work. Please help. Thanks in advance.
    Edited by: ayyappa on Aug 20, 2009 10:13 AM
    Edited by: ayyappa on Aug 20, 2009 10:14 AM
    Edited by: ayyappa on Aug 20, 2009 10:15 AM

    a step forward towards resolution but i need some help from the gurus.
    root# cat /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6
    192.168.2.3 sunny1pub.ezhome.com sunny1pub
    192.168.2.4 sunny2pub.ezhome.com sunny2pub
    10.1.1.1 sunny1prv.ezhome.com sunny1prv
    10.1.1.2 sunny2prv.ezhome.com sunny2prv
    192.168.2.33 sunny1vip.ezhome.com sunny1vip
    192.168.2.44 sunny2vip.ezhome.com sunny2vip
    root# /u01/app/oracle/product/crs/bin/oifcfg iflist
    eth1 10.0.0.0
    eth0 192.168.2.0
    root# /u01/app/oracle/product/crs/bin/oifcfg getif
    eth1 10.0.0.0 global cluster_interconnect
    eth0 191.168.2.0 global public
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    ****ORACLE_HOME environment variable not set!
    ORACLE_HOME should be set to the main directory that contain oracle products. set and export ORACLE_HOME, then re-run.
    root# export ORACLE_BASE=/u01/app/oracle
    root# export ORACLE_HOME=/u01/app/oracle/product/10.1.0/Db_1
    root# export ORA_CRS_HOME=/u01/app/oracle/product/crs
    root# export PATH=$PATH:$ORACLE_HOME/bin
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP does not exist.
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny1pub -o $ORACLE_HOME -A 192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl add nodeapps -n sunny2pub -o $ORACLE_HOME -A 192.168.2.44/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny1pub -a
    VIP exists.: sunny1vip.ezhome.com/192.168.2.33/255.255.255.0
    root# /u01/app/oracle/product/10.1.0/Db_1/bin/srvctl config nodeapps -n sunny2pub -a
    VIP exists.: sunny2vip.ezhome.com/192.168.2.44/255.255.255.0
    Once I execute the add nodeapps command as root on node 1, I was able to get vip exists for config nodeapps on node 2. The above 2 statements resulted me with same values on both nodes. After this I executed root.sh on both nodes, I did not receive any errors. It said CRS resources are already configured.
    My questions to the gurus are as follows:
    Should ping on vip work? It does not work now.
    srvctl status nodeapps -n sunny1pub(same result for sunny2pub)
    VIP is not running on node: sunny1pub
    GSD is not running on node: sunny1pub
    PRKO-2016 : Error in checking condition of listener on node: sunny1pub
    ONS daemon is not running on node: sunny1pub
    [root@sunny1pub ~]# /u01/app/oracle/product/crs/bin/crs_stat -t
    Name Type Target State Host
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    ora....pub.gsd application OFFLINE OFFLINE
    ora....pub.ons application OFFLINE OFFLINE
    ora....pub.vip application OFFLINE OFFLINE
    Will crs_stat and srvctl status nodeapps -n sunny1pub work after I upgrade my database or should they be working now already? I just choose to install 10.1.0.3 software and after running root.sh on both nodes, I clicked ok and then the End of installation screen appeared. Under installed products, I see 9i home, 10g home, crs home. Under 10g home and crs home, I see cluster nodes(sunny1pub and sunny2pub) So it looks like the 10g software is installed.

  • Error while loading shared libraries: libdl.so.2: cannot open shared object

    I got the error when I run the Identity server "./start_ois_server"
    Using Linux Threading Library.
    /opt/netpoint/identity/oblix/apps/common/bin/ois_server: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
    rm: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    OIS Server started with pid: 11241
    [root@EX4200SRV02 bin]# /bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    Can someone help me resolving this issue?
    thanks. Your help is very much appreciated.
    thanks.

    I resolved the issue by commenting "LD" in start_ois_server.

  • Cannot open shared object file: on Informatica Power Centre(8.1.1) Installa

    Hi Friends,
    I am trying to install Informatica Power Centre 8.1.1 and when i invoke the installet it' giving below error:
    My OS is Redhat Linux (64 bit).
    What's the issue?
    onfiguring the installer for this system's environment...
    awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    /bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    Launching installer...
    grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
    /tmp/install.dir.28135/Linux/resource/jre/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
    [oracle@obidb PowerCenter_8.1.1_SE_for_Linux_x64_64Bit]$
    Regards,
    DB

    Hi;
    I am in the process of installing R12.1.1 on RHEL5(64-bit). All the pre-req have been done.. I did the installation twice but I am facing the same issue. When i try to run adconfig.sh on the appsTier. i get the following errorYou want to run adconfig.sh on appstier or dbtier?
    If you run appstier be sure you source env file with applmgr user
    Regard
    Helios

Maybe you are looking for