Can I deploy the entity bean in different jar files?

I have an application EAR, which contains several JARs. I have an entity bean A that has relationships with 2 other different entity beans B and C in the same DB. Now, I have to deploy this entity A together with B in AB.jar, and A with C in AC.jar. Both AB.jar and AC.jar are modules of the same application EAR file. They all use the same data sources to the same database, and named by different <ejb-name>.
I have no problem with deploying the app to WebLogic 8.1. But the JSP page accessing entity A got errors. Sometime, it got error complaining that the container-generated ejbFindAccount mehtod is abstract.
My questions are,
Can an entity bean be defined twice in 2 different jars?
When container load AB.jar and AC.jar, does it generate the finder methods twice?
I guess there are some name conflicts going on here. What should I do to avoid it?
Any comments are very much appreciated.

Thanks for your answer, but how can I use it in connection with relationships?
<!-- ********************************************************************** -->
<!-- Relationship: View to FrameworkUser                                             -->
<!-- ********************************************************************** -->
<ejb-relation id="View-FrameworkUser">
     <description></description>
     <ejb-relation-name>View-FrameworkUser</ejb-relation-name>
     <ejb-relationship-role>
          <ejb-relationship-role-name>Views-have-FrameworkUser</ejb-relationship-role-name>
          <multiplicity>Many</multiplicity>
          <relationship-role-source>
               <ejb-name>View</ejb-name>
          </relationship-role-source>
          <cmr-field>
               <cmr-field-name>frameworkUser</cmr-field-name><!-#- getter/setter -#->
               <cmr-field-type>java.util.Collection</cmr-field-type>
          </cmr-field>
     </ejb-relationship-role>
     <!-#- *************** -#->
     <ejb-relationship-role>
          <ejb-relationship-role-name>FrameworkUser-has-Views</ejb-relationship-role-name>
          <multiplicity>One</multiplicity>
          <relationship-role-source>
               <!-#- *******REFERENCE******** -#->
               <ejb-name>ejb_foo_jar2_ejb.jar#FrameworkUser</ejb-name>
               <!-#- *******REFERENCE******** -#->
          </relationship-role-source>
     </ejb-relationship-role>
</ejb-relation>
...this obviously doesn't work...
Do I have to write a new <entity> where I define the referenced entity?

Similar Messages

  • I can not fine the Entity Bean's advantage than Java Bean?

    I can not fine the Entity Bean's advantage than Java Bean,
    can you tell me, thanks a lot?

    I can not fine the Entity Bean's advantage than Java
    Bean,
    can you tell me, thanks a lot?I think you should read more of the EJB Spec. You'll find your answer there. But mainly with entities you can have the container manage all the lifecyle of the Bean (transactions, caching, creation, etc...). But entities are not only to map columns in the database, they are supposed to have business code. See more by reading the spec.
    MSB

  • Can I deploy the session bean to 9i in the JDeveloper3.2

    dear ONT
    My JDeveloper3.2 can't find the method to deploy the session bean to 9i.
    sk

    I'm not sure that's entirely correct.
    Personally I run both EJBs and servlets/JSP in OC4J. OC4J has all the 'web' features of IAS, including full SSL support.
    From a speed perspective, running the EJBs and web components in the same container will give you a huge benefit.
    Also I'm not sure what you mean by "you can't deploy EJBs into OC4J yet" - I do it daily? ;)
    -mike
    Atlassian - Supporting Your 'Orion/OC4J' World
    http://www.atlassian.com

  • Can't find the plugin folder to add jar file

    I installed Adobe Drive 4 in Mac. I want to have our own specified Drive Connector, so I had been trying to put the jar file in the plugin folder, but I didn't even find the plugin folder.
    I am using Mac, so I know I should put the file in:
    In Mac OS: /Library/Application Support/Adobe/AD4ServiceManager
    In Windows XP: C:\Program Files\Common Files\Adobe\AD4ServiceManager
    But I can't find the plugin folder there,
    Could anyone please help me?
    thanks a lot,
    Liang

    I also installed Adobe Photoshop CS6, Bridge CS6.
    The following are how it looks like in Application folder and folder /Library/Application Support/Adobe/AD4ServiceManager

  • Exception occuring while trying to deploy the Entity Bean

    Unable to deploy EJB: com_poc_RetirementPlanHome from frameworkproofofconcept_weblogic.jar:
    There is a mismatch between the bean code and generated code.com_poc_RetirementPlanHome
    .      Please rerun ejbc on the bean code.The error was java.lang.NoSuchFieldException
         at java.lang.Class.getField0(Native Method)
         at java.lang.Class.getDeclaredField(Class.java:1108)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMDField(ClientDrivenBeanInfoImpl.java:651)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.setMethodDescriptors(ClientDrivenBeanInfoImpl.java:723)
         at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.deploy(ClientDrivenBeanInfoImpl.java:823)
         at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
         at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
         at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
         at weblogic.j2ee.Application.deploy(Application.java:258)
         at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:190)
         at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:366)
         at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:300)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1401)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:894)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:296)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:393)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:299)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy8.setDeployed(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
         at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:1068)
         at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
         at weblogic.j2ee.Application.deploy(Application.java:258)
         at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:190)
         at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:366)
         at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:300)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1401)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:894)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:296)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:393)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:299)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy8.setDeployed(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.MBeanAttribute.doSet(MBeanAttribute.java:84)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    To be sure, I'd recompile the jar and also make sure that
    none of the Bean related interfaces are reachable from the
    server's CLASSPATH.

  • Can't deploy BMP Entity bean (iAS903)

    When I create findAll() method in Local interface and try to deploy apllication with BMP, server return "Deployment failed: Nested exception Root Cause: Syntax error in source. Syntax error in source".
    If remove findAll(), all OK.
    If use Remote interface - also all OK.
    How does BMP with fildAll() in Local interface deploy in iAS903?
    thanks
    Alexey.

    Alexey -- A fix will be coming out in the next release but before then you can ask your support representative for a patch for bug#2587584. This should solve the problem.
    Thanks -- Jeff

  • Can I deploy the same ear one different OS

    Hi,
              I created 1 ear file on NT and deployed using WebLogic 6.1 SP2 on NT. It
              works fine. I want to deploy it on other OS (I don't have WebLogic on other
              OS installed yet). Can it work?
              Thanks.
              C Zhang
              

    Thanks a lot.
              "William Kemp" <[email protected]> wrote in message
              news:[email protected]..
              > Same JDK, same WLS version. It should work. It's Java/J2EE/WLS. It's why
              we are
              > all here. ;-)
              >
              > Bill
              >
              > BEA wrote:
              >
              > > Hi,
              > > I created 1 ear file on NT and deployed using WebLogic 6.1 SP2 on NT. It
              > > works fine. I want to deploy it on other OS (I don't have WebLogic on
              other
              > > OS installed yet). Can it work?
              > >
              > > Thanks.
              > >
              > > C Zhang
              >
              

  • Problem in deploying CMP entity bean 2.0 in J2EE 1.4

    i am trying to deploy a cmp entity bean 2.0 using j2ee1.4 deployment tool. the bean uses sql server as the database. i have successfully created a coonection pool for sql server using j2ee admin console. the entity bean class files are successfully compiled. but while deploying the entity bean i am not able to set the database settings and jndi name for the bean. can one please guide me in the deployment steps in j2ee1.4.
    mohit

    Mohit,
    We are discussing this topic in the fourm below. I'm having the same problem so feel free to join our conversation.
    ~Howard
    http://forum.java.sun.com/thread.jsp?forum=13&thread=478054

  • I am facing a problem while deploying an Entity bean in iPlanet(sp3).I have attached the exception thrown.Why has this exception occured?

    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown Source)
    at com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown Source)
    at samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)

    Hi,
    I think you are trying to test the Hello world EJB example shipped with the product. As a first
    step I would recomend you to go through every line of the document on deploying this application,
    since, I too have experienced many errors while trying to deploy the sample applications, but on
    following the documentation, I subsequently overcame all the errors and have been working with the
    applications. So please follow the steps in documentation and let me know, if you still encounter any
    issues.
    Regards
    Raj
    Sandhya S wrote:
    I am facing a problem while deploying an Entity bean in iPlanet(sp3).I
    have attached the exception thrown.Why has this exception occured?
    [04/Dec/2001 10:54:00:2] error: EBFP-marshal_internal: internal
    exception caught in kcp skeleton, ex
    ception = java.lang.NullPointerException
    [04/Dec/2001 10:54:00:2] error: Exception Stack Trace:
    java.lang.NullPointerException
    at java.util.Hashtable.get(Hashtable.java:321)
    at
    com.netscape.server.ejb.SQLPersistenceManager.<init>(Unknown Source)
    at
    com.netscape.server.ejb.SQLPersistenceManagerFactory.newInstance(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.getPersistenceManager(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.doPersistentFind(Unknown
    Source)
    at
    com.netscape.server.ejb.EntityDelegateManagerImpl.find(Unknown Source)
    at com.kivasoft.eb.EBHomeBase.findSingleByParms(Unknown
    Source)
    at
    samples.test.ejb.Entity.ejb_home_samples_test_ejb_Entity_TestEntityBean.findByPrimaryKey(
    ejb_home_samples_test_ejb_Entity_TestEntityBean.java:126)
    at
    samples.test.ejb.Entity.ejb_kcp_skel_TestEntityHome.findByPrimaryKey__samples_test_ejb_En
    tity_TestEntity__int(ejb_kcp_skel_TestEntityHome.java:266)
    at com.kivasoft.ebfp.FPRequest.invokenative(Native Method)
    at com.kivasoft.ebfp.FPRequest.invoke(Unknown Source)
    at
    samples.test.ejb.Entity.ejb_kcp_stub_TestEntityHome.findByPrimaryKey(ejb_kcp_stub_TestEnt
    ityHome.java:338)
    at
    samples.test.ejb.Entity.ejb_stub_TestEntityHome.findByPrimaryKey(ejb_stub_TestEntityHome.
    java:85)
    at samples.test.ejb.TestEJB.getGreeting(TestEJB.java:51)
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Deploying BMP Entity Bean with primary key calss

    Hi,
    I am using EJB 2.0 with and websphere studio 5.0 and database is sql server 2000.
    My BMP Entity bean has a primary key class.From my client I am invoking the Entity Bean by calling it's findbyprimarykey method.
    The home interface of my findbyprimarykey method returns a class of type Remote.But in the Entity Bean class,the return type is the primarykey class type.
    My problem is invoking this findbyprimarykey from the client to get the remote interface so that the other business methods of the entity bean can be called.
    The control goes into the ejbFindbyPrimaryKey but when it is returing from the Entity Bean class,it gives a remote exception (as the return type in Entity Bean class and Home interface are different for the findbyprimarykey method).
    I think that somewhere in the deployment decriptor in my websphere,i have to specify the primarykey class type,which i am missing out and hence getting the error.
    Please help me out with your advice and solution.
    Thanks
    Rahul Priyadarshi

    Hi,
    Sorry to disturb you again.
    Even my code is also almost the same....i am pasting the code below...Please go through it and let me know if I have made any mistake..
    EditVendorEntityBean.....(Bean Class)
    package code.beans.EditVendor;
    import code.beans.dataAccess.*;
    import javax.ejb.CreateException;
    import javax.ejb.RemoveException;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.EJBException;
    import javax.ejb.FinderException;
    import javax.ejb.ObjectNotFoundException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.sql.*;
    import javax.sql.*;
    import java.util.*;
    * Bean implementation class for Enterprise Bean: EditVendorEntity
    public class EditVendorEntityBean implements javax.ejb.EntityBean {
         private static Hashtable dataSources = new Hashtable();
         private String username;
    private int Vendor_ID;
    private int Category_Id;
    private String Category_Name;
    private String Vendor_Name;
    private String Vendor_Address1;
    private String Vendor_Address2;
    private String Contact_Name;
    private String Home_Phone;
    private String Work_Phone;
    private String email;
    private String faxno;
    private String userloginname;
    private boolean dirtyFlag = false;
    private EntityContext context;
    private static final String DS_NAME = "jdbc/spiPOPS";
    Connection con = null;
    Statement stmt = null;
    PreparedStatement st = null;
    ResultSet res = null;
         //***********************Business Methods*********************
    // Begin of Busines Methods
    public void setData (String[] catname, String vendorname,String vendadd1,String vendadd2,String vendcontact,String venoff,String venres,String mailid,String venfax) {
              System.out.println("in setData where Vendor Id= "+ Vendor_ID);
                   boolean status=false;
                   boolean existing=false;
                   ArrayList cat=new ArrayList();
                   try
                        cat=getcategorylist(this.Vendor_ID);
                   catch(SQLException e)
                        System.out.println("Could not get category list");
                   System.out.println("Size of cat array -->" + cat.size() + " and string array size -->" + catname.length);
                   if(catname.length>0)
                        //Removing unwanted vendor categories for a particular vendor id
                        for(int i=0;i<cat.size();i++)
                                  existing=false;
                                  String tempdata=(String)cat.get(i);
                                  for(int j=0;j<catname.length;j++)
                                       if(tempdata.equals(catname[j]))
                                            existing=true;
                                  if(!existing)
                                       try
                                            delvencat(this.Vendor_ID,tempdata.trim());
                                       catch(SQLException e)
                                            System.out.println("Could not delete record in POPS_VENDOR_CATEGORY for -->" + tempdata);
                   //Adding new vendor categories for a particular vendor
                        try
                                  for(int i=0;i<catname.length;i++)
                                       status=false;
                                       String strcat=catname;
                                       status=checkcat(this.Vendor_ID,strcat.trim());
                                       if(!status)
                                            insertvencat(this.Vendor_ID,strcat.trim());
                        catch(SQLException e)
                                  System.out.println("Could not insert or select from POPS_VENDOR_CATEGORY table");
                   this.Vendor_Name          =vendorname;
              this.Vendor_Address1     =vendadd1;
              this.Vendor_Address2     =vendadd2;
              this.Contact_Name          =vendcontact;
              this.Work_Phone               =venoff;
              this.Home_Phone               =venres;
              this.email                    =mailid;
              this.faxno                    =venfax;
                   dirtyFlag = true;
                   System.out.println("Leaving set data method");
    public Vector getData() {
         Vector vctRec=new Vector();
         ArrayList arrdatas = new ArrayList();
         arrdatas.add(""+this.Vendor_ID);
         arrdatas.add(this.Vendor_Name);
         arrdatas.add(this.Vendor_Address1);
         arrdatas.add(this.Vendor_Address2);
         arrdatas.add(this.Contact_Name);
         arrdatas.add(this.Work_Phone);
         arrdatas.add(this.Home_Phone);
         arrdatas.add(this.email);
         arrdatas.add(this.faxno);
         vctRec.addElement(arrdatas);
         ArrayList cat=new ArrayList();
              try
              System.out.println("Calling getcategorylist from getdata with vendorid-->" + this.Vendor_ID);
              cat          = getcategorylist(this.Vendor_ID);
         catch(SQLException e)
                   System.out.println("Could not get datas for category list");
         vctRec.addElement(cat);
         ArrayList allcats=new ArrayList();
         try
                        allcats          = getallcategorylist();
              catch(SQLException e)
                        System.out.println("Could not get datas for category list");
         vctRec.addElement(allcats);
              dirtyFlag = false;
         System.out.println("Before return statement in getdata with vector size -->" + vctRec.size());
              return vctRec;
    // End of Business Methods
    //**************************Entity Bean Methods*******************************
         * ejbActivate
         public void ejbActivate() {
              Vendor_ID = Integer.parseInt((String)context.getPrimaryKey());
         System.out.println("Inside ejbActivate Vendor_ID-->"+ Vendor_ID);
         * ejbLoad
         public void ejbLoad() {
              System.out.println("Inside ejbLoad ********" );
    try {
    loadRow();
    }catch (Exception ex) {
              System.out.println("Failed in loadRow()");
    throw new EJBException("ejbLoad: " +
    ex.getMessage());
         * ejbPassivate
         public void ejbPassivate() {
         System.out.println("Inside ejbPassivate " );
    Vendor_ID = 0;
         * ejbRemove
         public void ejbRemove() throws javax.ejb.RemoveException {
              //Empty Method
         * ejbStore
         public void ejbStore() {
    System.out.println("Inside ejbStore " );
    try {
    storeRow();
    }catch (Exception ex) {
              System.out.println("Exception thrown in storeRow" + ex.getMessage());
    throw new EJBException("ejbLoad: " +
    ex.getMessage());
         * getEntityContext
         public javax.ejb.EntityContext getEntityContext() {
              return context;
         * setEntityContext
         public void setEntityContext(javax.ejb.EntityContext ctx) {
              System.out.println("Inside setEntityContext " );
    try{
         con = getConnection(DS_NAME);
         System.out.println("DB Connection Created!!");
    catch(Exception e){
    this.context = ctx;
         * unsetEntityContext
         public void unsetEntityContext() {
    System.out.println("Inside unsetEntityContext " );
    closeDbConnection(con, res, st);
    this.context = null;
         * ejbCreate
         //code.beans.EditVendor.EditVendorEntityKey
         public code.beans.EditVendor.EditVendorEntityKey ejbCreate(String vendorid)
              throws javax.ejb.CreateException {          
              return new EditVendorEntityKey(vendorid);
              //return null;
         * ejbPostCreate
         public void ejbPostCreate(String vendorid) throws javax.ejb.CreateException {
              //Empty
         * ejbFindByPrimaryKey
         //code.beans.EditVendor.EditVendorEntityKey
         public code.beans.EditVendor.EditVendorEntityKey ejbFindByPrimaryKey(
              code.beans.EditVendor.EditVendorEntityKey primaryKey)
              throws javax.ejb.FinderException {
    try {
    if(selectByPrimaryKey(Integer.parseInt(primaryKey.getVendorId()))) {
              System.out.println("Leaving the findbyprimarykey method from the entity bean");
         return primaryKey;
         //return null;
    }else {
         throw new ObjectNotFoundException
         ("Row for id " + primaryKey + " not found.");
    }catch (Exception ex) {
    throw new EJBException("EXCEPTION IN ejbFindByPrimaryKey :- " + ex.getMessage());
         /*********************** Database Utility Routines *************************/
    private boolean selectByPrimaryKey(int priKey)
    throws SQLException {
         System.out.println("inside selectByPrimaryKey for primary key " + priKey);
    String queryStr ="SELECT VENDOR_ID FROM POPS_VENDOR WHERE VENDOR_ID = " + priKey;
    System.out.println("in selectByPrimaryKey where queryString is: "+ queryStr);
              stmt = con.createStatement();
    ResultSet result = stmt.executeQuery(queryStr);
    if(!result.next()) {
    stmt.close();
         System.out.println("Did not find "+priKey);
    return false;
    else { //Found the primaryKey
    Vendor_ID = result.getInt("VENDOR_ID");
    stmt.close();
    return true;
    private void loadRow() throws SQLException {
              System.out.println("inside loadRow ...");
              stmt = con.createStatement();
              String queryStr = "SELECT VENDOR_NAME,VENDOR_ADDRESS1,VENDOR_ADDRESS2,CONTACT_NAME,HOME_PHONE,WORK_PHONE,EMAIL_ID,FAX_NO " +
                                  "FROM POPS_VENDOR WHERE VENDOR_ID=" + Vendor_ID;
              System.out.println("Inside loadRow()***********"+queryStr);
              ResultSet result = stmt.executeQuery(queryStr);
              ArrayList catadatas=new ArrayList();
         if(!result.next())
         throw new SQLException("No record for primary key" + Vendor_ID);
              this.Vendor_ID               =Vendor_ID;
                        this.Vendor_Name          =result.getString("VENDOR_NAME");
                        this.Vendor_Address1     =result.getString("VENDOR_ADDRESS1");
                        this.Vendor_Address2     =result.getString("VENDOR_ADDRESS2");
                        this.Contact_Name          =result.getString("CONTACT_NAME");
                        this.Home_Phone               =result.getString("HOME_PHONE");
                        this.Work_Phone               =result.getString("WORK_PHONE");
                        this.email                    =result.getString("EMAIL_ID");
                        this.faxno                    =result.getString("FAX_NO");
                             System.out.println("Leaving loadrow method with loaded datas for vendor -->" + Vendor_ID);
                             stmt.close();
    private ArrayList getcategorylist(int vendor) throws SQLException{
              String queryStr ="SELECT DISTINCT(VENDOR_CAT) FROM POPS_VENDOR_CATEGORY WHERE VENDOR_ID=" + vendor;
              System.out.println("Query for the cat list --> " + queryStr);
              stmt = con.createStatement();
              ResultSet result = stmt.executeQuery(queryStr);
              ArrayList catdatas=new ArrayList();
    try{
                   while(result.next())
                        catdatas.add(result.getString("VENDOR_CAT"));
              catch (SQLException e){
                   stmt.close();
                   System.out.println("Could not retrieve datas for Category list");
              stmt.close();
              System.out.println("size off array for cat -->" + catdatas.size() + " and datas ->" + catdatas);
              return catdatas;
         private ArrayList getallcategorylist() throws SQLException{
                   //String queryStr ="SELECT DISTINCT(VENDOR_CAT) FROM POPS_VENDOR_CATEGORY";
                   StringBuffer strquery=new StringBuffer(20);
                   strquery.append("SELECT DISTINCT(CATEGORY_NAME) FROM POPS_CATEGORY");
                   stmt = con.createStatement();
                   //ResultSet result = stmt.executeQuery(queryStr);
                   ResultSet result = stmt.executeQuery(strquery.toString());
                   ArrayList catdatas=new ArrayList();
                   try{
                        while(result.next())
                                  //catdatas.add(result.getString("VENDOR_CAT"));
                                  catdatas.add(result.getString("CATEGORY_NAME"));
                   catch (SQLException e){
                             stmt.close();
                             System.out.println("Could not retrieve datas for All Category list");
                   stmt.close();
                   return catdatas;
         private void delvencat(int vendor,String vencat) throws SQLException {
              int update=-1;
              stmt = con.createStatement();
              String queryStr ="DELETE FROM POPS_VENDOR_CATEGORY WHERE VENDOR_ID = " + vendor + " AND VENDOR_CAT = '" + vencat.toUpperCase() + "'";
              System.out.println("Delete query --> " + queryStr);
              update= stmt.executeUpdate(queryStr);
              if(update!=1)
                   System.out.println("Did not find data to delete");
              stmt.close();
         private void insertvencat(int vendor,String vencat) throws SQLException {
              int update=-1;
              String queryStr ="INSERT INTO POPS_VENDOR_CATEGORY(VENDOR_ID,VENDOR_CAT)" +
                                  " VALUES(" + vendor +",'" + vencat + "')";
              System.out.println("Insert query --> " + queryStr);
              stmt = con.createStatement();
              update=stmt.executeUpdate(queryStr);
              if(update!=1)
                   System.out.println("Could not insert records in the database");
              stmt.close();
         private boolean checkcat(int vendor,String catven) throws SQLException {
              boolean datastatus=false;
              String queryStr ="SELECT VENDOR_ID FROM POPS_VENDOR_CATEGORY WHERE VENDOR_ID = " + vendor + " AND VENDOR_CAT = '" + catven.toUpperCase() + "'";
              stmt = con.createStatement();
              ResultSet result = stmt.executeQuery(queryStr);
              datastatus=result.next();
              stmt.close();
              return datastatus;
    private void storeRow() throws SQLException {
                   System.out.println("Inside ejb store");
         if (!dirtyFlag) {
         System.out.println("Skipping the UPDATE because object is not dirty");
         return;
         CallableStatement cs=null;
    try{
                        cs = con.prepareCall("EXEC POPS_VENDOR_UPDATE " + this.Vendor_ID + ",'" + this.Vendor_Name + "','" + this.Vendor_Address1 + "','" + this.Vendor_Address2 + "','" + this.Contact_Name + "','" + this.Work_Phone + "','" + this.Home_Phone + "','" + this.email + "','" + this.faxno +"'");
                        System.out.println("\n\n SQL Statement : \n " + "EXEC POPS_VENDOR_UPDATE " + this.Vendor_ID + ",'" + this.Vendor_Name + "','" + this.Vendor_Address1 + "','" + this.Vendor_Address2 + "','" + this.Contact_Name + "','" + this.Work_Phone + "','" + this.Home_Phone + "','" + this.email + "','" + this.faxno +"'");
                        cs.executeUpdate();
              catch (SQLException e){
                        cs.close();
                        System.out.     println("\n\n Error in calling stored procedure POPS_INSERT_NEW_REQUEST \n\n"+ e.getMessage() + "\n\n");
              cs.close();
              dirtyFlag = false;
         private Connection getConnection(String dbName) throws SQLException
              String configuredDataSourceName = null;
              if (dbName == null) {
                   System.out.println("Attemp to get connection failed. The requested database name is null");
              DataSource dbSource = getDataSource(dbName);
              return dbSource.getConnection();
         private DataSource getDataSource(String dbName)
              // looking from cache;
              DataSource dbSource = (DataSource) dataSources.get(dbName);
              if (dbSource == null) { //we need to find it from JNDI
                   try {
                        Context ic = new InitialContext();
                        dbSource = (DataSource) ic.lookup(dbName);
                        dataSources.put(dbName, dbSource);
                   }catch (NamingException e){
              return dbSource;
         * User calls this function to safely close an connection
         * @param connt The connection a datasource
         * @param rs The resulSet inside this connection
         * @param statement The statement associate with this connection
         private void closeDbConnection(Connection cont,ResultSet rs,Statement statement)
              if (rs != null)
              try {
                        rs.close();
                   } catch (SQLException ignored) {
                        ignored.printStackTrace();
              if (statement != null)
                   try {
                        statement.close();
                   } catch (SQLException ignored) {
                        ignored.printStackTrace();
              if (cont != null)
                   try {
                        cont.close();
                   } catch (SQLException ignored) {
                        ignored.printStackTrace();
         } //closeDbConnection
    EditVendorEntity (Remote Interface)
    package code.beans.EditVendor;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    import java.util.*;
    * Remote interface for Enterprise Bean: EditVendorEntity
    public interface EditVendorEntity extends javax.ejb.EJBObject {
         public void setData (String[] catname, String vendorname,String vendadd1,String vendadd2,String vendcontact,String venoff,String venres,String mailid,String venfax)
                   throws RemoteException;
    public Vector getData() throws RemoteException;
    EditVendorEntityHome (Home Interface)
    package code.beans.EditVendor;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import javax.ejb.DuplicateKeyException;
    import javax.ejb.EJBHome;
    import java.util.*;
    * Home interface for Enterprise Bean: EditVendorEntity
    public interface EditVendorEntityHome extends javax.ejb.EJBHome {
         * Creates an instance from a key for Entity Bean: EditVendorEntity
         public code.beans.EditVendor.EditVendorEntity create(String vendorid)
              throws javax.ejb.CreateException, java.rmi.RemoteException;
         * Finds an instance using a key for Entity Bean: EditVendorEntity
         public code.beans.EditVendor.EditVendorEntity findByPrimaryKey(
              code.beans.EditVendor.EditVendorEntityKey Vendor_ID)
              throws javax.ejb.FinderException, java.rmi.RemoteException;
    EditVendorEntityKey (Primary Key Class)
    package code.beans.EditVendor;
    * Key class for Entity Bean: EditVendorEntity
    public class EditVendorEntityKey implements java.io.Serializable {
         static final long serialVersionUID = 3206093459760846163L;
         public String primkey;
         * Creates an empty key for Entity Bean: EditVendorEntity
         public EditVendorEntityKey() {  }
         public EditVendorEntityKey(String primarykey) {     
              this.primkey=primarykey;
         public String getVendorId() {
    return primkey;
         * Returns true if both keys are equal.
         public boolean equals(java.lang.Object otherKey) {
              if (otherKey instanceof code.beans.EditVendor.EditVendorEntityKey) {
                   code.beans.EditVendor.EditVendorEntityKey o =
                        (code.beans.EditVendor.EditVendorEntityKey) otherKey;
                   return (primkey.equals(otherKey));
              return false;
         * Returns the hash code for the key.
         public int hashCode() {
              return (primkey.hashCode());
    Please go through and give me your comments and solution...
    Thanks in advance
    Rahul

  • Error while deploying the BMP Bean

    Hi
    Here Iam trying to deploy the Account(BMP)Bean in to WebAS
    and the following error is getting while deplying.
    Jun 28, 2005 6:18:42 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] INFO:
    [027]Additional log information about the deployment.
    can any one can help me on this?
    thanks in advance.
    Error follows.........
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[C:\usr\sap\J2E\JC00\SDM\program\log\sdmcl20050628124840.log]/>
    <!PATTERN[sdmcl20050628124840.log]/>
    <!FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %s: %m)]/>
    <!ENCODING[Cp1252]/>
    <!LOGHEADER[END]/>
    Jun 28, 2005 6:18:40 PM  Info: -
    Starting deployment -
    Jun 28, 2005 6:18:40 PM  Info: Loading selected archives...
    Jun 28, 2005 6:18:40 PM  Info: Loading archive 'C:\usr\sap\J2E\JC00\SDM\program\temp\temp54349BankAccountApp.ear'
    Jun 28, 2005 6:18:40 PM  Info: Selected archives successfully loaded.
    Jun 28, 2005 6:18:40 PM  Info: Actions per selected component:
    Jun 28, 2005 6:18:40 PM  Info: Update: Selected development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29' updates currently deployed development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.17.46.20'.
    Jun 28, 2005 6:18:40 PM  Info: The deployment prerequisites finished withtout any errors.
    Jun 28, 2005 6:18:40 PM  Info: Saved current Engine state.
    Jun 28, 2005 6:18:40 PM  Info: Error handling strategy: OnErrorStop
    Jun 28, 2005 6:18:40 PM  Info: Update strategy: UpdateAllVersions
    Jun 28, 2005 6:18:40 PM  Info: Starting: Update: Selected development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29' updates currently deployed development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.17.46.20'.
    Jun 28, 2005 6:18:40 PM  Info: SDA to be deployed: C:\usr\sap\J2E\JC00\SDM\root\origin\sap.com\BankAccountApp\localhost\2005.06.28.18.18.29\temp54349BankAccountApp.ear
    Jun 28, 2005 6:18:40 PM  Info: Software type of SDA: J2EE
    Jun 28, 2005 6:18:40 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Jun 28, 2005 6:18:41 PM  Info: Begin of log messages of the target system:
    05/06/28 18:18:40 -  ***********************************************************
    05/06/28 18:18:41 -  Start updating EAR file...
    05/06/28 18:18:41 -  start-up mode is lazy
    05/06/28 18:18:41 -  EAR file updated successfully for 170ms.
    05/06/28 18:18:41 -  Start updating...
    05/06/28 18:18:41 -  EAR file uploaded to server for 70ms.
    05/06/28 18:18:41 -  ERROR: Not updated. Deploy Service returned ERROR:
                         java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp..
                         Reason: null; nested exception is:
                              java.lang.NullPointerException
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:592)
                              at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
                              at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
                              at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
                              at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
                              at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
                              at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
                              at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
                              at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
                         Caused by: java.lang.NullPointerException
                              at com.sap.engine.services.ejb.EJBAdmin.needUpdate(EJBAdmin.java:337)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.getContainersWhichNeedUpdate(UpdateTransaction.java:511)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.getConcernedContainers(UpdateTransaction.java:467)
                              at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:356)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
                              at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
                              at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
                              ... 10 more
                         For detailed information see the log file of the Deploy Service.
    05/06/28 18:18:41 -  ***********************************************************
    Jun 28, 2005 6:18:41 PM  Info: End of log messages of the target system.
    Jun 28, 2005 6:18:41 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Jun 28, 2005 6:18:41 PM  Error: Aborted: development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp..
    Reason: null; nested exception is:
         java.lang.NullPointerException
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Jun 28, 2005 6:18:42 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
    Jun 28, 2005 6:18:42 PM  Error: -
    At least one of the Deployments failed -

    hi
    i have gone through the visual administrator and in deployments there is not application called BankAccountApp and again i tried to deploy the same  and this time it is giving the different error ...
    Jun 29, 2005 5:08:14 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
    [004]Deployment aborted
    Settings
    SDM host : INLD50043555
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME1/c5065576/LOCALS1/Temp/temp20093BankAccountApp.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/c5065576/LOCALS1/Temp/temp20093BankAccountApp.ear
    Aborted: development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp.. Reason: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.; nested exception is:      com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:66)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:253)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2133)
         at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:464)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:374)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    ', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:66)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:253)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2133)
         at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:464)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:374)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : The deployment of at least one item aborted
    can anyone help me on this.
    Thanks in advance
    Vasu

  • Do JNDI look up for entity beans from a session bean  in different  jars

    I have a problem doing entity beans JNDI look up from a session bean which is deployed
    as a separate package (session.jar) from the entity beans (entity.jar)
    I believe if both session bean and entity beans are deployed into one jar and
    I specify ejb-local-reference-description for session bean, it should work. However,
    due to some reason, they have to be in separated packages but still in the same
    container. Then question how to do JNDI lookup given entity beans only have local
    interfaces?
    FYI.
    1 both session.jar and entity.jar are self-contained. i.e., no deployment error.
    each JNDI name can be viewed from JNDI tree
    2. weblogic-ejb-jar.xml for session.jar
    <weblogic-ejb-jar>
    <description><![CDATA[Generated by XDoclet]]></description>
    <weblogic-enterprise-bean>
    <ejb-name>PetstoreLogic</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>PetstoreLogic</jndi-name>
    <local-jndi-name>PetstoreLogicLocal</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    3. weblogic-ejb-jar.xml (code snip) for entity.jar
    <weblogic-enterprise-bean>
    <ejb-name>Account</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    4. if I do
    accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
    get error like:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
    in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
         at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)

    In weblogic-ejb-jar.xml use jndi-name instead of local-jndi-name in reference-descriptor
    element.
    "Qiming He" <[email protected]> wrote:
    >
    I have a problem doing entity beans JNDI look up from a session bean
    which is deployed
    as a separate package (session.jar) from the entity beans (entity.jar)
    I believe if both session bean and entity beans are deployed into one
    jar and
    I specify ejb-local-reference-description for session bean, it should
    work. However,
    due to some reason, they have to be in separated packages but still in
    the same
    container. Then question how to do JNDI lookup given entity beans only
    have local
    interfaces?
    FYI.
    1 both session.jar and entity.jar are self-contained. i.e., no deployment
    error.
    each JNDI name can be viewed from JNDI tree
    2. weblogic-ejb-jar.xml for session.jar
    <weblogic-ejb-jar>
    <description><![CDATA[Generated by XDoclet]]></description>
    <weblogic-enterprise-bean>
    <ejb-name>PetstoreLogic</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>PetstoreLogic</jndi-name>
    <local-jndi-name>PetstoreLogicLocal</local-jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    3. weblogic-ejb-jar.xml (code snip) for entity.jar
    <weblogic-enterprise-bean>
    <ejb-name>Account</ejb-name>
    <entity-descriptor>
    <persistence>
    <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    </entity-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <local-jndi-name>net.sourceforge.cpetstore/AccountLocalHome</local-jndi-name>
    </weblogic-enterprise-bean>
    4. if I do
    accountLocalHome = (AccountLocalHome) ic.lookup("net/sourceforge/cpetstore/AccountLocalHome");
    get error like:
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
    While trying to look up /app/ejb/net.sourceforge.cpetstore-entity.jar#Account/local-home
    in /app/ejb/cpetstore-ejb.jar#PetstoreLogic.; remaining name '/app/ejb/net/sourceforge/cpetstore-entity/jar#Account/local-home'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
         at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:150)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)

  • Deploying CMP Entity Beans in Weblogic

    How to generate/convert the Orion xml file to Weblogic_RDBMS ?
    Thx

    petstore 1.3 will be available for the upcoming beta of weblogic 7.0...
    Andrew Sliwkowski(BEA)
    [email protected]
    "Nitin Sawant" <[email protected]> wrote in message
    news:3c04f6cd$[email protected]..
    >
    Appreciate if you can share your plans on releasing a petstore 1.3 patchfor weblogic.
    >
    >
    i am having problems deploying CMP Entity Beans in petstore 1.3 where theprimary
    key class is defined as java.lang.Object in the ejb-jar.xml descriptor(<prim-key-class>java.lang.Object</prim-key-class>).
    Does weblogic 6.1 with 1.3 features enabled support the above feature.
    Thanks,

  • Is it possible to map the cmp fields of the entity bean with out dictionary

    Dear sirs,
    I have created the EJB project module and WEB Module. Now i have to map the CMP fields of the entity bean to the underlying table. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
    I have got some error while mapping an EJB's CMP fields to the table through dictionary. I was actually intended to map 79 fields but it gives an error that more than 64 fields are not allowed while building the dictionary.
    1. Can you tell me what could be the possible reason?
    2. Is it possible to map the cmp fields of the entity bean with out java dictionary? If yes how can we do that.
    Kindly helo me,
    Sudheesh K S

    Hi,
    Sudheesh please check up if the below link helps,there are other ways of writing the persistent.xml for container managed entity bean.
    http://help.sap.com/saphelp_nw04s/helpdata/en/9b/f695f0c84acf46a4e0b31f69d8a9b7/frameset.htm, probably in the studio you cannot browse through tables not in  the java dictionary,but manually editing it may still solve the problem.
    Also here is another link that specifies the databases supported by J2EE Engine.
    http://help.sap.com/saphelp_nw04s/helpdata/en/66/a5283eeb47b40be10000000a114084/frameset.htm
    The below link shows how to specify the database vendor and datasource
    http://help.sap.com/saphelp_nw04s/helpdata/en/e1/67fc3ee241ba28e10000000a114084/frameset.htm
    Hope you are able to solve the problem.
    Do let us know if you come up with the solution.
    Regards,
    Harish
    Message was edited by: HARISH SUBRAMANIAN

  • Deploying CMP entity bean throws compilation error.

    Jdeveloper build works fine but the server deployment ( embedded) fails. I linked tools.jar to j2ee home dir, same version as jdev uses. Session beans deploy OK.
    The table corr to the entity bean has a primary key and the entity bean was created by dragging-dropping table onto UML diagram.
    error is >>>cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping<<<, message details follow after dashed line.
    Platform details - Jdeveloper 9.0.3 on mdk 9.0, JDK 1.4.1 ( JDK 1.3.1 also does the same).
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    /usr/java/j2sdk1.4.1/bin/java -hotspot -classpath /var/jdeveloper/j2ee/home/oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Xrs com.evermind.server.OC4JServer -config /home/demo/jdevhome/system9.0.3.1035/oc4j-config/server.xml
    [waiting for the server to complete its initialization...]
    Embedded OC4J startup time: 9611 ms.
    Copying default deployment descriptor from archive at /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/META-INF/orion-ejb-jar.xml to deployment directory /home/demo/jdevhome/system9.0.3.1035/oc4j-config/application-deployments/current-workspace-app/classes...
    Auto-deploying file:/home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/ (No previous deployment found)... Error compiling /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes: cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping
    Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized

    Please note that the data-source has been re-architectured in 10.1.3 DP3 and you should have DataSource as follows:
    <data-sources xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd' schema-major-version='10' schema-minor-version='1'>
    <managed-data-source connection-pool-name='Example Connection Pool' jndi-name='jdbc/OracleDS' name='OracleManagedDS' />
    <connection-pool name='Example Connection Pool' >
    <connection-factory factory-class='oracle.jdbc.pool.OracleDataSource' user='scott' password='tiger' url='jdbc:oracle:thin:@localhost:1521:orcl'>
    </connection-factory>
    </connection-pool>
    </data-sources>

Maybe you are looking for

  • IPod touch crashed with white screen after using Griffin TuneJuice

    Hello all, I have an iPod touch first generation that has worked flawlessly for about 1,5 years. Recently I bought a Griffin TuneJuice (external battery) to get longer battery life. The salesperson said it should work with the Touch, and it did at fi

  • Driver e1000g problem - patch 118844-30

    Hi, the situation is like this. I have fujitsu-siemens pc and Solaris 10 03/05 x86 installed. I wanted to patch it with latest recommended patch cluster. After that I was not able to get to default router and switch did not see my mac anymore. I look

  • For NW2004s: What is replacing IXSLTransformService?

    com.sapportals.portal.prt.service.xsltransform.IXSLTransformService Hello, Can someone tell us what is replacing IXSLTransformService for the NW2004s? Because it is working in the NW2004 env but maybe it is not working in the NW2004s env. Thanks, Ste

  • Best way to change row and/or cell colors other than doing it in sql

    So I have some interactive reports and I would like to be able to change the color of the row (and in some cases cell). I have seen threads talking to doing this with the sql statement. But is there a way to do this either when the page is displayed

  • Javax.servlet.ServletException: Cannot find bean CustForm in any scope

    while i m running my struts application.. i m getting this error.. can any one pointout wat error is this... javax.servlet.ServletException: Cannot find bean CustForm in any scope      at org.apache.jasper.runtime.PageContextImpl.handlePageException(