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.

Similar Messages

  • 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.

  • How to invoke Matlab from Java

    Hi, I want to pass some data generated from Java class to Matlab, then invoke Matlab from Java to run the computation program (file written in Matlab, myfile.m). I know Matlab can use classes generated from Java, how to drive Matlab from Java?
    I appreciate your help!
    yaya

    According to their documentation, you can't. Having said that, again according to their documentation, there are plans to support this in future releases.
    m

  • Invoke BPEL from Java for 11g

    I searched the forum and here's the code for 10g
    Trying to Invoke BPEL from JAVA
    I'm using 11g, do you know if the way to invoke BPEL is the same as 10g? If not, do you know what the differences are?
    Thanks,
    Andy

    I got the below errors when I try to call a composite in 11g. I wrote it in a simple java program and run it within jdeveloper. I'm using the adf binding. When I passed in an empty NormalizedMessage object then it worked fine. But when I passed in the payload data then I got the errors below. It did create an instance on my soa server but the instance did not call the pbel process. Do you have any ideas?
    StringBuffer inputPayload = new StringBuffer();
    inputPayload.append("<ns1:process xmlns:ns1=\"http://xmlns.oracle.com/BPELScheduler/LineItemProcessEventList\">");
    inputPayload.append("<ns1:input>test</ns1:input>");
    inputPayload.append("</ns1:process>");
    Locator locator = LocatorFactory.createLocator(jndiProps);
    Composite composite = locator.lookupComposite("default/BPELScheduler!1.0");
    Service service = composite.getService("lineitemprocesseventlist_client_ep_java");
    NormalizedMessage input = new NormalizedMessageImpl();
    input.getPayload().put("payload",inputPayload);
    service.post("process",input);
    ============ ERROR ========================================
    oracle.fabric.common.FabricInvocationException: java.rmi.RemoteException: EJB Exception: ; nested exception is:
         java.lang.RuntimeException: oracle.fabric.common.FabricInvocationException
         at oracle.soa.management.internal.facade.ServiceImpl.post(ServiceImpl.java:106)
         at com.masyc.scheduler.BPELDriver.callBpel(BPELDriver.java:54)
         at com.masyc.scheduler.BPELDriver.main(BPELDriver.java:24)
    Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
         java.lang.RuntimeException: oracle.fabric.common.FabricInvocationException
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
         at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_1031_WLStub.executeServiceMethod(Unknown Source)
         at oracle.soa.management.internal.ejb.EJBLocatorImpl.executeServiceMethod(EJBLocatorImpl.java:875)
         at oracle.soa.management.internal.facade.ServiceImpl.post(ServiceImpl.java:98)
         ... 2 more
    Caused by: java.lang.RuntimeException: oracle.fabric.common.FabricInvocationException
         at oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.executeServiceMethod(FacadeFinderBeanImpl.java:866)
         at sun.reflect.GeneratedMethodAccessor2796.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy238.executeServiceMethod(Unknown Source)
         at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.executeServiceMethod(FacadeFinderBean_4vacyo_FacadeFinderBeanImpl.java:1610)
         at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.fabric.common.FabricInvocationException
         at oracle.fabric.CubeServiceEngine.post(CubeServiceEngine.java:538)
         at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:142)
         at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:194)
         at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:204)
         at sun.reflect.GeneratedMethodAccessor1043.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy195.post(Unknown Source)
         at oracle.integration.platform.blocks.sdox.JavaEntryBindingComponent.post(JavaEntryBindingComponent.java:250)
         at oracle.soa.management.internal.ejb.impl.FacadeFinderBeanImpl.executeServiceMethod(FacadeFinderBeanImpl.java:864)
         ... 30 more
    Edited by: user8742475 on Nov 10, 2009 1:39 PM

  • Urgent :: 11g Invoking Composite from Java/From Webservice Proxy

    Hi All,
    i have a requirement where in need to when ever the exception occurs it invokes custom java and then it invoked a BPEL process to handle the errror.
    in 10.1.3.4 i used to Java Api to invoke the BPEL process and it works fine.
    1) . now we are migrating to 11g, i know this API wont work with 11g as the server is on weblogic and client librairies may be different for invoking in composite it in 11g. if any body has invoked a composite using java and the using 11g libraries to invoke the composite ? if so can you please post here ?
    2). otherway i tried to create a Web Service proxy using Jdeveloper for the composite, when i test it using Jdeveloper it is working fine, but when i place it in the lib directory, im getting a bad response from server 503.
    please see logs below for the second approch
    Caused by: javax.xml.ws.WebServiceException: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:989)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:224)
         at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invokeOneWay(OracleDispatchImpl.java:102)
         at oracle.integration.platform.blocks.soap.AbstractWebServiceBindingComponent.dispatchRequest(AbstractWebServiceBindingComponent.java:447)
         ... 61 more
    Caused by: javax.xml.soap.SOAPException: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call2(HttpSOAPConnection.java:209)
         at oracle.j2ee.ws.common.transport.HttpTransport.transmit(HttpTransport.java:73)
         at oracle.j2ee.ws.common.async.MessageSender.call(MessageSender.java:64)
         at oracle.j2ee.ws.common.async.Transmitter.transmitSync(Transmitter.java:134)
         at oracle.j2ee.ws.common.async.Transmitter.transmit(Transmitter.java:90)
         at oracle.j2ee.ws.common.async.RequestorImpl.transmit(RequestorImpl.java:273)
         at oracle.j2ee.ws.common.async.RequestorImpl.invokeOneWay(RequestorImpl.java:169)
         at oracle.j2ee.ws.client.jaxws.DispatchImpl.invokeOneWay(DispatchImpl.java:985)
         ... 64 more
    Caused by: javax.xml.soap.SOAPException: Bad response: 503 Service Unavailable
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.processHttpResponseCode(HttpSOAPConnection.java:603)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.post2(HttpSOAPConnection.java:469)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(HttpSOAPConnection.java:1203)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.j2ee.ws.saaj.client.p2p.HttpSOAPConnection.call2(HttpSOAPConnection.java:207)
         ... 71 more
    if any body has already implemented the invocation of composite in one of above approaches, please let me know.
    any pointers to resolve this will be of great help
    Thanks
    Nadh

    Here is sample to invoke a composite from JSP, this should be same from Java Class. Note that the composite should use adf binding and not ws binding.
    Here is snippet of composite.xml service:
    <service name="rmibpel_client_ep" ui:wsdlLocation="RMIBPEL.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/Application1/RmiVsSOAP/RMIBPEL#wsdl.interface(RMIBPEL)"/>
    <binding.adf serviceName="rmibpel_client" registryName=""/> </service>
    Note the binding should be binding.adf and not binding.ws
    Sample jsp:
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.Map" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="oracle.soa.management.facade.Locator" %>
    <%@page import="oracle.soa.management.facade.LocatorFactory" %>
    <%@page import="oracle.fabric.common.NormalizedMessage" %>
    <%@page import="oracle.soa.management.util.NormalizedMessageImpl" %>
    <%@page import="oracle.soa.management.facade.Composite" %>
    <%@page import="oracle.soa.management.facade.Service" %>
    <html>
    <head>
    <title>Invoke HelloWorld</title>
    </head>
    <body>
    <%
    String msg = request.getParameter("world");
    if(msg == null)
    msg = "World";
    String xml = "<process xmlns=\"http://xmlns.oracle.com/Application1/RmiVsSOAP/RMIBPEL\"><input>" + msg + "</input></process>";
         Hashtable jndiProps = new Hashtable();
         jndiProps.put(Context.PROVIDER_URL,"t3://strec03-1.us.oracle.com:8001/soa-infra");
    jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    jndiProps.put(Context.SECURITY_PRINCIPAL,"weblogic");
    jndiProps.put(Context.SECURITY_CREDENTIALS,"weblogic");
    jndiProps.put("dedicated.connection","true");
    Locator locator = LocatorFactory.createLocator(jndiProps);
         String compositeDN = "default/RmiVsSOAP!1.0";
    Composite composite = locator.lookupComposite(compositeDN);
    String serviceName = "rmibpel_client_ep";
    Service deliveryService = composite.getService(serviceName);
    System.out.println("composite=" + composite);
    System.out.println("deliveryServce=" + deliveryService);
    // construct the normalized message and send to Oracle WLS
    NormalizedMessage nm = new NormalizedMessageImpl();
    nm.getPayload().put("payload", xml );
         NormalizedMessage res = null;
         try {
              res = deliveryService.request("process", nm);
         catch(Exception e)
         e.printStackTrace();
    Map payload = res.getPayload();
    out.println( "BPELProcess HelloWorldService executed!<br>");
    //See below output in log file
    oracle.xml.parser.v2.XMLElement elem =
         (oracle.xml.parser.v2.XMLElement) payload.get("payload");
    elem.print(System.out);
    %>

  • Trouble to invoke BPEL from Java Client following rmi example

    I still have troubles to invoke my BPEL process from Java Client by following tutorial sample of 102.InvokingProcesses/rmi .
    I created my Java class within NetBeans IDE. And the following line of code return null for url,
    java.net.URL url = ClassLoader.getSystemResource("context.properties");
    I think that I need to have SystemResource set up somewhere, how should I do that?

    if you using oc4j.. then please make a small change in oc4j_context.properties
    from
    java.naming.provider.url=[java.naming.provider.url]
    to
    java.naming.provider.url=ormi://hostname/orabpel
    And please make sure the context.properties file which gets copied to classes/context.properties has this above entry. For more details please refer to build.xml under rmi folder.
    Please do let me know if you face any issue.

  • [HELP] How to invoke BPEL from JAVA program via calling WSDL?

    Dear all,
    Customer want to invoke BPEL process in their Java program by calling BPEL WSDL, but not successfully.
    Does BPEL support this calling way? If so, would pls give a sample?
    BTW, they do not want to use API of OraBPEL.jar.
    Thanks in advance.

    Krishna, Not sure what you mean by 'normal' web service....I mean, is BPEL service not normal, is it not as per WS standards. It would be interesting if you could shed some light on that.
    On the question of calling BPEL, I thought there were two methods - one is using the BPEL PM API, which uses the locator class to get hold of BPEL PM instance and then call a deployed bpel service
    The other way is to develop a web service proxy using JDeveloper. Its a very simple process. Once you do that, you can call the proxy from Java.

  • How to invoke javafx from java code

    hi all,
    i'm trying to invoke my .fx class from java class, but getting exception.
    Exception thrown in JavaFX pretty printing: java.io.FileNotFoundException: \tmp\___FX_SCRIPT___.fxdump from StringInputBuffer (The system cannot find the path specified)
    Exception thrown in JavaFX pretty printing: java.io.FileNotFoundException: \tmp\___FX_SCRIPT___.fxdump from StringInputBuffer (The system cannot find the path specified)
    javax.script.ScriptException: compilation failed
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.parse(JavaFXScriptEngineImpl.java:255)
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:145)
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:136)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
    at myclockproject.Main2.main(Main2.java:34)
    I read in article http://java.sun.com/developer/technicalArticles/scripting/javafx/javafx_and_java/ about including javafxc.jar in classpath .. could some one tell me what classpath he meant, i have included it in my environment variable and also project libraries .. still getting error :(

    coolsayan.2009 wrote:
    thanx.is communication api required?but is the communication api available for windows?its available for linux and sparc??Are you referring to the COMM API that is referenced in the first link when you google - the one entitled "How to Send SMS using Java Program (full code sample included)"? If so, Here: [http://java.sun.com/products/javacomm/|http://java.sun.com/products/javacomm/]
    what to do in serverside?is any change required in web.xml or any jndi setup in serverside if i call the java class from a jsp page?I don't know, are you planning on making your class available through JNDI?

  • Trying to Invoke BPEL from JAVA

    Hi
    I want to invoke a bpel process deployed on 10.1.3.X SOA Server from my java program.
    I have inculded a properties file which have following details:
    orabpel.platform=ias_10g
    java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory
    java.naming.provider.url=opmn:ormi://adc60009rems.us.oracle.com:6083:oc4j_soa/orabpel
    java.naming.security.principal=oc4jadmin
    java.naming.security.credentials=welcome1
    JAVA Code is:
    Locator locator = new Locator("default","bpel",props);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart("payload", xml );
    System.out.println(nm);
    deliveryService.post("FixXREF", "initiate", nm);
    where xml is the soap message.
    The problem is, BPEL process is getting invoked but not with the given xml.
    Input to BPEL is empty.
    Can someone please let me know, what I am missing or what is the correct process to call a BPEL from Java.
    Thanks
    Sushama

    Hi,
    how does your payload (xml) looks like? I would recommend you to start a Process using the BPEL Console and then compare both payloads. Maybe you are missing some namespaces.

  • Sample invoke COM from JAVA

    Hi,
    I already tested a sample program for calling EJB from COM.
    But, I wanna test calling COM from JAVA.
    Where can I get a sample for this?
    Thanks in advance.

    attached is an example that demonstrates calling a COM
    object from a JSP page.
    damon
    "YI Kim" <[email protected]> wrote in message
    news:3be7a4a3$[email protected]..
    >
    Hi,
    I already tested a sample program for calling EJB from COM.
    But, I wanna test calling COM from JAVA.
    Where can I get a sample for this?
    Thanks in advance.
    [JSPtoCOM.zip]

  • How to invoke browser from java program in Solaris ?

    Hi all,
    Is there any way by which a browser can be opened with specific URL, from a java program in solaris OS ?
    In windows I am able to do so by using "rundll32 url.dll,FileProtocolHandler".
    Thanks,
    ngs

    Well, how is a browser normally invoked on Solaris? And have a look at JDIC, maybe it helps you.

  • Invoke bpel from java - Failed to create "ejb/collaxa/system/DeliveryBean

    Hi,
    I have a very simple java class to invoke CreditRatingProcess sample:
    String ssn = null;
    if (ssn == null)
    ssn = "123-12-1234";
    String xml =
    "<ssn xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
    Locator locator = new Locator("default", "oc4jadmin", "localhost");
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    nm.addPart("payload", xml);
    NormalizedMessage res =
    deliveryService.request("CreditRatingService", "process", nm);
    Map payload = res.getPayload();
    System.out.println("BPELProcess CreditRatingService executed!<br>");
    System.out.println("Credit Rating is " + payload.get("payload"));
    When I try to execute, I have the following error:
    java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at docsdemo.bpelapi.BPELProcess.callProcess(BPELProcess.java:84)
         at docsdemo.bpelapi.tests.Test1.<init>(Test1.java:14)
         at docsdemo.bpelapi.tests.Test1.main(Test1.java:18)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at docsdemo.bpelapi.BPELProcess.callProcess(BPELProcess.java:84)
         at docsdemo.bpelapi.tests.Test1.<init>(Test1.java:14)
         at docsdemo.bpelapi.tests.Test1.main(Test1.java:18)
    I use SOA suite 10.1.3 Developer Preview and JDeveloper 10.1.3
    Can you help me?
    Cyryl
    Message was edited by:
    cbalmati
    Message was edited by:
    cbalmati

    Hi,
    Thanks fro your answer. But it does not work ...
    My demo runs on my laptop (SOA10.1.3 DP / JDeveloper 10.1.3)
    This is my code:
    public void test() {
    String xml = "<name xmlns=\"http://samples.otn.com/helloworld\">" + "test" + "</name>";
    Hashtable jndi = null;
    jndi = new Hashtable();
    // Change the PROVIDER_URL to your BPEL PM host...
    jndi.put(Context.PROVIDER_URL, "ormi://localhost/orabpel");
    jndi.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    jndi.put(Context.SECURITY_PRINCIPAL, "admin");
    jndi.put(Context.SECURITY_CREDENTIALS, "welcome");
    jndi.put("dedicated.connection", "true");
    Locator locator = null;
    try {
    locator = new Locator("default","bpel", jndi);
    } catch (ServerException e) {
    e.printStackTrace();
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage( );
    System.out.println(xml);
    nm.addPart("payload" , xml );
    try {
    deliveryService.post("HelloWorld", "initiate", nm);
    } catch (ServerException e) {
    e.printStackTrace();
    } catch (RemoteException e) {
    e.printStackTrace();
    and that's my error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/ejb/EJBException
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
         at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
         at docsdemo.ui.XMLMessageHelper.test(XMLMessageHelper.java:62)
         at docsdemo.ui.tests.Tests.<init>(Tests.java:15)
         at docsdemo.ui.tests.Tests.main(Tests.java:20)
    I don't understand because I created a simple JSP to invoke helloWorld process (same code), it's works !!
    Any suggestion?
    Cyryl

  • How to invoke dll from Java applications

    Hello Friends,
    I am new to JNI application and I never tested it before. Now I have to interact with dll�s
    Which is running on AS400 machines. Currently our application, which is mainly retrieving the data and passing some parameter to the dll�s through Delphi application.
    There are two dll�s called
         1) Client side dll - to make the connection with server side dll.
         2) Server side dll � to deal all server side operations.
    Now, I have to write the interface in java to interact with client side dll and I have to display the values on browser.
    If any one did this kind of application give guidance for me
    Thanks in advance.
    Selvin.

    look for those applications/keywords
    JNI (java native interface)
    jactivex

  • Invoking Bpel Process from JAVA

    Hi I am new to BPEl.
    I am trying to Invoke Bpel From Java client provided in samples...
    i am getting
    java.lang.NullPointerException
    at this line..
    Map payload = res.getPayload();
    The Bpel Process is on my local machine...
    i kept the properties file as it is....
    Can any one Respond please.....

    Hi
    now i am getting this exception
    java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext; nested exception is:
         java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext [Root exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext]
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:168)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
         at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:140)
         at com.oracle.bpel.client.Locator.<init>(Locator.java:111)
         at com.otn.samples.RMIClient.main(RMIClient.java:49)
    Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
         at java.lang.Class.getDeclaredMethod(Class.java:1262)
         at java.io.ObjectInputStream$1.run(ObjectInputStream.java:1198)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.io.ObjectInputStream.auditSubclass(ObjectInputStream.java:1190)
         at java.io.ObjectInputStream.verifySubclass(ObjectInputStream.java:1171)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:248)
         at com.evermind.io.ClassLoaderObjectInputStream.<init>(ClassLoaderObjectInputStream.java:16)
         at com.evermind.server.ejb.EJBInputStream.<init>(EJBInputStream.java:35)
         at com.evermind.server.rmi.RMIInputStream.<init>(RMIInputStream.java:20)
         at com.evermind.server.rmi.RMIConnection.createInputStream(RMIConnection.java:2417)
         at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2555)
         at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2361)
         at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1800)
         at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:676)
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
         ... 6 more
    can you say how to fix this...

  • Invoking JavaFX script from Java

    Hi,
    Just started working on javafx and got the error below while trying to invoke javafx from java.
    /******************** my java code *************************/
    package fxexamples;
    import javax.script.Bindings;
    import javax.script.ScriptContext;
    import javax.script.ScriptEngine;
    import javax.script.ScriptEngineManager;
    import javax.script.SimpleScriptContext;
    import javax.swing.SwingUtilities;
    public class RunFX {
         public static void main(String[] args) {
              final DataObject myObj = new DataObject();
              Runnable fxScript = new Runnable() {
                   public void run() {
                        ClassLoader loader = Thread.currentThread()
                                  .getContextClassLoader();
                        ScriptEngineManager manager = new ScriptEngineManager(loader);
                        ScriptEngine engine = manager.getEngineByExtension("fx");
                        String script = "import fxexamples.FXtoJava;";
                        try {
                             engine.eval(script);
                        } catch (Exception ex) {
                             ex.printStackTrace();
              SwingUtilities.invokeLater(fxScript);
    /*****************my fx file **************************/
    import javafx.stage.Stage;
    Stage {
    title: "Die, Ajax! - Hello World"
    width: 250
    height: 50
    /*******************stack trace********************/
    javax.script.ScriptException: compilation failed
         at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.parse(JavaFXScriptEngineImpl.java:260)
         at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:149)
         at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:140)
         at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
         at fxexamples.RunFX$1.run(RunFX.java:30)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Thanks in advance.

    I too, am having problems with using JSR-223 to use JavaFX script from within Java, specifically using Java FX 1.1 and Java 6. Please see:
    http://forums.sun.com/thread.jspa?threadID=5373145

Maybe you are looking for