NotSerializableException accessing EJB 3 remotely

Hello everyone, thanks for reading...
I have an EJB3.0 application that runs on a OC4J 10.1.3.3
I have a remote client that needs of the ejb application services.
When the client tries to access the remote ejb services I get the : java.io.NotSerializableException, It's kinda odd because the class that is supposed to be Not Serrializable it's the Oracle's XML parser (oracle.xml.parser.v2.XMLError.)
Here's the first part of the stacktrace:
com.evermind.reflect.UndeclaredExceptionTypeException: oracle.oc4j.rmi.OracleRemoteException
     at __Proxy1.getUser(Unknown Source)
     at test.appclient.client.UserServiceEJBClient.main(UserServiceEJBClient.java:55)
oracle.oc4j.rmi.OracleRemoteException: Invocation error: java.rmi.UnmarshalException: Error deserializing exception-value: writing aborted; java.io.NotSerializableException: oracle.xml.parser.v2.XMLError; nested exception is:
     java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: oracle.xml.parser.v2.XMLError
     at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:142)
     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 com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
     at __Proxy1.getUser(Unknown Source)
     at test.appclient.client.UserServiceEJBClient.main(UserServiceEJBClient.java:55)
     Nested exception is:
java.rmi.UnmarshalException: Error deserializing exception-value: writing aborted; java.io.NotSerializableException: oracle.xml.parser.v2.XMLError; nested exception is:
     java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: oracle.xml.parser.v2.XMLError
     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 com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
     at __Proxy1.getUser(Unknown Source)
Here's the client code:
Properties props = new Properties();
// Standalone OC4J connection details
props.put( Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory" );
props.put( Context.SECURITY_PRINCIPAL, getUserContext().getUserCode() );
props.put( Context.SECURITY_CREDENTIALS, getUserContext().getUserCredentials() );
props.put(Context.PROVIDER_URL, "ormi://serverxxx:23791/UserServiceEjb");
try {
     InitialContext context = new InitialContext(props);
     UserService service = (UserService) context.lookup("UserServiceEJB");
     if (service!=null) {
          UserTO usr = service.getUser("root");
          System.out.println(usr);
} catch (InvalidDatabaseOperationException e) {
     e.printStackTrace();
} catch (ServiceException e) {
     e.printStackTrace();
} catch (NamingException e) {
     e.printStackTrace();
}catch (Exception e) {
     e.printStackTrace();
It's really weird the oracle.xml.parser.v2.XMLError thing, because it looks like the EJB is sending that exception...
Any hints would be very appreciated...
Thanks in advise...

Problem solved people.
OC4J includes in the classpath of all the deployed applications some inherited libraries like xmlparserv2.
xmlparsev2's XmlError exception doesn't seems to be Serializable.
So how did we solved the problem?
At deploy time we edited the classpath for the application and excluded the xml parser library. Now it finallly works.
Thanks to everyone.
Thanks jferman.

Similar Messages

  • Error Accessing EJB from remote application - is it supported in 101202?

    We are running Oracle App Server 10.1.2.0.2, There is a containers created on midtier server called OC4J_TEST .
    We have two applications, one has EJB and another one has JSP.JSP has following code
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "welcome1");
    String pURL="opmn:ormi://localhost:12401:OC4J_TEST/";
    env.put(Context.PROVIDER_URL,pURL );
    env.put("dedicated.connection","true");
    Context context = null;
    sampleejb Sampleejb;
    String mess = "Initial message, if you see that is because EJB has not been properly called";
    mess = mess + " "+pURL;
    try
    // Create InitialContext
    context = new InitialContext(env);
    // Lookup Home interface
    sampleejbHome SampleejbHome = (sampleejbHome)PortableRemoteObject.narrow(context.lookup("sampleejb"), sampleejbHome.class);
    // Create the bean and the remote interface
    Sampleejb = SampleejbHome.create();
    mess = Sampleejb.hello("Middle Tier JSP EJB Client");
    // Destroy the Bean Instance
    catch(Throwable ex)
    ex.printStackTrace();
    When I run this code we get following exception:
    08/10/15 16:21:35 javax.naming.NameNotFoundException: ejbserverapp/sampleejb not found
    08/10/15 16:21:35 at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:165)
    08/10/15 16:21:35 at javax.naming.InitialContext.lookup(InitialContext.java:347)
    08/10/15 16:21:35 at JspsampleejbClient.jspService(_JspsampleejbClient.java:76)
    08/10/15 16:21:35 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    08/10/15 16:21:35 at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:575)
    08/10/15 16:21:35 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:311)
    08/10/15 16:21:35 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)
    08/10/15 16:21:35 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)
    08/10/15 16:21:35 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    08/10/15 16:21:35 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835)
    08/10/15 16:21:35 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341)
    08/10/15 16:21:35 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816)
    08/10/15 16:21:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:231)
    08/10/15 16:21:35 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:136)
    08/10/15 16:21:35 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    08/10/15 16:21:35 at java.lang.Thread.run(Thread.java:534)
    What we really want is to have webapp with JSP running on one server and EJB running on another server. Need some help.
    Thanks in advance.
    Manoj
    Edited by: Manoj Desai on Oct 16, 2008 11:01 AM

    This connection string does not look correct to me:
    String pURL="opmn:ormi://localhost:12401:OC4J_TEST/";
    As you have it, you are specifying the OC4J RMI port to connect to, in conjunction with the ORMI lookup handler.
    The correct form for this string should be using the OPMN request port:
    String pURL="opmn:ormi://localhost:6003:OC4J_TEST/";
    The6003 value comes from the request port that OPMN is using on the target application server instance you need to connect to -- you can observe this port by looking at the $ORACLE_HOME/opmn/conf/opmn.xml file and look for this element:
    <port local="6101" remote="6202" request="6003"/>
    Use whatever port is specified there in your connect string.
    -steve-

  • Remote client accessing ejb - question

    This may be a very simplistic question, but here goes -
    scenario: I have a J2EE application running on a server Y with session beans/entity beans.
    I need a remote client on machine X to access EJB objects on Y.
    I have set the initial conext with INITIAL_CONTEXT_FACTORY, PROVIDER_URL etc...
    But, in order to narrow the reference of the object returned by lookup() method, I need to instantiate the Home object of my session (or entity) bean ...
    here's my problem: How do I instantiate EJBHomeInterface or EJBRemoteInterface, when they do not exist on the remote client machine?? (does this have something to do with the stub??)
    THANKS!

    This answer assumes you're using Weblogic, although most any other EJB container has a facility for this. Basically you need to distribute a client jar file with the client. This client jar is created during the EJB compile/deployment process and creates a jar separate from the normal jar file associated with your deployment. This jar file contains the class stubs you need to call for and use EJB's on a remote client.
    I hope this makes some sense.
    SeanB

  • Access EJB 3.0 (deployed on Glassfish v3) from Tomcat 6.0.20 (Netbeans 6.8)

    Hi all,
    I'm a newbie (of java EE and Sun forum).
    I have a problem.
    I followed this tutorial: http://technology.amis.nl/blog/1368/connecting-to-an-ejb-30-remote-sessionbean-from-tomcat
    using Netbeans 6.8, Tomcat 6.0.20, Glassfish v3.
    The deploy of EJB on Glassfish is OK.
    The deploy of WebApp on Tomcat is OK.
    But when I access to the servlet using the browser I receive this exception.
    javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at web.MyServlet.processRequest(MyServlet.java:51)
    at web.MyServlet.doGet(MyServlet.java:75)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)
    I know that I must copy *.jar files in Tomcat dir and App libraries (https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#Step_3._Include_appserv-rt.jar_and), but it doesn't work.
    What are my mistakes?
    Thank you for your help.
    Servlet code:
    package web;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.util.Properties;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import testbean.MySessionBeanRemote;
    * @author Stefano
    public class MyServlet extends HttpServlet {
    * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    * @throws ServletException if a servlet-specific error occurs
    * @throws IOException if an I/O error occurs
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    Properties props = new Properties();
    props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
    props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
    props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
    props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
    props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
    try {
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Servlet MyServlet</title>");
    out.println("</head>");
    out.println("<body>");
    out.println(MySessionBeanRemote.class.getName());
    try {
    InitialContext ic = new InitialContext(props);
    MySessionBeanRemote mySessionRemote = (MySessionBeanRemote) ic.lookup("pippo");
    out.println(mySessionRemote.getOK());
    } catch (NamingException ex) {
    ex.printStackTrace();
    out.println("</body>");
    out.println("</html>");
    } finally {
    out.close();

    Yes, I did.
    I'm not sure about the right actions to do.
    For example: the Glassfish FAQ told me to add gf-client*.jar to the Tomcat folder, not appserv-rt.jar , with v3.
    I tried with both files. I restarted Tomcat, but nothing work :-(

  • Ejb-link not working when i access ejb in different ear

    Hi All
    I am here trying to access ejb's which is in different ear, I am providing ejb-link inside web.xml of war file deployed inside deffirent ear file.
    I am using wls8.1sp5. I tried different combination with elb-link name , but its not working . <ejb-ref>
    <ejb-ref-name>ejb/AuditService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.audit.ejb.AuditServiceHome</home>
    <remote>com.onstar.audit.ejb.AuditService</remote>
    <ejb-link>ccarenewal.jar#AuditService</ejb-link>
    </ejb-ref>
    <ejb-ref>
         <ejb-ref-name>ejb/AccountService</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <home>com.onstar.account.ejb.AccountServiceHome</home>
         <remote>com.onstar.account.ejb.AccountService</remote>
         <ejb-link>ccarenewal.jar#AccountService</ejb-link>
         </ejb-ref>
    Exception:weblogic.management.ApplicationException: activate failed for sbwo Module: sbwo Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.] weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct. at weblogic.deployment.EnvironmentBuilder.addEJBLinkRef(EnvironmentBuilder.java:658) at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:467) at weblogic.servlet.internal.CompEnv.init(CompEnv.java:123) at weblogic.servlet.internal.WebAppServletContext.activate
    I will appreciate any help.
    Rajiv

    Rob,
    Thanks for your reply.
    Below is all deployment descriptor entries i have(ejb-jar.xml, weblogic-ejb-jar.xml, web.xml, weblogic.xml)
    please correct me if i have wrong entries any where.
    ejb-jar.xml
    ejb-ref>
    <description />
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>AccountService</ejb-link>
    </ejb-ref>
    weblogic-ejb-jar.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    web.xml
    <ejb-ref>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>ccarenewal.jar#AccountService</ejb-link>
    </ejb-ref>
    weblogic.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    I appreciate your help.
    Thanks
    Rajiv

  • Access EJB from Servlet that in different archive?

    <font class="mediumtxt">package kyro.ejb.session;
    import javax.ejb.*;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name="StandAlone")
    @Remote(StandAlone.class)
    public class StandAloneBean
    implements StandAlone, StandAloneLocal
    public StandAloneBean() {
    public String sayHello() {     
    return "sayHello";
    I want to access ejb from servlet that .war and .jar not in single .ear. I want to try that just with annotation not xml descriptor cause is easy to understand for me. I use Glassfish. But i can't lookup that ejb. How can i lookup that ejb with jndi? Can't you give me example of servlet to access that? I not use JNDI.properties, are that caused i can't access my ejb? I just thing .war and.jar in one server, are i have to used JNDI.properties. can you explain how to use JNDI.properties in servlet or separate file?
    </font>

    But i can't lookup that ejb. How are you trying and what exception is occurring?
    How can i lookup that ejb with jndi? [https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html|https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html]
    m

  • Issue in accessing EJB from plain java

    Hi,
    I am new to OAS. I am using OAS 10.1.2.
    I want to access EJB which runs inside OAS, through a plain java program which runs from outside the OAS environment (standalone java program).
    I am confused on what to use. RMIInitialContextFactory or ApplicationClientInitialContextFactory for the context in the java program.
    what should be the provide URL ?
    java.naming.provider.url","ormi://hostname:18140/
    is it "ormi" or something else? what is the port number should i use. there are many ports in this OAS. i see that in the console("Ports") link.
    also let me know what should i mention in the EJB xml descriptor.
    Is this lookup to be done by retrieving from jndi?
    pls help.
    Thanks,
    Sukumar
    with this confusion i developed an EJB with the following details
    ejb-jar.xml
    <ejb-ref>
         <ejb-ref-name>ejb/testDetails</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.xxx.xxx.testDetailsHome</home>
    <remote>com.xxx.xxx.testDetails</remote>
         </ejb-ref>
    orion-ejb-jar.xml
    <entity-deployment name="ejb/testDetails" location="ejb/testDetails"
    Client Java program
    public class testDetailsClient
    public static void main(String [] args)
    testDetailsClient testDetailsClient = new testDetailsClient();
    try
    Context context =getInitialContext();
    testDetailsHome testDetailsHome = (testDetailsHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/testDetails"), testDetailsHome.class);
    testDetails testDetails;
    catch(Throwable ex)
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    //env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url","ormi://host_name:18140/"); //23791 18140
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "abc123");
    InitialContext context = new InitialContext(env);
    return context;
    if i execute this, it says
    javax.naming.NameNotFoundException: java:comp/env/ejb/testDetails not found
    18140 is Application Server Control RMI port.
    if i run the same code with ApplicationClientInitialContextFactory, it throws exception saying
    java.lang.InstantiationException: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.administration.ApplicationResourceFinder.getEJBHome(ApplicationResourceFinder.java:268)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:161)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.testdetails.testDetailsClient.getInitialContext(testDetailsClient.java:89)
         at com.testdetails.testDetailsClient.main(testDetailsClient.java:20)
    pls help

    Hi,
    you do not have to package your EJB and PAR together! You can deploy them separately and then reference the J2EE Application from your PAR or vice versa to access it.
    For instance you can access the EJB from your PAR as described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    Or you can access a Portal application from J2EE like described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Even if you package your PAR in to the same EAR with your EJB they will result in two different containers on the J2EE Engine and you will have to reference them as described in the link above to access the functionality of one component from the other.
    Best regards,
    Stefan Brauneis

  • Unable to access EJB from servlet

    Hi,
    I have in service method my servlet code.
    Hashtable env = new Hashtable();
                        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationInitialContextFactory");
                        env.put(Context.PROVIDER_URL, "ormi://localhost/hello");
                        env.put(Context.SECURITY_PRINCIPAL, "admin");
                        env.put(Context.SECURITY_CREDENTIALS, "mypwd");
                        Context ctx = new InitialContext(env);
              Object obj = ctx.lookup("HelloName");
                        HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj, HelloHome.class);
                        Hello hello = home.create();
    this is how i have orion-ejb-jar.xml
         <enterprise-beans>
              <session-deployment name="Hello" location="HelloName" >
              </session-deployment>
         </enterprise-beans>
         ejb-jar.xml
              <session>
                   <ejb-name>Hello</ejb-name>
                   <home>examples.HelloHome</home>
                   <remote>examples.Hello</remote>
                   <local-home>examples.HelloLocalHome</local-home>
                   <local>examples.HelloLocal</local>
                   <ejb-class>examples.HelloBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
    When i access the servlet i get this error.
    javax.naming.NameNotFoundException: HelloName not found
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
         at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:217)
         at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:88)
         at javax.naming.InitialContext.lookup(InitialContext.java:345)
         at examples.HelloServlet.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:772)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:782)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:479)
    Is location attribute in orion-ejb-jar.xml used to specify JNDI name? Can i get the JNDI tree showing the name mappings in oc4j? How do i correct this error?
    Ravi

    Ravi --
    The most portable and standards oriented solution is to define an ejb-ref in the web.xml for the servlet, and then look up the name using the formal EJB UNC model.
    web.xml:
    <ejb-ref>
    <ejb-ref-name>ejb/AppSessionFacadeHome</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>faqapp.ejb.AppSessionFacadeHome</home>
    <remote>faqapp.ejb.AppSessionFacade</remote>
    </ejb-ref>
    servlet lookup
    InitialContext ctx = new InitialContext();
    Object homeObject = ctx.lookup("java:comp/env/ejb/AppSessionFacadeHome");
    EJBHome ejbHome = (EJBHome)
    portableRemoteObject.narrow (homeObject, AppSessionFacadeHome.class);
    cheers
    -steve-

  • Accessing EJBs

    What are the "implementational" differences of accessing EJB from Java clients,
    JSP clients, and CORBA clients? Thanks in advance.

    I'm not sure if I understand your question correctly, but implementation is the
    same no matter what client - obtain a JNDI context, performa a lookup to get home,
    and use home to get a remote.
    "Caroline Jen" <[email protected]> wrote:
    >
    What are the "implementational" differences of accessing EJB from Java
    clients,
    JSP clients, and CORBA clients? Thanks in advance.

  • Problem while accessing object in remote database

    Hi All,
    We have a procedure "UPDATE_CONV_DETAILS" created in the remote databse in the "apps" schema. The synonym for the procedure is created in the billing schema(present in the remote database). A dblink is created the local database through which we are tring to access the remote object "UPDATE_CONV_DETAILS".
    Dblink script:
    create public database link PRE_TO_CEL
    connect to BILLING
    identified by BILLING
    using 'MAP1';
    When trying to access the object from the local machine using the schema name.object_name it works fine:
    SQL> DESC APPS.UPDATE_CONV_DETAILS@PRE_TO_CEL
    PROCEDURE APPS.UPDATE_CONV_DETAILS@PRE_TO_CEL
    Argument Name Type In/Out Default?
    IN_MOBILE VARCHAR2 IN
    IN_SERVICE_CODE VARCHAR2 IN
    IN_STATUS VARCHAR2 IN
    OUT_ERROR_CODE NUMBER OUT
    But when trying the access the same object using the synonym_name it gives the error:
    SQL> DESC UPDATE_CONV_DETAILS@PRE_TO_CEL
    ERROR:
    ORA-04043: object APPS.UPDATE_CONV_DETAILS does not exist
    Regards,
    Kirti

    You have two schema.
    apps
    billing
    both reside in remote database.
    there on procedure and on procedure u create one synonym and u want to access it.
    ur remote database name is "map1"
    on ur local database ur create one dblink to access remote database.
    ORA-04043: object string does not exist
    Cause: An object name was specified that was not recognized by the system. There are several possible causes:
    - An invalid name for a table, view, sequence, procedure, function, package, or package body was entered. Since the system could not recognize the invalid name, it responded with the message that the named object does not exist.
    - An attempt was made to rename an index or a cluster, or some other object that cannot be renamed.
    Action: Check the spelling of the named object and rerun the code. (Valid names of tables, views, functions, etc. can be listed by querying the data dictionary.)

  • Challenge: call local ejb from remote ejb on weblogic 9.2

    Hi ALL,
    How do I call to local ejb from remote ejb object. The jar file is deployed on weblogic server 9.2, if you want get it http://geocities.yahoo.com.br/lindembe/BEAProject.jar and the source code are http://geocities.yahoo.com.br/lindembe/BEAProject.zip. It is a sample app with two ejb that works so good on JBOSS, JOnAS, but BEA Weblogic.....
    The complete problem you watch http://forum.java.sun.com/thread.jspa?threadID=768718&messageID=4387570#4387570
    or
    http://forums.bea.com/bea/message.jspa?messageID=600043148&tstart=0

    Your code in SigemFacadeBean should just do:
    InitialContext ctx = new InitialContext();
    when you lookup the local EJB. (This will work on all app servers. There's no need to put an app-server specific intial context factory in your code.)
    Also, you can remove the jndi-name setting for the local ejb from your weblogic-ejb-jar.xml. jndi-name is only applied to remote ejbs.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Access MS Access database on remote computer (shared folder)

    Hello,
    I need some help.
    I've made a program and it works fine on my computer, but multiple users will be using program simultaneously, each one on his own computer conected over local network to mine computer (database is on my computer in shared folder). 
    When I try to access data on database (path is path of shared folder) i'm getting error 5013 (no database). The problem occurs only when I'm trying to read something from MS access database but not if I try to read data from .txt file, then it works fine...
    I'm using ADO Tools
    Can someone help me, I would be very greatful?
    Solved!
    Go to Solution.

    Thanks to you Dennis I've managed to figure it out.
    I'll explain this for future generations
    1) I've created DSN. To do that open ODBC Data Source Administrator:
    - for 64 bit app C:\Windows\System32\odbcad32.exe
    - for 32 bit app C:\Windows\SysWOW64\odbcad32.exe
     In System DSN tab click Add.. then choose Microsoft Access Driver (*.mdb) (If you do not have this on list download that drivers from web) --> FINISH.
    Enter Data Source Name (mine is Test2) --> Select... --> now because the MS Access database is on shared folder on remote PC go to Network... --> Browse... and select that shared folder --> Finish. Now you'll see all .mdb files on that folder and you choose your database --> OK --> OK --> OK
    2) Now in block diagram you connect string "DSN=your_dsn_name;" (mine was Test2) to ConnectionString connector of ADO Connection Open.vi
    It worked for me.
    Pis
    Attachments:
    MS Access database on remote computer (local network).jpg ‏114 KB

  • Can no longer access the Canon Remote UI Management Mode (Portal) (on my Desktop Computer)

    I set up access to the Canon Remote UI Management Mode (Portal) using my IPv4 address so that I could make changes to the settings of my imageCLASS MF6160dw directly from my Desktop Computer. That has worked flawlessly for almost 3 months. Then, all of a sudden 3 days ago, I started getting this message: This page can't be displayed I have not added nor removed any equipment or software to my Desktop Computer. I also reconfirmed that my IPv4 address was correct.And I try to access the "Portal" numerous times at different times of the day & on different days. My Desktop Computer is a Dell XPS 8700 Special Edition running Windows Pro 8.1 (64-BIT) How can I regain access to the "Portal"?

    I never got a reply from anyone.
    But for those who viewed this thread & may also have this problem, I finally figured out that the IP Address had actually CHANGED.
    How & why it changed, I do not know.
    But, the last 2 digits of .15 changed to .2
    I can now access the Canon Remote UI Management Mode (Portal) by using the CHANGED IP Address.
    Hope this helps someone.

  • How do I resolve this error in Safari Your page is blocked due to a security policy that prohibits access to Category Remote Proxies"?

    I'm trying to access several pages and keep geting "Your page is blocked due to a security policy that prohibits access to Category Remote Proxies" After going over all my security stuff I just can't find where I would correct the error.
    Is there anyone who could help me?
    Thanks
    Fr. Gary

    very strange,
    1. check time and date on your computer
    2. reset network configuration, make sure there are no proxy servers and you get DNS from your router not manual
    3. Reset certificates database
    Go to Terminal (Applications>Utilities)
    sudo rm /var/db/crls/*cache.db
    (you will be prompted for your password)
    and reboot the computer
    post back

  • How do I access my iMac remotely when working away from the office?

    I work away from the office for much of the time.  How can I access my iMac remotely?

    Unless this is critcal for some reason I would not do this.  Unless you understand all the techinolticcal pit falls you can leave your computer dangerusly exposed doing this.  If you are not technical your best bet is going to be to get a wireless router with built in VPN support ($200 - $500) to give you a secure connection home.  And then you will need the Apple Remote Desktop app ($90 I think) and even then it will only work if your work compute is also a Mac.  There are probably other comerial apps that will let you remote into your Mac desktop on windows but will probably be in the $200 price range. 

Maybe you are looking for

  • I saw the newest version of iTunes was available

    I upgraded iTunes last night to the newest version.  All indications looked as though the install was going perfectly.  At one point it asked me to shut down iTunes as it was still running.  I did so, and the install continued.  30 minutes later, a n

  • Table for Purchase Order statuses.

    Hi I want to know which table and fields indicate purchase order header and item statuses. This is to know if GR IR for item is done and if there is partial GR and partial IR for item. I want to know from table field directly rather than getting quan

  • Webserver domains and sub-domains not loading correctly

    I'm having a problem with my pages loading correctly on my Maverick server. www.example.com loads correctly example.com loads to the website at the top of my virtual domain list. Weird but happens on all my virtual sites... http://www.richard-bradley

  • Calling Java function thru PL-SQL

    Dear all As i am New to JAVA ,Can you plz Tell how we can call Java function thru PL-SQL? To activate / deactivate function will be called from the database plug-ins. No need for GUI. Using the URL ,The objective is to automate this function. Many Th

  • HOW TO READ TXT FILES with NOKIA 6300?

    I mean: I can see pics, video, listen mp3 but I cant read a txt file with Nokia 6300!! is there any application to do so? thanks!!!!!!!