S:RSSDK:400 Unable to create javax.ejb.EJBObject

Hello Guys,
   I'm trying to extract information from xPD in to BW and the error message S:RSSDK:400 Unable to create javax.ejb.EJBObject is raised during the dataload. If you have any suggestion, please let me know.
Thanks and Regards,
Iván.

can anybody help to solve? rwrd pts

Similar Messages

  • Unable to create javax.ejb.EJBObject

    I go to the http://host:port/caf ->User Interface Configuration -> Configuration Browser ->Object Editor -> New Configuration->and push button select service, or administrative tools ->authorization tool. On this functionalities i get the same error
    The initial exception that caused the request to fail, was:
       com.sap.caf.rt.exception.CAFBaseRuntimeException: Service manager initialization failed Illegal argument exception: Unable to create javax.ejb.EJBObject.
    All services in Visual Admin i have started. Who can help?

    can anybody help to solve? rwrd pts

  • Weblogic 7.0 javax.ejb.EJBObject

    I am running client side program using weblogic 7.0 and getting an error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/ejb/EJBObject
    It should be something missing in my CLASSPATH
    Please help !
    Thanks

    2 possibilities :
    - your classpath is not correct. Read it (echo $Classpath on unix, echo %classpath% on DOS). Copy the item you suppose being the jar including EJBOBject and do a ls (unix) or dir (dos) on it to check if you haven't done a typo error or something like that.
    - the classpath you define is not the one used by weblo. Edit your startup batch to check this point. You might add an echo on your classpath just before the "java" instruction.

  • J2EE setup - Can't find javax.ejb.EJBObject

    I am running my first client side program and the below error is being returned:
    Exception in thread "main" java.lang.NoClassDefFoundError:javax/ejb/EJBObject.
    I am guessing that my classpath to find
    javax.ejb.EJBObject is not setup properly. Does
    anyone know how it should be set. I am using J2EE.

    Apparently there is a better solution from previous post:
    classpath=.;..;c:\jdkee1.3\lib\j2ee.jar;
    If you specify a directory, Java will search for class files in that directory; if you specify an archive (zip or jar) Java will search for class files in the archive. The class files you need reside in the two archives c:\jdk1.3\lib\rt.jar and c:\jdkee1.3\lib\j2ee.jar.

  • Problems creating session ejbs in a startup class

    public class startupTest implements T3StartupDef
         private T3ServicesDef services;
         public startupTest()
         public String startup(String name, Hashtable args) throws Exception
         try{
              Context initialContext = getContext("t3://localhost:7001");
         DruckAuftragHome dah =     (DruckAuftragHome)initialContext.lookup(
    "DruckAuftrag" );
              javax.ejb.EJBObject o = dah.create();
              DruckAuftrag da = (DruckAuftrag) o;
              System.out.println("EEEEEEEEEEEEEEEEEEEEEEEE"+da.makePDF());
              catch(Exception e)
                   e.printStackTrace();
              return "";
    private static Context getContext(String wlUrl)
    throws javax.naming.NamingException
    Hashtable env = new Hashtable();
    env.put(Context.PROVIDER_URL, wlUrl);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    weblogic.jndi.WLInitialContextFactory.class.getName());
    Context ctx = new InitialContext(env);
    return ctx;
         public void setServices(T3ServicesDef services)
              this.services = services;
    Calling the Bean Method works form Servlets and form standalone Clients, but at
    startup
    java.lang.NullPointerException
    at weblogic.utils.io.UnsyncByteArrayInputStream.<init>(UnsyncByteArrayInputStream.java:57)
    at weblogic.rmi.internal.ServerRequest.getInputStream(ServerRequest.java:91)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:87)
    at com.bmw.tais.appserver.ipa.produkt.druckauftrag.DruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    at com.bmw.tais.helper.startupTest.startup(C:/ipa_wa/IPA/com/bmw/tais/helper/startupTest.java:49)
    at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    if i call the bean in a tread over and over again the first exception is a nullpointer
    (shown above) and then i get a ClassCastException calling
    the create Methode on the DruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    any ideas?
    thanks
    regars robert

    Hi Robert,
    You need to let the server to warm up before
    starting using it's services. Check weblogic doc's
    for samples.
    Regards,
    Slava Imeshev
    "robert neumaier" <[email protected]> wrote in message
    news:[email protected]...
    >
    public class startupTest implements T3StartupDef
    private T3ServicesDef services;
    public startupTest()
    public String startup(String name, Hashtable args) throws Exception
    try{
    Context initialContext = getContext("t3://localhost:7001");
    DruckAuftragHome dah =(DruckAuftragHome)initialContext.lookup(
    "DruckAuftrag" );
    javax.ejb.EJBObject o = dah.create();
    DruckAuftrag da = (DruckAuftrag) o;
    System.out.println("EEEEEEEEEEEEEEEEEEEEEEEE"+da.makePDF());
    catch(Exception e)
    e.printStackTrace();
    return "";
    private static Context getContext(String wlUrl)
    throws javax.naming.NamingException
    Hashtable env = new Hashtable();
    env.put(Context.PROVIDER_URL, wlUrl);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    weblogic.jndi.WLInitialContextFactory.class.getName());
    Context ctx = new InitialContext(env);
    return ctx;
    public void setServices(T3ServicesDef services)
    this.services = services;
    Calling the Bean Method works form Servlets and form standalone Clients,but at
    startup
    java.lang.NullPointerException
    atweblogic.utils.io.UnsyncByteArrayInputStream.<init>(UnsyncByteArrayInputStre
    am.java:57)
    atweblogic.rmi.internal.ServerRequest.getInputStream(ServerRequest.java:91)
    atweblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:87)
    atcom.bmw.tais.appserver.ipa.produkt.druckauftrag.DruckAuftragBeanHomeImpl_WLS
    tub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    atcom.bmw.tais.helper.startupTest.startup(C:/ipa_wa/IPA/com/bmw/tais/helper/st
    artupTest.java:49)
    atweblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    atweblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    >
    if i call the bean in a tread over and over again the first exception is anullpointer
    (shown above) and then i get a ClassCastException calling
    the create Methode on theDruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    any ideas?
    thanks
    regars robert

  • Unable to deploy simple EJB example with J2EE Ref. Impl.

    Hi there,
    I'm new to EJB development so please bare with me. I've written a simple EJB, taken from Enterprise JavaBeans by Richard Monson-Haefel (O'Reilly). I can compile the code without problems, load it into the J2EE deployment tool (I'm using version 1.3.1 of the J2EE Reference Implementation), and have succesfully set up the data source and SQL commands for each persistent field.
    When it comes to deployment, I'm stumped with the following error:
    java.rmi.RemoteException: Error processing ejb jar: Compilation failed.
    Here's the stacktrace in the error logs:
    Compilation failed.
         at com.sun.ejb.codegen.GeneratorDriver.compileClasses(GeneratorDriver.java:232)
         at com.sun.ejb.codegen.GeneratorDriver.preDeploy(GeneratorDriver.java:610)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployEjbs(JarInstallerImpl.java:707)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployApplication(JarInstallerImpl.java:221)
         at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstallerImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:350)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:250)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:79)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:104)Here's the source:
    ==============================CabinHome.java=========================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    public interface CabinHome extends javax.ejb.EJBHome {
      public Cabin create (int d) throws CreateException, RemoteException;
      public Cabin findByPrimaryKey (CabinPK pk) throws FinderException;
    }================================CabinBean.java========================
    package com.titan.cabin;
    import javax.ejb.EntityContext;
    public class CabinBean implements javax.ejb.EntityBean {
      public int id;
      public String name;
      public int deckLevel;
      public int ship;
      public int bedCount;
      public CabinPK ejbCreate (int id) {
        this.id = id;
        return null;
      public void ejbPostCreate (int id) {
      public String getName () {
        return name;
      public int getShip () {
        return ship;
      public int getDeckLevel () {
        return deckLevel;
      public int getBedCount () {
        return bedCount;
      public void setName (String str) {
        this.name = str;
      public void setShip (int s) {
        this.ship = s; 
      public void setDeckLevel (int d) {
        this.deckLevel = d;
      public void setBedCount (int c) {
        this.bedCount = c;
      public void setEntityContext (EntityContext ctx) {}
      public void unsetEntityContext () {}
      public void ejbActivate() {}
      public void ejbPassivate () {}
      public void ejbLoad () {}
      public void ejbStore () {}
      public void ejbRemove () {}
    }===============================Cabin.java============================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    public interface Cabin extends javax.ejb.EJBObject {
      public String getName() throws RemoteException;
      public void setName(String str) throws RemoteException;
      public int getDeckLevel() throws RemoteException;
      public void setDeckLevel (int level) throws RemoteException;
      public int getShip() throws RemoteException;
      public void setShip (int sp) throws RemoteException;
      public int getBedCount() throws RemoteException;
      public void setBedCount() throws RemoteException;
    }============================CabinPK.java=============================
    package com.titan.cabin;
    public class CabinPK implements java.io.Serializable {
      public int id;
      public int hashCode() {
        return id;
      public boolean equals (Object obj) {
        if (obj instanceof CabinPK) {
          return (id == ((CabinPK) obj).id);
        return false;
    }Has anyone else experienced anything similar, or is there something I'm obviously doing wrong?
    Thanks for your help.
    Matt

    Here's the ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Created by matt on 10 September 2002, 14:32 -->
    <!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>
                <description>
                    This Cabin enterprise bean entity represents a cabin on a cruise ship.
                </description>
                <ejb-name>CabinBean</ejb-name>
                <home>com.titan.cabin.CabinHome</home>
                <remote>com.titan.cabin.Cabin</remote>
                <ejb-class>com.titan.cabin.CabinBean</ejb-class>
                <persistence-type>Container</persistence-type>
                <prim-key-class>com.titan.cabin.CabinPK</prim-key-class>
                <reentrant>False</reentrant>
                <cmp-field><field-name>id</field-name></cmp-field>
                <cmp-field><field-name>name</field-name></cmp-field>
                <cmp-field><field-name>deckLevel</field-name></cmp-field>
                <cmp-field><field-name>ship</field-name></cmp-field>
                <cmp-field><field-name>bedCount</field-name></cmp-field>
            </entity>
        </enterprise-beans>
        <assembly-descriptor>
            <security-role>
                <description>
                    This role represents everyone who is allowed
                    full access to the cabin bean.
                </description>
                <role-name>everyone</role-name>
            </security-role>
            <method-permission>
                <role-name>everyone</role-name>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
            </method-permission>
            <container-transaction>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
                <trans-attribute>Required</trans-attribute>
            </container-transaction>
        </assembly-descriptor>
    </ejb-jar>Thanks...

  • Can't find javax.ejb

    Our instructor has given us a sample program that demonstrates ejbs.
    I could get it to run on the school computer but when I try at home I get the error:
    C:\includeEJB>c:\Java\bin\javac @HelloEJBOptions @HelloEJBclasses
    HelloEJB\ejb\Hello.java:13: package javax.ejb does not exist
    public interface Hello extends javax.ejb.EJBObject
    ^
    The instructor has us compile the code with the following batch file:
    :: Compiling EJB code
    c:\Java\bin\javac @HelloEJBoptions @HelloEJBclasses
    :: creating the JAR file
    cd HelloEJB
    c:\Java\bin\jar -cf  ..\Hello\HelloEJB.jar *
    cd ..
    :: Compiling Web code
    c:\Java\bin\javac @HelloWeboptions @HelloWebclasses
    :: creating the WAR file
    cd HelloWeb\web
    c:\Java\bin\jar -cf  ..\..\Hello\HelloWeb.war *
    :: creating the EAR file
    cd ..\..\Hello
    c:\Java\bin\jar -cf  ..\Hello.ear *
    cd ..
    pauseI believe the school computer uses j2se sdk 1.4.2 and that's what I have installed on my computer.
    I believe the error I am getting is saying that the compiler can't find the javax.ejb class. Is this a correct assumption?
    If so, why? Do I have the wrong java version? Does it have to do with the classpath? I am at a loss and have tried downloading j2se sdk 1.5 and j2ee sdk 1.4 and still get the same error.
    Any help would be appreciated.

    I am still trying to find the package javax.ejb. Can anyone please explain what directory I would find this package. I can find the javax directory but I don't see the ejb package included. Should it be listed where I can see it,, or is it something that is down in the directory further? If it should be present in the javax package and I'm not seeing it, can I download just that package from somewhere?
    Thanks in advance for any help. I'm sure that I'm doing something basic wrong so please don't be afraid to give me the most basic help. I have tried downloading J2SE SDK 1.4.2, J2SE SDK 1.5, and J2EE SDK 1.4 and always get the error saying the compiler can' find javax.ejb.
    I'm almost positive the code is fine because it ran on the school computer, but I'm still not ruling that out.

  • JCA 1.0 inbound communication with javax.ejb.Handle...?

    Hello,
    I made a study regarding inbound communication in JCA. The assumption is about that resource adapter is effectively the client of the EJB container; so I implemented the JCA 1.0 resource adapter as it was a client.
    In detail: when I got a connection from resource container I pass the session bean's Handle (it is reachable through javax.ejb.EJBObject::getHandle). When resource adapter wants to deliver something asynchronously it retrieves the session bean by its Handle and calls one of its method (e.g. receive). This works.
    I ported this simple app to weblogic, websphere and Sun ref 1.4 without problems. Do anyone knows about standard or specs which prevents performing inbound communication this way ?
    Thanks in advance, best regards.

    This is a interesting solution. Did you get any answer?
    regards,
    Kristoffer

  • Question about javax.ejb package

    Hi,
    I am new to J2EE (Recently read a bood about it), and want to start writing some very simple session beans. However, I can't find any jar file that contains the interfaces that I have to implement (e.g. javax.ejb.EJBObject). I read somewhere that it's supposed to be in [JAVA_HOME]/lib/ext/j2ee.jar, but I can't find it.
    Also, what is a good starting container enviroment for a beginner? JBoss or Weblogic?
    Thanks in advand,
    AK

    In JBoss (at least the 3.0.4 I have installed right now), you'll find the EJB interfaces in $JBOSS_HOME/server/default/lib/jboss-j2ee.jar . Other parts of the API are in different jar files in the same directory.

  • Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is:

    Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection".
    while executing JSP:<%
    * add.jsp
    * Adds a new entry through EmployeeBean. This is a JSP that serves 2
    * functions. First of all, when called with no arguments, it will display a
    * table with a few input fields. The user should enter empNo, empName and
    * salary of the new record to be added. When she submits this
    * information, it is sent to this page again. If it is successful, then the
    * user can continue adding new entries. If it is not, then the old data will
    * be displayed, and a warning message will be shown to her.
    %>
    <%@ page import="com.webstore.*,java.io.*,java.util.*,javax.naming.*" %>
    <%
    // Make sure this page will not be cached by the browser
    response.addHeader("Pragma", "no-cache");
    response.addHeader("Cache-Control", "no-store");
    // We will send error messages to System.err, for verbosity. In a real
    // application you will probably not want this.
    PrintStream errorStream = System.err;
    // If we find any fatal error, we will store it in this variable.
    String error = null;
    // In a moment we will check if all columns were passed to this page
    String param_1 = "";
    String param_2 = "";
    String param_3 = "";
    long dptNo = 0;
    String dptName = null;
    // This variable indicates what function of this page is currently used. If
    // this page is called with parameters, then a new entry should be
    // added. In that case this variable is true.
    boolean submitting = false;
    // We will first attempt to get the reference to EmployeeHome from the
    // session. The "list.jsp" page sets this attribute in the session.
    DepartmentHome home = (DepartmentHome) session.getAttribute("DepartmentHome");
    if (home == null) {
    error = "No previous connection to DepartmentBean.";
    } else {
    // Attempt to get all 3 parameters from the session
    param_1 = request.getParameter("DPTNO");
    param_2 = request.getParameter("DPTNAME");
    // If all 3 parameters are specified, then this is probably a submission by
    // this very page. Note that if the user left one of the fields blank, then
    // the corresponding parameter will be "", not null.
    if (param_1 != null && param_2 != null) {
    param_1 = param_1.trim();
    param_2 = param_2.trim();
    submitting = true;
    // In the following variable we will store a (non-fatal) warning message. This
    // message will be displayed in the page, but so will the submission form.
    String warning = null;
    if (submitting) {
    warning = "";
    // If there is an empty param_1, param_2 and/or param_3, then this will be noted
    // in the warning message.
    if ("".equals(param_1)) {
    warning = "Null param_1 specified. ";
    if ("".equals(param_2)) {
    warning += "Null param_2 specified. ";
    // If we don't have a warning message yet, then we will attempt to create
    // a new record.
    if ("".equals(warning)) {
    try {
    dptNo = (long)Long.parseLong(param_1);
    dptName = new String(param_2);
    Department rec = (Department) home.create(dptNo);
    rec.setDptname(dptName);
    // empty columns after insert for effect
    param_1 = "";
    param_2 = "";
    // If we got this far, then there was no problem detected.
    warning = null;
    } catch (Exception e) {
    // Set the warning variable to indicate a problem.
    warning = "Unable to create new entry, caught: \"" +
    e.getClass().getName() + "\", message is: \"" +
    e.getMessage() + "\".";
    // Decide what the title will be.
    String title;
    if (error != null) {
    title = "Error";
    } else {
    title = "com.webstore | Add entry";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE><%= title %></TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <H1><%= title %></H1>
    <%
    // If there was a fatal error, then display the error message
    if (error != null) {
    %>
    <P><BLOCKQUOTE><%= error %></BLOCKQUOTE>
    <%
    // Otherwise display a table with fields to be filled in.
    } else {
    // If there was a warning, then display it.
    if (warning != null) {
    %>
    <TABLE border="1" bgcolor="#FF2222">
    <TR><TD><FONT color="#FFFFFF"><STRONG>Warning: <%= warning %></STRONG></FONT></TD></TR>
    </TABLE>
    <%
    } /* if */
    // Display the table with fields. There are two columns. The left column
    // contains the names of the fields, while the right column contains the
    // fields.
    %>
    <FORM action="dptadd.jsp" method="GET">
    <P><TABLE border="1">
    <TR>
    <TD><STRONG>DptNo:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNO" value="<%= param_1 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD><STRONG>DptName:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNAME" value="<%= param_2 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD colspan="3" align="center"><INPUT type="submit" value="Add this entry"></INPUT></TD>
    </TR>
    </TABLE>
    </FORM>
    <%
    } /* else */
    %>
    <P><TABLE border="1">
    <TR><TD>Back to list</TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Please guide me..

    Rajive,
    This is the same problem as in your other post:
    sql is running very slow
    So please refer to my answer there.
    Good Luck,
    Avi.

  • SOAP unable to create a socket after OS upgrade OS/400 V5R4 to V7R1

    Hello,
    after we upgraded our OS from System i V5R4 to V7R1 we have problems with our SOAP adapters.
    In the runtime workbench and also in the SXMB_MONI the following error occured:
    SOAP: call failed: java.io.IOException: unable to create a socket
    Message-Verarbeitung fehlgeschlagen. Grund: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: unable to create a socket
    Before the OS upgrade the adapter rans without any errors and we tested the connection to the partner
    with an system running V5R4 with success. So it seems to be an error that came with the OS upgrade.
    Any idea? Had any one the same error after migration to V7R1? Thanks for your help.
    Best regards,
    Matthias

    Hello,
    we found out that the error is attached to DNS and Java stack. Our ABAP stack can set the url to the correct IP adress, if we configure a entry in SM59. Also the java stack calls our partner over SOAP with IP adress, but not with url. The urls are stored in the local host table, so we suppose that the java stack doesn't use the local dns table and doesn't ask our dns server for the right ip adress.
    Does anybody know this issue? The only change we did is upgrade OS/400 from V4R4 to V7R1. If a mod see this, I think it make sence to move this thread into the forum SAP on DB2 UDB for i5/OS (DB4). Thank's.
    Matthias

  • SOS: javax.ejb.CreateException: Create failed because primary key is null

    Hello,
    I am desperately trying to get my application server to create a record through CMP 2. My app server is JRun 4.
    Here is the client:
    package com.parispano.tests;
    import java.util.Date;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import com.parispano.account.entity.Account;
    import com.parispano.account.entity.AccountHome;
    public class ClientEJBDeuxTemp {
      public static void main(String[] args) {
        System.out.println("\nBegin account DemoClient...\n");
        try {
          // Create A Demo object, in the server
          // Note: the name of the class corresponds to the JNDI
          // property declared in the DeploymentDescriptor
          // From DeploymentDescriptor ...
          // beanHomeName demo.DemoHome
          Context ctx = getInitialContext();
          AccountHome ahome = (AccountHome) ctx.lookup("AccountEJBHome");
          //System.out.println("Creating Demo\n");
          Account account = ahome.create("toto","toto", "toto","toto","toto","toto","toto","toto","toto","toto","toto",new Date(),new Date());
        catch (Exception e) {
          System.out.println(":::::::::::::: Error :::::::::::::::::");
          e.printStackTrace();
        System.out.println("\nEnd DemoClient...\n");
      static String user     = "admin";
      static String password = "admin";
      static String url      = "ordi:2908";
       * Gets an initial context.
       * @return                  Context
       * @exception               java.lang.Exception if there is
       *                          an error in getting a Context
      static public Context getInitialContext() throws Exception {
        Properties p = new Properties();
        p.put(Context.INITIAL_CONTEXT_FACTORY, "jrun.naming.JRunContextFactory");
        p.put(Context.PROVIDER_URL, url);
        if (user != null) {
          System.out.println ("user: " + user);
          p.put(Context.SECURITY_PRINCIPAL, user);
          if (password == null)
            password = "";
          p.put(Context.SECURITY_CREDENTIALS, password);
        return new InitialContext(p);
    }and here is the exception I get:
    javax.ejb.CreateException: Create failed because primary key is null
    I don't understand why I get this as the primary key is "toto" and therefore is not null.
    Here is the DD:
    <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
        <display-name>Account EJB</display-name>
        <enterprise-beans>
          <entity>
            <display-name>Account EJB</display-name>
            <ejb-name>AccountEJB</ejb-name>
            <home>com.parispano.account.entity.AccountHome</home>
              <remote>com.parispano.account.entity.Account</remote>
            <local-home>com.parispano.account.entity.AccountLocalHome</local-home>
            <local>com.parispano.account.entity.AccountLocal</local>
            <ejb-class>com.parispano.account.entity.AccountEJB</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.String</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>account</abstract-schema-name>
            <cmp-field>
            <description>Login</description>
            <field-name>login</field-name>
            </cmp-field>
            <!-- -->
            <cmp-field>
              <description>Password</description>
              <field-name>password</field-name>
            </cmp-field>
            <cmp-field>
              <description>Surname</description>
              <field-name>surname</field-name>
            </cmp-field>
            <cmp-field>
              <description>First Name</description>
              <field-name>firstName</field-name>
            </cmp-field>
            <cmp-field>
              <description>Address One</description>
              <field-name>addressOne</field-name>
            </cmp-field>
            <cmp-field>
              <description>Address Two</description>
              <field-name>addressTwo</field-name>
            </cmp-field>
            <cmp-field>
              <description>Postcode</description>
              <field-name>postcode</field-name>
            </cmp-field>
            <cmp-field>
              <description>City</description>
              <field-name>city</field-name>
            </cmp-field>
            <cmp-field>
              <description>Country</description>
              <field-name>country</field-name>
            </cmp-field>
            <cmp-field>
              <description>Telephone</description>
              <field-name>telephone</field-name>
            </cmp-field>
            <cmp-field>
              <description>Email</description>
              <field-name>email</field-name>
            </cmp-field>
            <cmp-field>
              <description>Inscription Date</description>
              <field-name>inscriptionDate</field-name>
            </cmp-field>
            <cmp-field>
              <description>Last Visit Date</description>
              <field-name>lastVisitDate</field-name>
            </cmp-field>
              <primkey-field>login</primkey-field>
          </entity>
        </enterprise-beans>
      </ejb-jar>Can anyone tell me why I am getting this exception please?
    Thanks in advance,
    Julien Martin.

    Yes, I have set the PK. Actually this is happening when the number of columns are more than 63 columns. After I reduce the number of column, it is working fine.
    Is it the actual problem???
    fyi, I'm using jboss as the Application Server...

  • Javax ejb CreateException: Could not create stateless EJB

    Hi,
    I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
    The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
    get the following error message:
    *...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
    as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
    thank's for any comment...
    (also posted in the Enterprise JavaBeans-forum possibly better there)

    problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!

  • HTTP:RMI EJB Unable to create InterfaceType: com.evermind...SubordinateXA..

    Hi,
    I have deployed some ADF BC as EJB to oc4j1013 and want to access them
    using the HTTP tunnel. It works perfectly within JDEV
    1) Calling EJB withing JDEV with RMI
    2) Calling EJB within JDEV through HTTP:ORMI
    3) Calling EJB with RMI as JClient Web Start
    But does not work as JClient Web Start and HTTP Tunneling with the stck below:
    oracle.oc4j.rmi.OracleRemoteException: Unable to create InterfaceType: com.evermind.server.SubordinateXAResource
         at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
         at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
         at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
         at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
         at __Proxy0.create(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.inv
    Please advise
    Thanks
    JO

    I did what Manu suggested with no success. Alternatively, I registered the driver jar with embedded OC4J preferences > global > libraries. Still does not work. Please, note, that when I run JUnit tests against my BC4J application modules with JDBC URL as connection type, everything works just fine. The problem comes while running the JSF application when the application module is using JDBC DataSource as connection type.

  • Javax.ejb.EJBException: Impossible to create the MyEjbBean

    Hi friends,
    I have created an session ejb and iam calling the ejb from a message drivenbeans ejb create method it look like this
    context = new InitialContext();
    service = (String) context.lookup("java:comp/env/myapp/ApplicationService");
    ref = context.lookup("java:comp/env/myapp/myApplicationBean");
    myEjbHome = (myEjbHome) PortableRemoteObject.narrow(ref, myEjbHome.class);
    myRemoteEjb = myEjbHome.create();
    in my ejb-jar.xml have a reference like this
    <ejb-ref>
    <ejb-ref-name>myapp/myApplicationBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>it.ejb.jms.myEjbHome</home>
    <remote>it.ejb.jms.myRemoteEjb</remote>
    <ejb-link>MyBean</ejb-link>          
    </ejb-ref>
    I have a description in weblogic-ejb-jar.xml
    <ejb-reference-description>
    <ejb-ref-name>myapp/myApplicationBean</ejb-ref-name>
    <jndi-name>MyBean</jndi-name>
    </ejb-reference-description>
    But while invoking the ejb i get error like this
    Caused by: javax.ejb.EJBException: Impossible to create the MyBean: EJB Exception:; nested exception is:
         java.lang.NullPointerException
    can any one sugget some solution
    thanks
    Message was edited by:
    rafelmit

    Check whether the look up using the JNDI name is working. Also check whether any exceptions are thrown while depolying the bean

Maybe you are looking for

  • Can I share files between MBP & my iPad

    Can I share files directly between my MBP & my iPad using bluethooth ?

  • 1 JMS Server [3 Queues] OR 3 JMS Servers [1 Q each]

              Hi           I am still debating myself which configuration is better purely from performance           perspective whether to have multiple queues hosted my the same JMS server or give           one JMS server per Queue. Just wondering if

  • Android 5.1.1 battery usage high?

    Samsung S6 updated over air yesterday to 5.1.1 TBH I haven't seen that much difference in using it. But I used to use my phone all day and still have >50% battery left when put on charge overnight. Today I'm down to 20% with a good few hours left to

  • Postal code

    Dear All In SAP,  "Postal Code" is mandetory field. But I want to make it unmandetory Please help me out. Eknath Dalvi

  • Building the SQL string

    Hi, i stumbled over the following while developing my application. As we all know, it's not a good idea to do the following String sql = "insert into mytable values ('"; sql += object.getStringValue1() + "','"; sql += object.getStringValue2() + "','"