EJB 3.0 Inheritance problem

I have to persist classes Cat, BullDog and StBernard:
class Animal {
private int animalId;
private String name;
private String dtype;
class Dog extends Animal {
private int dogId;
private String furColor;
class BullDog extends Dog {
private int bullDogId;
private int fightCount;
class StBernard extends Dog {
private int stbernardId;
private int livesSaved;
class Cat extends Animal {
private int catId;
private String preferredCatFood;
}Planned inheritance strategy is joined table strategy. There is no problem mapping and persisting Cat and Dog tables into database, but I cannot find a way how to annotate StBernard and BullDog classes to persist them. Is it possible at all?

do you know any official doc or reference where I can find statement, that such inheritance is not possible? i.e. only one level inheritance is allowed in JPA? Will check @SecondaryTable to see if it is helpful or not.
@SecondaryTable This annotation is used to specify a secondary table for the annotated entity class. Specifying one or more secondary tables indicates that the data for the entity class is stored across multiple tables.@SecondaryTable is not for me :(
Edited by: marekst on Feb 7, 2008 6:36 AM

Similar Messages

  • EJB Entity transaction rollback problem

              Hello,
              I have created 2 beans one is a Stateless Session and the other a Bean Managed Entity Bean. The SS Bean has methods to retrieve an Oracle Connection from a DataSource defined connection pool, and to close a connection. The entity bean I have created is responsible for insterting a new record into one of the tables in my database.
              I have a client app that calls the ejbCreate method on the entity bean at which point the Entity EJB takes control, gets a valid connection from the SS EJB, runs a simple working SQL SELECT statement (obtaining correct values), and then attempts to perform an insert into a table using a prepared statement. My problem is that the application runs fine without any errors and all calls are made and all calls seem to be working fine. I have checked to make sure that the Datasource I am using is AutoCommit= false and it is and there are no exceptions being thrown in my EJB's but yet it appears as though the SQL statements executeUpdate() command is not being committed as their is no rows created in the database. Does anyone know what I may be doing wrong. I have all ACL parameters set up correctly and as I stated before the entire app runs without errors and I do have a SELECT statment that is working properly within the same method as the INSERT statement which is not!!! Please send any suggestions!!
              Justin
              

              I am using CMT, it is activated by default on Entity Beans I believe. The bean itself is marked as TX_REQUIRED so I believe all the methods automatically are all TX_REQUIRED.
              Here is my Bean ejbCreate Method, My PK class, and my ejb-jar.xml file-- I've pasted them below for convenience.
              ejbCreate:
                   public CustomerPK ejbCreate(String aUserName, String aPassword, String aFirstName,
                        String aMiddleInit, String aLastName, String aEmailAddr)
                        throws javax.ejb.CreateException {
                   Connection conn=null;
                   long nextPrsnID;
                   long nextCustID;
                   if (verifyParams(aUserName, aPassword, aFirstName, aMiddleInit,
                        aLastName, aEmailAddr)) {
                   if (isUniqueUserName(aUserName)) {
                   try {
                        conn=getConnection();
                        conn.setAutoCommit(false);
                        nextPrsnID=addPerson(conn,aFirstName,aMiddleInit,aLastName); // adds a person to the person table consists of just simple SQL
                        nextCustID=addCustomer(conn,nextPrsnID, aUserName,aPassword, aEmailAddr); //adds a customer to the customer table
                        // SET THE BEAN MANAGED PUBLIC VARIABLES
                        this.userName=aUserName;
                        this.password=aPassword;
                        this.firstName=aFirstName;
                        this.middleInit=aMiddleInit;
                        this.lastName=aLastName;
                        this.emailAddr=aEmailAddr;
                        this.personID=nextPrsnID;
                        this.custID=nextCustID;
                        conn.commit(); // with this statement here the transaction goes through otherwise the DB will not be updated
                   catch (Exception e){
                        throw new javax.ejb.CreateException("Experiencing Database Problems-- Unrecoverable Error"); // rollback transaction
                   finally{
                        cleanup(conn,null); // close the connection
                   else {           // UserName already exists
                   throw new javax.ejb.CreateException("Sorry username already exists please choose another one");
                   else {          // Registration parameters were not verifiable
                   throw new javax.ejb.CreateException("Registration paramater rules were violated");
                   CustomerPK custPK=new CustomerPK(nextCustID);
                   return custPK;
              EJB CUSTOMER PRIMARY KEY CLASS:
              public class CustomerPK implements java.io.Serializable {
              // PRIMARY KEY VARIABLES
              public long CustomerID;
              public CustomerPK(long aCustomerID) {
              this.CustomerID=aCustomerID;
              public CustomerPK() {
              public String toString(){
              return ((new Long(CustomerID)).toString());
              public boolean equals(Object aComparePK){
              if (this.CustomerID==((CustomerPK)aComparePK).CustomerID){
                   return true;
              return false;
              public int hashCode(){
              return ((new Long(CustomerID).toString()).hashCode());
              } // END-CLASS
              CUSTOMER ejb-jar.xml
              <?xml version="1.0"?>
              <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
              <ejb-jar>
              <enterprise-beans>
              <entity>
                   <ejb-name>Customer</ejb-name>
                   <home>CustomerHome</home>
                   <remote>Customer</remote>
                   <ejb-class>CustomerBean</ejb-class>
                   <persistence-type>Bean</persistence-type>
                   <prim-key-class>CustomerPK</prim-key-class>
                   <reentrant>False</reentrant>
                   <resource-ref>
              <res-ref-name>jdbc/DeveloperPool</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
              </resource-ref>
              </entity>
              </enterprise-beans>
              <assembly-descriptor>
              <container-transaction>
                   <method>
                   <ejb-name>Customer</ejb-name>
                   <method-intf>Remote</method-intf>
                   <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              </ejb-jar>
              "Cameron Purdy" <[email protected]> wrote:
              >Are you using CMT? Have you marked the methods as REQUIRED?
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"Justin Jose" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Hello,
              >>
              >> I have created 2 beans one is a Stateless Session and the other a Bean
              >Managed Entity Bean. The SS Bean has methods to retrieve an Oracle
              >Connection from a DataSource defined connection pool, and to close a
              >connection. The entity bean I have created is responsible for insterting a
              >new record into one of the tables in my database.
              >> I have a client app that calls the ejbCreate method on the entity bean at
              >which point the Entity EJB takes control, gets a valid connection from the
              >SS EJB, runs a simple working SQL SELECT statement (obtaining correct
              >values), and then attempts to perform an insert into a table using a
              >prepared statement. My problem is that the application runs fine without
              >any errors and all calls are made and all calls seem to be working fine. I
              >have checked to make sure that the Datasource I am using is AutoCommit=
              >false and it is and there are no exceptions being thrown in my EJB's but yet
              >it appears as though the SQL statements executeUpdate() command is not being
              >committed as their is no rows created in the database. Does anyone know
              >what I may be doing wrong. I have all ACL parameters set up correctly and
              >as I stated before the entire app runs without errors and I do have a SELECT
              >statment that is working properly within the same method as the INSERT
              >statement which is not!!! Please send any suggestions!!
              >>
              >> Justin
              >
              >
              

  • Multiple Inheritance problem persists in Interfaces

    Hi,
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing.
    interface one
         int i=10;
    interface two
         int i=20;
    interface z extends one,two
    public class xyz implements z
         public static void main(String [] a)
         System.out.println(i);
    }O/P
    D:\Education\Java\JavaStudyRoom\Applets>javac xyz.java
    xyz.java:16: reference to i is ambiguous, both variable i in one and variable i
    in two match
    System.out.println(i);
    *^*
    *1 error*
    Thanks for replying

    suvojit168 wrote:
    I tentatively made a program and found that multiple inheritance problem of C++ persists even with interfaces. Although this is definetely a special case but I want to know what is this problem known as( i know that this is perhaps known as diamond problem in C++). And is there a way out of this thing. This is not the so called diamond inheritance problem. What you have here is an ordinary name clash. And as has been noted you can resolve it by qualifying which constant you're referring to, like
    System.out.println(one.i);
    For the diamond inheritance problem to apply both the one and the two interfaces would need to inherit a common ancestor (that's how the diamond is formed). Furthermore the common anscestor would need to carry implementation which would then be inherited two ways, once via one and once via two. This is the diamond inheritance problem Java is avoiding by allowing single inheritance of implementation only.
    P.S. My previous post was posted my mistake.

  • EJB 3.0 Constraints Problem

    Hi everybody !
    Hope someone can help me !! Im really go crazy with this stuff :s...
    Im Using jdeveloper .... I have 2 Entity Bean called Jiverating and Jiveuser, I creadte them using "Create Entity Bean from Table".... also a Session Bean called ForumFacadeBean I created using a EJB diagram as EJB Sesion Bean ....
    I can execute query without any problem but when I want to sotre a new Jiverating the aplication thows an exception... I just call the following metold of ForumFacadeBean
    public Jiverating persistJiverating(Jiverating jiverating) {   
    em.persist(jiverating);
    return jiverating;
    The exception I got is:
    <Jan 13, 2012 8:42:48 PM PET> <Warning> <EclipseLink> <BEA-2005000> <2012-01-13 20:42:48.125--UnitOfWork(317933487)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLTransactionRollbackException: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not found
    Error Code: 2091
    Call: INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (?, ?, ?, ?)
         bind => [2, 0, 2, 11]
    Query: InsertObjectQuery(pe.com.bcts.gart.ejb.entities.Jiverating@12f3242c)>
    <Jan 13, 2012 8:42:48 PM PET> <Warning> <EclipseLink> <BEA-2005000> <2012-01-13 20:42:48.126--UnitOfWork(317933487)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLTransactionRollbackException: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not found
    Error Code: 2091
    Call: INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (?, ?, ?, ?)
         bind => [2, 0, 2, 11]
    Query: InsertObjectQuery(pe.com.bcts.gart.ejb.entities.Jiverating@12f3242c)>
    <Jan 13, 2012 8:42:48 PM PET> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB pe.com.gart.ejb.entities.ForumFacadeBean.persistJiverating(pe.com.bcts.gart.ejb.entities.Jiverating)],Xid=BEA1-001B5FB5B4DB06A00B5F(317932956),Status=Rolled back. [Reason=Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLTransactionRollbackException: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not found
    Error Code: 2091
    Call: INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (?, ?, ?, ?)
         bind => [2, 0, 2, 11]
    Query: InsertObjectQuery(pe.com.bcts.gart.ejb.entities.Jiverating@12f3242c)],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=30,SCInfo[osinergminWebPortalDesa+WC_Spaces]=(state=rolledback),properties=({weblogic.transaction.name=[EJB pe.com.gart.ejb.entities.ForumFacadeBean.persistJiverating(pe.com.bcts.gart.ejb.entities.Jiverating)]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=WC_Spaces+192.168.101.124:9000+osinergminWebPortalDesa+t3+, XAResources={WSATGatewayRM_WC_Spaces_osinergminWebPortalDesa, CustomPortalServicesEJB@Portal@Portal_osinergminWebPortalDesa, webapp@Portal@Portal_osinergminWebPortalDesa},NonXAResources={})],CoordinatorURL=WC_Spaces+192.168.101.124:9000+osinergminWebPortalDesa+t3+): weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=[email protected]f34805
    Internal Exception: java.sql.SQLTransactionRollbackException: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not found
    Error Code: 2091
    Call: INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (?, ?, ?, ?)
    *     bind => [2, 0, 2, 11]*Query: InsertObjectQuery(pe.com.bcts.gart.ejb.entities.Jiverating@12f3242c)
         at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1881)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:345)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:240)
         at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:627)
         at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:49)
         at weblogic.ejb.container.internal.BaseRemoteObject.__WL_postInvokeTxRetry(BaseRemoteObject.java:444)
         at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:53)
         at pe.com.gart.ejb.entities.ForumFacade_xgr9io_ForumFacadeImpl.persistJiverating(Unknown Source)
         at pe.com.gart.ejb.entities.ForumFacade_xgr9io_ForumFacadeImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at pe.com.gart.ejb.entities.ForumFacade_xgr9io_ForumFacadeImpl_1035_WLStub.persistJiverating(Unknown Source)
         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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
         at $Proxy247.persistJiverating(Unknown Source)
         at customdiscussions.backing.AddRating.<init>(AddRating.java:51)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:187)
         at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:874)
         at oracle.adfinternal.controller.state.ScopeMap.get(ScopeMap.java:83)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:250)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:513)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:782)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:75)
         at oracle.adfinternal.view.faces.unified.taglib.UnifiedDocumentTag.doStartTag(UnifiedDocumentTag.java:50)
         at jsp_servlet.__addrating_jspx._jspx___tag1(__addrating_jspx.java:154)
         at jsp_servlet.__addrating_jspx._jspx___tag0(__addrating_jspx.java:113)
         at jsp_servlet.__addrating_jspx._jspService(__addrating_jspx.java:74)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:35)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:417)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:45)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:45)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:45)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:45)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:45)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:45)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:268)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:471)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:191)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLTransactionRollbackException: ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not found
    I dont underestand this error beacuse when I execute INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (2, 0, 2, 11) directly on the database I got no error !
    please help me !!!!!

    ORA-02291: integrity constraint (DEV_DISCUSSIONS.JIVERATE_SCR_FK) violated - parent key not foundWell it is a database constraint, so it is the database that is blocking the insertion of the record.
    I dont underestand this error beacuse when I execute INSERT INTO JIVERATING (SCORE, OBJECTTYPE, USERID, OBJECTID) VALUES (2, 0, 2, 11) directly on the database I got no error !And did you actually attempt to -commit- the transaction? If you did then I can only conclude one thing: you are using two different databases. One has a constraint, the other does not. Constraints do not magically appear out of thin air, especially ones that generate an ORA error.

  • EJB 3.0 client problem

    here is my Entity class :
    package com.azry.employee;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import javax.persistence.TableGenerator;
    @Entity
    @TableGenerator(name = "EMP_GENERATOR",
                      table = "EMPLOYEE",
                      pkColumnName = "EMPLOYEE_ID",
                      pkColumnValue = "EMPLOYEE_ID",
                      allocationSize = 10)
    @Table(name = "EMPLOYEE")
    public class Employee implements java.io.Serializable {
         private int id;
         private String name;
         private String email;
         private int money;
         @Id
         @GeneratedValue(strategy = GenerationType.TABLE, generator = "EMP_GENERATOR")
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public int getMoney() {
              return money;
         public void setMoney(int money) {
              this.money = money;
    }i also have created database EmployeeDB in mysql and have also mysql-ds.xml :
    and also have a client class:
    package com.azry.employee.clients;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import com.azry.employee.*;
    public class Client {
         public static void main(String[] args) {
         try {
              Context jndContext=getInitialContext();
              Object ref=jndContext.lookup("EmployeeSession/remote");
              EmployeeRemote rem=(EmployeeRemote)PortableRemoteObject.narrow(ref,EmployeeRemote.class);
              Employee emp=new Employee();
             // emp.setId(1);
              emp.setMoney(1000);
              emp.setName("david");
              emp.setEmail("email");
              rem.insert(emp);
         catch(Exception ex) {
              ex.printStackTrace();
         private static Context getInitialContext()throws NamingException{
              Properties p=new Properties();
              p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
              p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
              p.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
              return new InitialContext(p);
    }i also have remote interface and session bean that overrides remote interface but the real problem is that when i run server everything goes well but when i run client exception occurs :
    javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get or update next value
        at com.azry.employee.clients.Client.main(Client.java:24)
    Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get or update next value
         at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
         at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
         at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:182)
         at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
    Caused by: org.hibernate.exception.SQLGrammarException: could not get or update next value
         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
         at org.hibernate.engine.TransactionHelper$1Work.doWork(TransactionHelper.java:41)
         at org.hibernate.engine.transaction.Isolater$JtaDelegate.delegateWork(Isolater.java:106)
         at org.hibernate.engine.transaction.Isolater.doIsolatedWork(Isolater.java:40)
         at org.hibernate.engine.TransactionHelper.doWorkInNewTransaction(TransactionHelper.java:51)
         at org.hibernate.id.MultipleHiLoPerTableGenerator.generate(MultipleHiLoPerTableGenerator.java:191)
         at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
         at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
         at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
         at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
         ... 37 more
    can anyone tell me what i am doing wrong?_

    here is my Entity class :
    package com.azry.employee;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    import javax.persistence.TableGenerator;
    @Entity
    @TableGenerator(name = "EMP_GENERATOR",
                      table = "EMPLOYEE",
                      pkColumnName = "EMPLOYEE_ID",
                      pkColumnValue = "EMPLOYEE_ID",
                      allocationSize = 10)
    @Table(name = "EMPLOYEE")
    public class Employee implements java.io.Serializable {
         private int id;
         private String name;
         private String email;
         private int money;
         @Id
         @GeneratedValue(strategy = GenerationType.TABLE, generator = "EMP_GENERATOR")
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public int getMoney() {
              return money;
         public void setMoney(int money) {
              this.money = money;
    }i also have created database EmployeeDB in mysql and have also mysql-ds.xml :
    and also have a client class:
    package com.azry.employee.clients;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.rmi.PortableRemoteObject;
    import com.azry.employee.*;
    public class Client {
         public static void main(String[] args) {
         try {
              Context jndContext=getInitialContext();
              Object ref=jndContext.lookup("EmployeeSession/remote");
              EmployeeRemote rem=(EmployeeRemote)PortableRemoteObject.narrow(ref,EmployeeRemote.class);
              Employee emp=new Employee();
             // emp.setId(1);
              emp.setMoney(1000);
              emp.setName("david");
              emp.setEmail("email");
              rem.insert(emp);
         catch(Exception ex) {
              ex.printStackTrace();
         private static Context getInitialContext()throws NamingException{
              Properties p=new Properties();
              p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
              p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
              p.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
              return new InitialContext(p);
    }i also have remote interface and session bean that overrides remote interface but the real problem is that when i run server everything goes well but when i run client exception occurs :
    javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get or update next value
        at com.azry.employee.clients.Client.main(Client.java:24)
    Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not get or update next value
         at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
         at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
         at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:182)
         at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
    Caused by: org.hibernate.exception.SQLGrammarException: could not get or update next value
         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
         at org.hibernate.engine.TransactionHelper$1Work.doWork(TransactionHelper.java:41)
         at org.hibernate.engine.transaction.Isolater$JtaDelegate.delegateWork(Isolater.java:106)
         at org.hibernate.engine.transaction.Isolater.doIsolatedWork(Isolater.java:40)
         at org.hibernate.engine.TransactionHelper.doWorkInNewTransaction(TransactionHelper.java:51)
         at org.hibernate.id.MultipleHiLoPerTableGenerator.generate(MultipleHiLoPerTableGenerator.java:191)
         at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
         at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
         at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
         at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
         ... 37 more
    can anyone tell me what i am doing wrong?_

  • Spring 2.5.5 and EJB 3.0 Deployment problem in WLS 10.3

    Hi,
    I am attempting to deploy a EAR file that previously ran on SJSAS 9.1 update 1 to WLS 10.3. As part of the deployment I get the following error related to the EJB3 classes.
    There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load class au.edu.cqu.cis.web.ajaxservice.AjaxServicesBean in Jar D:\dev\env\oracle\middleware\jdeveloper\system\system11.1.1.0.31.51.56\DefaultDomain\servers\DefaultServer\tmp\_WL_user\ProgEnrol-ear-3\v540rk\ProgEnrol-ejb-3.0.4-SNAPSHOT.jar : java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    I suspect that this is related to the @Autowired spring annotation in use in the session bean. Either, the server is not finding the Spring JAR correctly or it has a problem with the annotation.
    Can anyone point me in the right direction? Do I need to deploy the spring jar as a library?
    Thank you.
    Regards,
    Graeme.

    Hi, Graeme.
    Seems there is an existing CR on something related from v10.0: CR353213
    * WLS 10.0 - EJB 3.0 deployment fails when parsing class for Stateless annotation
    According to http://edocs.bea.com/wls/docs103/issues/known_resolved.html, this is not addressed in 10.3
    Closely review your classpath, and then (assuming you have access to the source) review the body of your ejb. If it is related to this CR, you may be able to workaround the issue by shortening the body and split large methods into more sub-methods.
    I hope this helps,
    -Adrian

  • EJB 3.0 deployment problem

    I just started learning EJB3.0. I created a slsb application very similar to the converter available in the tutorial sample. However when i build and deploy the app I am getting this error ->This application client has no ejb refernce by the name simpleSessionRemote. This happens when I have app-client jar inside the ear. For only jar and war inside the ear there is no deployement problems. I am using NetBeans 5.5 and Sun App server. Anyone has come across similar issue?

    How are you looking up the remote ejb dependency in the app client -- via @EJB or InitialContext()?
    Please post the source code for the app client, the full error message/stack trace, and any of the following files that exist in the .ear : sun-ejb-jar.xml, application-client.xml, sun-application-client.xml, ejb-jar.xml .
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • XML mapping inheritance problem; missing class indicator field

    Hi!
    I am currently working on a project which involves mapping a large domain model on a XSD schema. For this we use Toplink 10.1.3.1 which is mostly great. But now I have a problem while wanting to use class inheritance.
    In my XSD I have the following defined
    <xs:complexType name="Traject">
         <xs:sequence>
              <xs:element name="SoortTraject" type="SoortTraject"/>
         </xs:sequence>
    </xs:complexType>
    <xs:complexType name="SpecialTraject">
         <xs:complexContent>
              <xs:extension base="Traject">
                   <xs:sequence>
                                 [some elements] 
                   </xs:sequence>
              </xs:extension>
         </xs:complexContent>
    </xs:complexType>My XML is an implementation of this XSD and looks like this
    <Trajecten>
            <Traject xsi:type="SpecialTraject">
                     [implementation of the elements]
             </Traject>
    </Trajecten>My domain model corresponts to the XSD, so there is a Traject object and an inherited SpecialTraject object.
    In the mapping I used the Advanced properties->inheritance on both descriptors telling the Traject descriptor that it was the 'Root Parent Descriptor' ('Use class indicator field' -> 'use XML Schema Type attribute', 'Use class indicator dictionary') and the SpecialTraject what it Child Descriptor was ('Traject').
    When I test my mapping it always results in the same error (no matter how I configure this inheritance mapping). It says :
    [TOPLINK-44] missing class indicator field
    Descriptor: XMLDescriptor(Traject --> [])What am I doing wrong? Does anybody know a sollution?
    Best regards,
    Jouke Stoel
    Developer

    This is the changed XML descriptor file. When I deploy the file it automaticly overrides the old file so it ain't possible that I was still using the wrong file
    <toplink:class-indicator-mappings>
        <toplink:class-indicator-mapping>
            <toplink:class>Traject</toplink:class>
            <toplink:class-indicator xsi:type="xsd:string">Traject</toplink:class-indicator>
        </toplink:class-indicator-mapping>
        <toplink:class-indicator-mapping>
            <toplink:class>SpecialTraject</toplink:class>
            <toplink:class-indicator xsi:type="xsd:string">SpecialTraject</toplink:class-indicator>
        </toplink:class-indicator-mapping>
    </toplink:class-indicator-mappings>I have posted the stacktrace but I had to translate a bit because my exception was in Dutch :)
    Locale is a great invention
    Exception [TOPLINK-44] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DescriptorException
    Exception description: Missing class indicator field of database row [UnmarshalRecord()].
    Descriptor: XMLDescriptor(Traject --> [])
         at oracle.toplink.exceptions.DescriptorException.missingClassIndicatorField(DescriptorException.java:887)
         at oracle.toplink.internal.ox.QNameInheritancePolicy.classFromRow(QNameInheritancePolicy.java:84)
         at oracle.toplink.internal.ox.XMLRelationshipMappingNodeValue.processChild(XMLRelationshipMappingNodeValue.java:13)
         at oracle.toplink.internal.ox.XMLCompositeCollectionMappingNodeValue.startElement(XMLCompositeCollectionMappingNodeValue.java:62)
         at oracle.toplink.ox.record.UnmarshalRecord.startElement(UnmarshalRecord.java:352)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
         at oracle.toplink.internal.ox.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:189)
         at oracle.toplink.internal.ox.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:147)
         at oracle.toplink.ox.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:228)
    .

  • Inheritance problems

    I'm trying to work out a problem with a project I'm working on that uses inheritance.
    the superclass consists of a prebuild GUI using swing, when more then one class enherits from the superclass for some reason its like they are sharing the subclass, any changes to the GUI done in one subclass affects the other, so if I add a JScrollPane to the Container from the inherited class it stayes after the window is closed AND its there when the other subclass runs.
    What I want is for both subclasses to have their own instances of the subclass, or in other words I don't want the changes done in one subclass to affect the other subclass, is this possible?
    My best guess is that instead of getting their own copy of the subclass they are sharing the same one so when one subclass does any changes the other reflects those changes because they are working with the exact same instance of the superclass. I have an idea of what my problem is I just don't know how to stop it from hapening.

    It seems to me you are very confused as to how your inheritance tree works and from your description there is a clear design fault. It may well be you are diasy-chaining your classes and have got design in a fart with logic and flow - ie:
    class A{ // superclass
    class B extends A{} // so if B is an application GUI
    class C extends B{} // C gets messed up
    class D extends C{} // and application GUI D gets knackered too
    This type of design rarely works well (if at all). You need to literally go back to the 'drawing board' and consider what you're trying to do with good design principles.
    I'm not sure anyone here can really help you with this unless you give a detailed description of what you're trying to do (not code), though from what I CAN gather it should be something like;-
    class AllComponentsFrame{}
    /* class AmendedComponentsFrame1 extends AllComponentsFrame{} // maybe? */
    class FinalGUI1 extends AllComponentsFrame{}
    class FinalGUI2 extends AmendedComponentsFrame1 {}

  • EJB and Dictionary Deployment Problem

    Hi,
    I am new to SAP J2EE engine. I tried deploying a simple EJB application with one entity(CMP) and one stateless session bean but cud not succeed. These were the problems:
    1. When I used SAPDB for CMP, it said the table TMP_EMPLOYEE (which the CMP bean maps to, as per persistet.xml) is not found in the catalog. Then I created a dictionary project with the TMP_EMPLOYEE table defined, but I couldn't deploy the dictionary archive. SDM (from the NWS IDE) says this:
    Result
    => deployment not executed : file:/C:/DOCUME1/i031278/LOCALS1/Temp/temp11240EmployeeDB.sda
    The SDA with development component 'EmployeeDB'/'sap.com'/'localhost'/'2004.11.25.19.41.45' changed its software type from J2EE to JDDSCHEMA. This change is not supported.
    Deployment will be aborted.
    Deployment exception : Got problems during deployment
    2. When I changed the DB provider to MS_SQL_SERVER, which had EMPLOYEEDB/TMP_EMPLOYEE defined, and the SQL server was started, the Table was again not found! (i.e., if I switch off deploy-time table verification, this TableLockingException is thrown. Otherwise ORMappingVerificationException is thrown when the deploy-time verification switch is on).
    I have specified the resource-ref etc properly now. This sample application also has a servlet which tries to access the session bean, which inturn talks to the CMP bean. I'm sure that the JNDI names are properly referred.
    I am using SAP J2EE engine 6.40 with SP9 and IDE is 2.0.9.
    Another thing: I tried to deploy the tutorial 'Car Rental EJB Application' application's dictionary. Even that failed with the same error!
    Please help me with this.
    Thanks a lot!
    Regards,
    Prashanth

    Problem solved in person

  • Servlet - EJB, caching home & context problem

    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

    The security creditials you suppplied to the IntialContext are only applied
    to the thread that created the InitialContext. I have only found one
    work-around - Construct an otherwise useless IntialContext each time a
    thread attempts to use and EJB or its home. This is inefficient and almost
    (not quite) destroys the advantage of caching the stubs.
    Is there any other solution? Any thing coming down the pike?
    Chuck McCorvey
    "Marcel Zielinski" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    I just run into the following problem:
    I created a thin client which accesses the EJB's via a servlet.
    In this servlet I cached the InitialContext und and the reference
    to the Home interface. While creating the initial context I provided
    login/password to access the EJB so it can't be accessed from the guest
    user.
    The first method call works as expected, any further call results
    in a RemoteException - Insufficent permissions.
    Any hints? I'm using 5.1, SP6.
    Zhanxs in advance
    Marcel

  • Object Inheritance problem between projects

    Hi,
    I have two projects lets say project1 and project2. From project1 I instanciate processes of project2 as subflows. In addition I have one bpm object in project1 (lets say object1) that inherits from a bpm object in proyect2 (lets say object2). So project1 depends on project2 to make this inheritance happen. When I call the subflow I pass the object1 and as inherits from object2 there is no problem (input argument). For the output argument I have to cast from object2 to object1. And here is where I have a classcastexception. If all the processes are in the same project it works fine and there is no exception. But when splitting in two projects it fails. Seems that it is something related to the folder structure in the catalog that should be the same for both projects and that is the reason why it does not work, but as one project depends to the other I can not put the same folder structure in both catalogs because in the dependant project it is duplicated.
    Has anybody can give me an idea on how to solve this?
    Thank you very much in advance
    Kind regards

    Nobody can help me with this issue?,any help is much appreciated, the excpetion I get is:
    An operation exception occurred while running an automatic item. Details: An instance in Process '/Prueba#Default-1.0' could not be notified. Caused by: Process execution engine execution error. Caused by: The method 'CIL_otherProjectOtherProjectIn' from class 'Novartis.Prueba.Default_1_0.Instance' could not be successfully executed. Caused by: Cannot convert an object with type xobject.BaseModule.BaseObject to class xobject.DependantModule.DependantObject fuego.papi.exception.CannotStoreNotificationException: An instance in Process '/Prueba#Default-1.0' could not be notified. at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2791) at fuego.server.iec.LocalIPCHandler.sendNotification(LocalIPCHandler.java:79) at fuego.server.execution.microactivity.DefaultSendNotificationExecutionHandler.sendNotification(DefaultSendNotificationExecutionHandler.java:103) at fuego.server.execution.microactivity.EndMicroActivity.execute(EndMicroActivity.java:69) at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57) at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62) at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42) at fuego.server.execution.ToDoItem.executeAutomaticWork(ToDoItem.java:251) at fuego.server.execution.ToDoItem.run(ToDoItem.java:536) at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:775) at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142) at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134) at fuego.fengine.ToDoQueueThread$PrincipalWrapper.processBatch(ToDoQueueThread.java:450) at fuego.component.ExecutionThread.work(ExecutionThread.java:839) at fuego.component.ExecutionThread.run(ExecutionThread.java:408) Caused by: fuego.papi.impl.EngineExecutionException: Process execution engine execution error. at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:202) at fuego.server.execution.EngineExecution.executeWithoutComponentImmediate(EngineExecution.java:95) at fuego.server.AbstractProcessBean.receiveNotification(AbstractProcessBean.java:2757) ... 21 more Caused by: fuego.lang.ComponentExecutionException: The method 'CIL_otherProjectOtherProjectIn' from class 'Novartis.Prueba.Default_1_0.Instance' could not be successfully executed. at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519) at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273) at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219) at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1277) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.runCil(ComponentExecutionMicroActivity.java:126) at fuego.server.execution.microactivity.ComponentExecutionMicroActivity.execute(ComponentExecutionMicroActivity.java:84) at fuego.server.execution.microactivity.MicroActivityEngineExecutionHandler.executeActivity(MicroActivityEngineExecutionHandler.java:57) at fuego.server.execution.ImmediateActivity.execute(ImmediateActivity.java:42) at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304) at fuego.transaction.TransactionAction.startNestedTransaction(TransactionAction.java:527) at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:548) at fuego.transaction.TransactionAction.start(TransactionAction.java:212) at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123) at fuego.server.execution.DefaultEngineExecution.executeWithoutComponentImmediate(DefaultEngineExecution.java:199) ... 23 more Caused by: java.lang.ClassCastException: Cannot convert an object with type xobject.BaseModule.BaseObject to class xobject.DependantModule.DependantObject at fuego.util.Conversion.cast(Conversion.java:99) at Novartis.Prueba.Default_1_0.Instance.CIL_otherProjectOtherProjectIn(Instance.xcdl:1) at Novartis.Prueba.Default_1_0.Instance.CIL_otherProjectOtherProjectIn(Instance.xcdl) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512) ... 36 more
    The strange thing is that if all the processes are in the same project everything works fine but once I split in two projects it raises the exception.
    Thank you very much

  • Java ME 3.0 Web Services Stub Generator  Inheritance problem

    Hello,
    I have a problem with that relates to inheritance.
    Suppose I have abstract class User and class Member that extends class User.
    Suppose I have web service MyService:
    @WebService
    public class MyService {
    public User getUser(int id) {
    // do something
    When the server returns a Member instance instead of User I receive a MarshalException at the Client.
    The reason is " Invalid Element in Response:" + Member field that isn't part of User.
    I am using Java Me SDK 3.0 wscompile stub generator.
    I have also checked it with GlassFish stub generator wsimport and there the problem didn't appear.
    Ideas ?
    Thanks in advance,
    Raanan

    Seems like you are missing a necessary jar-file in your forms-classpath. Check the libraries attached to your project in Jdeveloper and add them to the path.

  • Ejb and jsproc deployment problems

    Am trying to deploy the java stored procedure (jsp) example
    (jsproc subdirectory in acmevideo directory) and the enterprise
    java bean (ejb) example (ejb subdirectory in acmevideo
    directory). Both use the business and util subdirectries of
    acmevideo directory. These examples are provided with
    JDeveloper.
    In the case of the jsp example, the files compile fine in
    JDeveloper. The deployment profile file is created okay using
    the Stored Procedure Profile Wizard. But when the jsp is
    attempted to be deployed by right clicking the deployment
    profile file menu in JDeveloper, the following errors appear:
    SQL error during creation of acmevideo/util/DataWrapper
    ORA-00922 - missing or invalid option
    SQL error during creation of acmevideo/business/TitleQueries
    ORA-00922 - missing or invalid option
    Is there a corrective action for these errors? Are the details
    recorded in any log so that these errors can be troubleshooted?
    In the case of the jbe example, the files compile fine in
    JDeveloper. The deployment profile file is created okay using
    the EJB Profile Wizard. But when the jsp is attempted to be
    deployed by right clicking the deployment profile file menu in
    JDeveloper, the following happens:
    The message indicating that the deployment will take a few
    minues continues to show forever. There is no completion,
    and one is forced to cancel the process.
    This happens when using the port settings of 1521, 1526 (Oracle
    listener ports) or 2651 (OAS ORB port). Specifying the service
    or omitting it yeilds the same results.
    Is there a corrective action for this? Are the details recorded
    in any log so that these errors can be troubleshooted?
    For both the situations, is the classpath variable need to set
    outside the JDeveloper environment?
    Also am not able to locate the Oracle 8i CORBA and Enterprise
    Java Beans Developer's Guide and the Oracle 8i Java Stored
    Procedure Developer's Guide referenced in Building Java
    Applications for Oracle 8i anywhere.
    Would appreciate any help in this area.
    null

    : Has anyone been able to deploy an ejb from JDeveloper2 (Beta)?
    We have ;) But I guess that doesn't count... Please have a look
    at the online demo for Enterprise JavaBeans on this technet
    website. You can get there through the JDeveloper Tech Info page.
    Please open a new thread if that doesn't help you.
    Thanks,
    -Roel.
    phil gulesian (guest) wrote:
    : mark tomlinson (guest) wrote:
    : : pretty sure the first one is a bug that is fixed in a later
    : : build of JDeveloper (JSP deployment problem).
    : : As for the EJB deployment problem, here is the way to catch
    : what
    : : is really going on (in the Beta build -- this will be done
    much
    : : better in the production build):
    : : -edit the jdeveloper.ini (in the BIN directory), in the
    : : [environment] section add:
    : : LogConsole=1
    : : -edit the jdeveloper.properties file (in the LIB directory)
    : : change the line :
    : : jdeveloper.logOutput=nul
    : : to
    : : jdeveloper.logOutput=-
    : : Now when you run JDeveloper, you will get an output onsole
    : : window for the JVM running JDeveloper. You will be able to
    see
    : : the deployment messages for the EJB wizard being sent to this
    : : console. This will allow you to troubleshoot what is
    happening.
    : I had the same experience as Bansi (above) when I tried to
    deploy
    : a simple ejb. Following your suggestions about looking in the
    : output console window for the JVM, I observed the message
    : "PropertyEditor for borland.sql.dataset.ProcedureDescriptor
    could
    : not be registered ........" A subsequent search found no
    : ProcedureDescriptor in the borland.sql.dataset package.
    : Has anyone been able to deploy an ejb from JDeveloper2 (Beta)?
    null

  • Inheritance problem with parent class calling child class

    I have a problem with inheritance with a parent class calling a child class method. Below is the example pseudocode code and my problem:
    public abstract class A {
        protected void function1 ( ) { }
        protected void function2 () {
             //calls function1();
             function1();
    public abstract class B extends A {
        protected void function1 ()  {
             // do stuff
    public class C extends B {
        protected void function1 ()  {
            // do stuff
            super.function1 ();
    }I have an object instance of class C created and its function2() is invoked.
    My problem is, while in function2(), which belongs to abstract class A and the method call to function 1() is called, the call invokes the function1() of class B. Shouldn't the call invoke function 1() of class C instead? And then function1() of class B will be called after due to the super.function1(). It's not behaving like I thought it would.
    Edited by: crono77 on Jan 10, 2008 8:13 PM

    Nevermind, i found my error :)

Maybe you are looking for