EJB invocation from java callout

hi,
Is it possible to invoke an EJB from java callout class. I have tried to invoke an EJB from java callout . In the Initial Context it throws exception as RMIInitialContextFactory not found esception. So, I have added the realted jar and tried. It throws the below exception.
com.cccis.interfaces.edi.journal.EDIJournalCallout - ejb_edijournal.jar
2009.03.13 at 06:11:19:192: Thread-6: Deployment - (ERROR) java.lang.NoSuchMethodError: com.evermind.server.rmi.RMIContext.<init>(Lcom/evermind/server/rmi/RMIClient;Ljava/lang/String;Ljava/util/Map;Loracle/j2ee/naming/SecurityContextHelper;)V
at com.evermind.server.rmi.RMIClientContext.<init>(RMIClientContext.java:40)
at com.evermind.server.rmi.RMIClientContext.<init>(RMIClientContext.java:36)
at com.evermind.server.rmi.RMIClient.createContext(RMIClient.java:596)
at com.evermind.server.rmi.RMIClient.getContext(RMIClient.java:544)
at com.evermind.server.rmi.RMIInitialContext.get(RMIInitialContext.java:44)
at oracle.j2ee.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:45)
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.cccis.interfaces.edi.journal.EDIJournalCallout.execute(EDIJournalCallout.java:71)
at oracle.tip.adapter.b2b.callout.CalloutExecuteWorker.doWork(CalloutExecuteWorker.java:424)
at oracle.tip.adapter.b2b.callout.CalloutExecuteWorker.run(CalloutExecuteWorker.java:333)
at java.lang.Thread.run(Thread.java:534)
Please help us to resolve this problem.
Thanks,
Geetha S

The initial contextfactory used is RMIIntitialContextFactory.
This class is not available in the B2B classpath. So we added the oc4jclient.jar in ../ip/lib and added to classpath by making an entry in opmn.xml.
The OpmnProcess classes present in optic.jar (opmn/lib) does nt have the method getApplist(). So we updated this jar with jdev jar. Now its throwing an java.lang.UnsupportedClassVersionError: EJBHome.

Similar Messages

  • EJB Invocation from B2B CallOut

    Hi,
    I tried to invoke an Session EJB deployed in oracle app server from B2B. I compiled the callout class in java version 1.4. The home class and remote classes are addded to the classpath which is of version java 5. When i tried to test the same in B2B it mentioned the RMIInitialContextFactory class is not found. So i added the oc4jclient.jar in the ../ip/lib path and added to the classpath by making an entry in opmn.xml. When i again i tried to test, it is throwing an exception stating that
    java.lang.NoSuchMethodError: oracle.ias.opmn.optic.OpmnProcess.getAppList()Ljava/util/List;
    This class is present in optic.jar. I updated the optic.jar in ../opmn/lib with the local jdeveloper jar. Now Im getting an CalloutException because of the following error
    [Root exception is java.lang.UnsupportedClassVersionError: EJBHome (Unsupported major.minor version 49.0)]
    Please let me know whether it is possible to a invoke an EJB from java callout class in B2B?
    I got this doubt as i updated the optic.jar in B2B with the one in local Jdeveloper.
    Thanks,
    Naveen
    Edited by: [email protected] on Mar 17, 2009 2:26 AM

    Share with us exception trace for the same via email [email protected]/[email protected]
    Before that, please try with access your EJBBean by creating simple java utility- may be webapplication or standalone.
    If EJBBean possible to access means, we have to look into what went wrong. :)

  • Invoke DBAdapter from Java Callout

    Hello,
    in OSB I need to invoke a DB-Adapter from a Java Callout. How can I achieve this?
    I cound not find any documentation about this (javadoc etc).
    Horst

    Ideally you should not need to access DB adapter from a Java callout. Use java callout for transformations, get back the transformed data, and call a business service based on DB Adapter.
    Alternatively, call java callout and make write code in Java to access DB directly using Weblogic datasource and connection pool.
    And if you dont want to do it any other way, create a business service based on the said DB Adapter, create a wrapper proxy(which internally calls the DB adapter based business service) of Any XML type with HTTP transport or even a WSDL based webservice, and call this from your Java code.

  • OSB WSDL invocation from java /jsp client!

    Hi ,
    I did a sample work on invoking osb wsdl(based on DB adapter) from a java/jsp application.It worked fine!
    Its a simple select query wth parameter that was configured in my DB adapter.
    Below are the steps I follow -
    a.Created a DB adapter for collective response
    b.created BS out of jca
    c.Generated PS based on above BS.
    d.Performed some xquery tranformation in PS message flow response piepeline.
    e.Exported WSDL and tested it in SOAP UI ,getting the transformed response as required.
    When we generate Java client out of above WSDL in Eclipse ,it generates client for DB data,transformed data fields are not seen -How to obtain transformed data too through Java client?will this work ?
    Is it gud practice to generate java client directly n Eclipse (OEPE) or do we have any other alternative ways to generate Java client out of OSB WSDL?
    Please assist.
    Thanks,
    Ani

    Hi Anuj-
    My proxy was generated out of business ,i get 2 wsdl like master-child .Master wsdl holds referecnce to child wsdl.I hope wsdl generation is fine.
    When i invoke the proxy wsdl url from Java client ,i get below error -
    Exception in thread "main" AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: org.xml.sax.SAXException: Invalid element in com.oracle.xmlns.pcbpel.adapter.db.PhysicalTampered_Meter.PhysicalTampered_MeterOutput - PhysicalTampered
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid element in com.oracle.xmlns.pcbpel.adapter.db.PhysicalTampered_Meter.PhysicalTampered_MeterOutput - PhysicalTampered
         at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
         at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
         at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
         at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
         at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
         at org.apache.axis.client.Call.invoke(Call.java:2467)
         at org.apache.axis.client.Call.invoke(Call.java:2366)
         at org.apache.axis.client.Call.invoke(Call.java:1812)
         at com.oracle.xmlns.pcbpel.adapter.db.CoreAnalytics.PhysicalTampered_Meter.PhysicalTampered_Meter.PhysicalTampered_Meter_pttBindingStub.physicalTampered_Meter(PhysicalTampered_Meter_pttBindingStub.java:175)
         at Client.JavaClient.main(JavaClient.java:25)
         {http://xml.apache.org/axis/}hostname:B7B-3F-149-4HJV

  • REST Webservice invocation from Java

    Hi Guys,
    I am developing an application that needs to invoke a REST webservice and submit XML data to it. The server will then process the request XML data, and return a result, etc.
    I have never worked with REST and have spent hours researching it on the NET. I have done SOAP calls in the past, but this seems to be eluding me some what.
    Does anyone know of any useful links that explains REST implementation, frameworks / jars needed, or possibly even an example or two that shows me how to submit data via REST to a URL (would be first prize :) ).
    Any help would be greatly appreciated.
    Many thanks
    Mark

    http://java.sun.com/developer/technicalArticles/WebServices/restful/

  • WSIF EJB Invocation exception

    using: 10.1.2, WebLogic 8.1sp4, Solaris 9
    I am trying to invoke an ejb directly via the WSIF. I can get the sample working but when I try to get my real stuff working I get the following exception:
    [having the default.collaxa.cube.ws logging set to DEBUG]
    <WSIFInvocationHandler::createOperation> Failed to createOperation for op doWork
    org.collaxa.thirdparty.apache.wsif.WSIFException: Could not create instance for home ...; nested exception is:
    java.lang.NoSuchMethodException: com.ejb.MyEjb_ftt4ro_HomeImpl_814_WLStub.create()
    at com.collaxa.cube.ws.wsif.providers.ejb.WSIFPort_EJB.getEjbObject(WSIFPort_EJB.java:287)
    at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.<init>(WSIFOperation_EJB.java:149)
    at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.getDynamicOperation(WSIFPort_EJB.java:149)
    at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.createOperation(WSIFPort_EJB.java:352)
    Any ideas as to what is causing this exception?
    Cheers,
    -Dustin Ruehle

    Hi
    i am also doing a EJB invocation from a BPEL process..
    I am sure that the signature of the method id matching with WSDL declaration...and the EJB files are packed in a jar and put in the classpath of the BPEL server.
    [2007/07/25 13:22:47] "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown. less
    <bindingFault>
    <part name="summary" >
    <summary>com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@23af64 : Could not invoke 'raiseAlarm'; nested exception is: org.collaxa.thirdparty.apache.wsif.WSIFException: Error while determining signature of method raiseAlarm : The meta information is not consistent.; nested exception is: org.collaxa.thirdparty.apache.wsif.WSIFException: in2</summary>
    </part>
    <part name="detail" >
    <detail>org.collaxa.thirdparty.apache.wsif.WSIFException: Error while determining signature of method raiseAlarm : The meta information is not consistent.; nested exception is: org.collaxa.thirdparty.apache.wsif.WSIFException: in2</detail>
    </part>
    </bindingFault>
    Can u please throw some light on this..

  • HOW DO I  RUN A UNIX BASH SCRIPT FROM JAVA??

    HI. Here's a tricky little problem i have. There's a unix bash script that has some commands in it, that manipulate a file. It appends a certain string variable to a file called users. The users file is an ordinary text file.
    I know this script to work perfectly, when i invoke it like this directyl from the command line: ./addusers.sh
    or even: bash /downloads/selinux/policy/addusers.sh
    Now, i have a java program, and its meant to just execute that script. It doesnt throw any Exceptions at runtime. But when i look at the users file, and expect it to have an extra line that was the string variable, the file is UNTOUCHED!
    Again, direct command line invocation works, but not from java. Here's what my invocation from java looks like:
    Process p = Runtime.getRunTime().exec("bash downloads/selinux/policy/addusers.sh");
    The strange thing is, i tried a different bash command. I tried:
    Process p = Runtime.getRunTime().exec("mkdir /temporary");
    and this worked!
    so why not the other one??
    I cant figure it out.

    You say:
    bash /downloads/selinux/policy/addusers.sh
    And you say in Java:
    Process p = Runtime.getRunTime().exec("bash
    downloads/selinux/policy/addusers.sh");
    As if a leading / would be missing from the Java
    version...nyix says:>
    ...OK sorry about that. i DO have a / in front of the downloads.... section in the java method. So its:
    Process p = Runtime.getRunTime().
    exec("bash /downloads/selinux/policy/addusers.sh");
    HELP please?

  • Can i call unix shell script from B2B callout.

    Hi,
    We had a requirement to invoke a unix shell script from B2B callout implemented class. Here is the code in implementation class:
    public void execute(CalloutContext context,List input,List output)
    throws CalloutDomainException, CalloutSystemException {
    try {
    CalloutMessage cmIn = (CalloutMessage)input.get(0);
    FileOutputStream fos = null;
    String inputFile = "/home/orasoad/digitalsign/input/test.txt";
    String outputFile = "/home/orasoad/digitalsign/output/test.txt.gpg";
    File outFile = new File(inputFile);
    String str =cmIn.getBodyAsString();
    fos = new FileOutputStream(outFile);
    Writer out = new OutputStreamWriter(fos);
    out.write(str);
    out.close();
    String shellFile = "/home/orasoad/digitalsign/dg.sh";
    String cmd[] = new String[] { shellFile, inputFile, outputFile };
    Runtime rt = Runtime.getRuntime();
    Process pr = rt.exec(cmd);
    int i = pr.waitFor();
    BufferedReader br = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    StringBuffer sb = new StringBuffer();
    String line;
    while ((line = br.readLine()) != null) {              
    sb.append(line);
    CalloutMessage cmOut = new CalloutMessage(sb.toString());
    output.add(cmOut);
    } catch (Exception e) {
    throw new CalloutDomainException(e);
    We were able to execute the unix shell script from standalone java class with same code. But some how it is not working as expected while invoking the B2B java callout.
    Is it possible to invoke unix shell script from B2B callout?
    Please give inputs.
    Regards,

    Though it's not a good idea to invoke shell scripts from java callout but technically it will work.
    But some how it is not working as expected while invoking the B2B java callout.What is not working as expected? Any error in the log (server-diagnostic.log or server.out)?
    Regards,
    Anuj

  • EJB Exception occurred during invocation from home: com.bea.content.manager

    BEA 8.1 Team,
    Is there any limitation on BEA Repository such as number of nodes, etc.
    I have a serious production issue. All i could see from the LOG file is the stact trace which i have posted it here.
    ####<Aug 24, 2006 8:04:57 AM CDT> <Info> <EJB> <websrv11> <PORTALSRVR> <ExecuteThread: '99' for queue: 'weblogic.kernel.Default'> <jdcs1400> <BEA1-60BE09B7462F> <BEA-010051> <EJB Exception occurred during invocation from home: [email protected]67bc75 threw exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<Aug 24, 2006 8:04:57 AM CDT> <Error> <HTTP> <websrv11> <PORTALSRVR> <ExecuteThread: '99' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101020> <[ServletContext(id=30691960,name=myServicePoint,context-path=/myServicePoint)] Servlet failed with Exception
    javax.ejb.EJBException: EJB Exception: : java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    javax.ejb.EJBException: EJB Exception: : java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1438)
         at java.lang.String.substring(String.java:1411)
         at com.bea.content.PathHelper.removeFirst(PathHelper.java:168)
         at com.bea.content.manager.internal.NodeOpsBean.getNode(NodeOpsBean.java:680)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:111)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    ; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at weblogic.ejb20.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:152)
         at weblogic.ejb20.internal.BaseEJBLocalHome.handleSystemException(BaseEJBLocalHome.java:232)
         at weblogic.ejb20.internal.BaseEJBLocalObject.postInvoke(BaseEJBLocalObject.java:326)
         at com.bea.content.manager.internal.NodeOpsEJB_e40s0j_ELOImpl.getNode(NodeOpsEJB_e40s0j_ELOImpl.java:122)
         at com.bea.content.manager.servlets.ShowPropertyServlet.printNode(ShowPropertyServlet.java:180)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doPost(ShowPropertyServlet.java:72)
         at com.bea.content.manager.servlets.ShowPropertyServlet.doGet(ShowPropertyServlet.java:64)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    Any help would be greatly appreciated!!
    Thanks in Advance,
    -Nach.

    Hi Dragan,
    First of all we need to put some debug (System.out.println) to findout exactly which object reference is actually becoming NULL. From there only we can start diagnosis on this issue. that's the root. It should be very easy for your Developers to put some debug on that...because the NullPointerException is being thrown by your code...I m not Blaming on your Code... WLS may be responsible for that...but first of all we need to find out Which Object is becoming NULL.
    Thanks
    Jay SenSharma
    http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)

  • BEA-010051 EJB Exception occurred during invocation from home:

    Hi,
    I am getting this exception (below)in the production env. the process is every night my application would load the data which is present in a perticular folder in to the database. After this process has continued for some days this error comes. This error started comming after i did some code changes where in i log all the actions which take place while loading into the database.
    It would be of great help if someone could help me out here.
    weblogic log:
    ####<14-Mar-2007 18:00:00 o'clock GMT> <Info> <Log Management> <dygwt01> <managed1_caprprd> <ExecuteThread: '1' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-170018> <The log file has been rotated to managed1_caprprd.log00300. Log messages will continue to be logged in /wls_domains/caprprd/logs/bea/managed1_caprprd.log.>
    ####<14-Mar-2007 18:00:00 o'clock GMT> <Info> <null> <unknown> <unknown> <ExecuteThread: '1' for queue: 'weblogic.kernel.Default'> <null> <null> <000000> <LogRotation trigger for logfile /wls_domains/caprprd/logs/bea/managed1_caprprd.log>
    ####<15-Mar-2007 04:21:04 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20908C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:05 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20928C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:19 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-209A8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:20 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-209C8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A18C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A38C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:31 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20A58C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:21:41 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20AC8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:22:48 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20D38C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:22:58 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20D98C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:08 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DB8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:10 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DD8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:12 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20DF8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:19 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20E58C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:22 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-20E78C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 04:23:47 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-21008C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
    >
    ####<15-Mar-2007 05:36:53 o'clock GMT> <Info> <Security> <dygwt01> <managed1_caprprd> <ExecuteThread: '0' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-090067> <User lockout expired, unlocking user 602054364 in security realm myrealm.>
    ####<15-Mar-2007 05:45:21 o'clock GMT> <Notice> <Security> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-090078> <User 602054364 in security realm myrealm has had 5 invalid login attempts, locking account for 30 minutes.>
    ####<15-Mar-2007 06:31:03 o'clock GMT> <Info> <EJB> <dygwt01> <managed1_caprprd> <ExecuteThread: '11' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-221A8C95ED2F2185AF9E> <BEA-010051> <EJB Exception occurred during invocation from home: com.bt.pe.capreg.serv.ejb.WebService_auhh9w_HomeImpl@1ba3c1f threw exception: java.lang.NullPointerException
    java.lang.NullPointerException
         at com.bt.pe.capreg.serv.ejb.WebServiceBean.getBlobBytes(WebServiceBean.java:1068)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl.getBlobBytes(WebService_auhh9w_EOImpl.java:5026)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
         at com.bt.pe.capreg.serv.ejb.WebService_auhh9w_EOImpl_814_WLStub.getBlobBytes(Unknown Source)
         at com.bt.pe.capreg.web.action.GetBlobAction.execute(GetBlobAction.java:29)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.TargetNameSpaceFilter.doFilter(TargetNameSpaceFilter.java:48)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.AuthorizationFilter.doFilter(AuthorizationFilter.java:22)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.SMHeaderFilter.doFilter(SMHeaderFilter.java:21)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:326)
         at com.bt.pe.capreg.web.servlet.BlobServlet.doGet(BlobServlet.java:19)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.TargetNameSpaceFilter.doFilter(TargetNameSpaceFilter.java:45)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.AuthorizationFilter.doFilter(AuthorizationFilter.java:22)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bt.pe.capreg.web.servlet.SMHeaderFilter.doFilter(SMHeaderFilter.java:21)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >

    Hi Sai,
    Below are the observation
    In Weblogic 8.1 sp6
    User : system
    Group Assigned : Administrators and OSSTrmi
    Group OSStrmi have assigned under Administrators as well
    In Weblogic 10.3.3
    User : system
    Group Assigned : Administrators
    Group OSSTrmi  is not assigned under Administrators
    Difference in assignment. here it seems. Please suggest
    Thx
    Sudip

  • Error while running EJB from java client on JBOSS

    Hi
    As i am new to EJB i have created a helloworld application in ejb which is working fine when i try to call it from servlet but when i try to invoke the same ejb from java client (i.e from diff jvm) on jboss i got the following error:
    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.gl.TestClient.main(TestClient.java:39)
    Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
         ... 4 more
    Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
         ... 5 more
    Caused by: java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:266)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
         ... 5 more
    Following is my code:
    Home Interface:
    package com.gl;
    import javax.ejb.CreateException;
    public interface testHome extends EJBHome {
         String JNDI_NAME = "testBean";
         public     test create()
         throws java.rmi.RemoteException,CreateException;
    Remote Interface:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface test extends EJBObject {
         public String welcomeMessage() throws RemoteException;
    Bean:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class testbean implements SessionBean {
         public void ejbActivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbPassivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbRemove() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void setSessionContext(SessionContext arg0) throws EJBException,
                   RemoteException {
              // TODO Auto-generated method stub
         public void ejbCreate(){}
         public String welcomeMessage(){
              return "Welcome to the World of EJB";
    ejb-jar.xml:
    <?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>
    <enterprise-beans>
    <session>
    <ejb-name>testBean</ejb-name>
    <home>com.gl.testHome</home>
    <remote>com.gl.test</remote>
    <ejb-class>com.gl.testbean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    jboss.xml:
    <?xml version='1.0' ?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>testBean</ejb-name>
    <jndi-name>testBean</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    Client code:
    package com.gl;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class TestClient {
         public static void main(String[] args) throws Exception{
                   try{
                   /*     Properties props=new Properties();
                        props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                        props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                   Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost:1099");
                        System.out.println("Properties ok");
                        //env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
                        //env.put(Context.PROVIDER_URL,"http://localhost:8080");
                        //env.put(Context.SECURITY_PRINCIPAL, "");
                        //env.put(Context.SECURITY_CREDENTIALS, "");
                        Context ctx=new InitialContext(props);
                        System.out.println("context ok");
                        //testHome home = (testHome)ctx.lookup("testBean");
                        Object obj = ctx.lookup ("testBean");
                        System.out.println("ojb = " + obj);
                        testHome ejbHome = (testHome)PortableRemoteObject.narrow(obj,testHome.class);
                   test ejbObject = ejbHome.create();
                   String message = ejbObject.welcomeMessage();
                        System.out.println("home ok");
                        System.out.println("remote ok");
                        System.out.println(message);
                        catch(Exception e){e.printStackTrace();}
    I am able to successfully deployed my ejb on JBOSS but i m getting above error when i am trying to invoke ejb from java client.
    kindly suggest me something to solve this issue.
    Regards
    Gagan
    Edited by: Gagan2914 on Aug 26, 2008 3:28 AM

    Is it a remote lookup? Then maybe this will help:
    [http://wiki.jboss.org/wiki/JBoss42FAQ]
    - Roy

  • Web Service from an EJB with an Java Bean: createSAXParseException

    Hi I am using Together to develop Web Services from an EJB+a Java Bean.
    I used the Trader Example, which includes an EJB + a Java Bean.
    Running the utility "ant" I get the following exception:
    "C:\bea\jdk131\jre\lib\rt.jar;C:\bea\jdk131\lib\rt.jar;c:\bea\wlserver6.1\lib\weblogic.jar;C:\Programme\Together5.5\lib\javax.jar;;"
    org.apache.tools.ant.Main
    WLS61: Error at line:6 col:12 ':' Already got a ':' in name
    WLS61:      at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    WLS61:      at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    WLS61:      at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    WLS61:      at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    WLS61:      at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    WLS61:      at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    WLS61:      at org.apache.tools.ant.Target.execute(Target.java:153)
    WLS61:      at org.apache.tools.ant.Project.runTarget(Project.java:898)
    WLS61:      at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    WLS61:      at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    WLS61:      at org.apache.tools.ant.Main.runBuild(Main.java:421)
    WLS61:      at org.apache.tools.ant.Main.main(Main.java:149)
    WLS61: Buildfile: build.xml
    WLS61:
    WLS61: wsgen:
    WLS61:
    WLS61: BUILD SUCCESSFUL
    WLS61:
    WLS61: Total time: 7 seconds
    WLS61: Finished with 19 Errors, 0 Warnings.

    Hi,
    try these links
    http://www.baigzeeshan.com/2010/11/creating-webservice-from-java-class-in.html
    http://www.baigzeeshan.com/2010/11/calling-webservice-in-oracle-adf-by.html
    Hope it help,
    Zeeshan

  • Calling an EJB from Java Mappings in PI 7.1

    In my operation mapping, I am using a Java class which in turn invokes an EJB using JNDI lookup.
    When I execute the code, the class is successfully finding the EJB using JNDI, but invoking it I am getting a java.lang.NoClassDefFoundError.
    If, I add the class it cannot find to the jar containing the Java mapping class, I get a java.lang.ClassCastException.
    Has anyone been able to call a custom EJB from with a Java Mapping class?
    Any help appreciated.
    Thanks.

    Hello.
    Check my wiki article:
    http://wiki.sdn.sap.com/wiki/display/stage/SapNetweaverProcessIntegration.CallEjb3.0methodfromJavaclassmappingPI7.1
    (SapNetweaver Process Integration. Call Ejb 3.0 method from Java class mapping PI 7.1 )
    Greedings

  • EJB Exception occurred during invocation from home or business:

    Friends,
    I have ejb application deployed in weblogic 10.3 with cluster environment. I have configured the following ejb-jar.xml
    <session>
    <ejb-name>PartSL</ejb-name>
    <home>com.gm.tm.ejb.session.part.PartSLHome</home>
    <remote>com.gm.tm.ejb.session.part.PartSL</remote>
    <ejb-class>com.gm.tm.ejb.session.part.PartSLBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <ejb-ref>
    <ejb-ref-name>ejb/PartBM</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.gm.tm.ejb.entity.partbm.PartHome</home>
    <remote>com.gm.tm.ejb.entity.partbm.Part</remote>
    <ejb-link>PartBM</ejb-link>
    </ejb-ref>
    <resource-ref>
    <description></description>
    <res-ref-name>jdbc/ToolMoveDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    Sometimes when user doing some manupulation, this object getting disapper and getting the error as EJB Exception occurred during invocation from home or business: com.gm.tm.ejb.session.part.PartSL_ex1s88_HomeImpl@175f214 threw exception: javax.ejb.EJBException: nested exception is: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'PartBM'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'PartBM'. Resolved '']; remaining name 'PartBM']; Link Remaining Name: 'PartBM'>
    JNDI tree is clusterable but is incompatible. Make sure all the servers in the cluster use the identical copy of object.
    Pls let me know if anyone know the root cause and i am new to EJB too. So pls help if anyone know better solution for this

    Yes exactly..Let me explain clearly. assume its deployed now and user started using that particular module. It works fine. Later point time like after few days or after few simultenous navigation of that particular ejb jndi object from the application, this exception comes. So for the short time fix, i restart the server and it will work fine and then after few hours/days , this exception comes and i need to restart again. So i need a permanent solution to avoid this issue.

  • Calling an EJB deployed in OC4J from Java Stored Proc in Oracle

    Hello!
    Trying to make a call to an EJB deployed in OCJ4 from a oracle java stored proc. After loaded orion.jar and crimson.jar lib into SCOTT schema, I can't get the JNDI Context working because of this error:
    ============================================
    javax.naming.NoInitialContextException: Cannot instantiate class:
    com.evermind.server.ApplicationClientInitialContextFactory. Root exception is
    java.lang.ClassNotFoundException:
    com/evermind/server/ApplicationClientInitialContextFactory
    at java.lang.Class.forName0(Class.java)
    at java.lang.Class.forName(Class.java)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java)
    at javax.naming.InitialContext.init(InitialContext.java)
    at javax.naming.InitialContext.<init>(InitialContext.java)
    ===============================
    I did load the java with "loadjava" with on time with the "resolve" option and time time no option and still no working.
    Here is the EJB client code:
    =======================================
    import java.sql.*;
    import java.util.*;
    import javax.naming.*;
    import com.evermind.server.ApplicationClientInitialContextFactory;
    class EmpRemoteCall {
    public static void main(String[] args) {
    System.out.println(getEmpName());
    public static String getEmpName() {
    String ejbUrl = "java:comp/env/ejb/Emp";
    String username = "admin";
    String password = "admin";
    Hashtable environment = new Hashtable();
    environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");
    environment.put(Context.PROVIDER_URL, "ormi://127.0.0.1/testemp");
    environment.put(Context.SECURITY_PRINCIPAL, username);
    environment.put(Context.SECURITY_CREDENTIALS, password);
    //environment.put(Context.SECURITY_AUTHENTICATION, ServiceCtx.NON_SSL_LOGIN);
    //environment.put(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    com.kboum.sertir.essais.EmpHome homeInterface = null;
    try {
    Class.forName("com.evermind.server.ApplicationClientInitialContextFactory", true, ClassLoader.getSystemClassLoader());
    System.out.println("Creating an initial context");
    Context ic = new InitialContext(environment);
    System.out.println("Looking for the EJB published as 'java:comp/env/ejb/Emp'");
    homeInterface = (com.kboum.sertir.essais.EmpHome) ic.lookup(ejbUrl);
    catch (CommunicationException e) {
    System.out.println("Unable to connect: " + ejbUrl);
    e.printStackTrace();
    //System.exit(1);
    catch (NamingException e) {
    System.out.println("Exception occurred!");
    System.out.println("Cause: This may be an unknown URL, or some" +
    " classes required by the EJB are missing from your classpath.");
    System.out.println("Suggestion: Check the components of the URL," +
    " and make sure your project includes a library containing the" +
    " EJB .jar files generated by the deployment utility.");
    e.printStackTrace();
    //System.exit(1);
    catch (ClassNotFoundException e) {
    System.out.println("Unable to connect: " + ejbUrl);
    e.printStackTrace();
    //System.exit(1);
    try {
    System.out.println("Creating a new EJB instance");
    com.kboum.sertir.essais.Emp remoteInterface = homeInterface.findByPrimaryKey(Integer.valueOf("7369"));
    System.out.println(remoteInterface.getENAME());
    System.out.println(remoteInterface.getSAL());
    remoteInterface.setSAL(2);
    System.out.println(remoteInterface.getSAL());
    return remoteInterface.getENAME();
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    return "error";
    null

    What I did to solve this problem was to
    create a simple RMI remote object that
    resides outside the database JVM and that
    serves as a proxy EJB client for your java
    stored procedure. The stored procedure can
    invoke a method on the remote RMI object
    which then looks up the EJBean's home
    interface and invokes the relevant method on
    the bean's remote interface, and relays any
    return values back to the java stored
    procedure.
    Hope this helps,
    Avi.
    null

Maybe you are looking for