Embedded Java code with bpelx:exec

When I embed Java code with bpelx:exec, I would like use classes packaged in a jar file. How do I ensure that the jar file is deployed with the suitcase? I tried adding the library to the JDeveloper project (right-click project, choose properties, libraries), but that did not work.

Although the tooling does not expose this functionality yet, the bpel packaging and bpelc command line tool support the ability to put a library in BPEL-INF/lib and using it in the exec activity. You can also put classes in BPEL-INF/classes. Please look at:
[ORACLE_HOME]\integration\orabpel\samples\references\JavaExec for more information.
-Edwin

Similar Messages

  • XPathFactory error in embedded Java code

    Hi,
    I'm getting the following error when executing embedded Java code which does an XPath expression. Does anyone know why this is happening? Thanks.
    [2006/03/13 17:55:22] "{http://schemas.oracle.com/bpel/extension}bindingFault" has been thrown. less
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>Operation failed!; nested exception is: java.lang.IllegalArgumentException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom</summary>
    </part>
    <part name="detail">
    <detail>java.lang.IllegalArgumentException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom</detail>
    </part>
    </bindingFault>

    Hi,
    Refer the URL :http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/AbstractTransformation.html
    regards,
    ganga

  • Embedding Java Code(URGENT)

    Hello,
    I'm trying to do the following, I'm trying to embed Java code into my BPEL process, I have read the tutorial that explains how to embed a java code into BPEL(http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Training-Segment10.pdf) but unfortunately the tutorial discusses only how to call the Entity Bean but doesnt mention where in folders(directory) should the bean itself be placed, where are the imports.
    I'm going to start with a simple example, a class called Multiplier that has function square, Here is the code for the class:
    //Java Multiplier class
    public class Multiplier{
    public Multiplier(){}
    public int square(int x){
    return x*x; }
    this is code that will be placed in the EXEC(Java code snippet):
    //Java Code Snippet goes here...
    try{
    Object input= getVariableData
    ("input","payload","/JavaCode");
    String parser= input.toString();
    int in= Integer.parseInt(parser);
    Multiplier obj1= new Multiplier();
    int result= obj1.square(in);
    addAuditTrailEntry("The square of the input is:"+result);
    catch(Exception en){
    addAuditTrailEntry(en);
    Where should the multiplier class be located(in which folder in the ecplise)or how will the BPEL refer to it ?
    Shouldnt I import the Multiplier class in the EXEC(snippet) where should that line go?
    Thanks in advance
    Hussam Galal

    After going through the Forum I saw I question similar to mine, and I found out there's an example similar to what I am trying to do at C:\orabpel\samples\references\JavaExec
    I tried to make an example almost exactly like JavaExec and I edited my build.xml to be similar to build.xml of the example but I keep getting this error:
    BUILD FAILED: C:\eclipse-SDK-3.0-win32\eclipse\workspace\Calc\build.xml:28: ORABPEL-00017
    Java compilation failed.
    Failed to compile file(s) "Calc.bpel".
    Exception reported is: Calc.bpel:44: ';' expected.
    Multiplier mult= new Multiplier();
    ^
    1 error
    Please verify that file Calc.bpel is valid java file or if all required libraries are included in your classpath.
    classpath: C:\eclipse-SDK-3.0-win32\eclipse\startup.jar;C:\eclipse-SDK-3.0-win32\eclipse\startup.jar;C:\eclipse-SDK-3.0-win32\eclipse;c:\eclipse-SDK-3.0-win32\eclipse\plugins\bpelz_0.9.10\lib\orabpel-ant.jar;c:\eclipse-SDK-3.0-win32\eclipse\plugins\bpelz_0.9.10\lib\orabpel-boot.jar;c:\eclipse-SDK-3.0-win32\eclipse\plugins\bpelz_0.9.10\lib\orabpel-common.jar;c:\eclipse-SDK-3.0-win32\eclipse\plugins\bpelz_0.9.10\lib\orabpel-thirdparty.jar;c:\eclipse-SDK-3.0-win32\eclipse\plugins\bpelz_0.9.10\lib\orabpel.jar;C:\DOCUME~1\temp_ps\LOCALS~1\Temp\bpelc40446.tmp\BPEL-INF\classes
    Here's the java code in the EXEC(snippet):
    // Java code snippet goes here ...
    com.otn.samples.javaexec.Multiplier
    Multiplier mult= new Multiplier();
    Object obj1= getVariableData("input","payload","/Calc");
    String str= obj1.toString();
    int in= Integer.parseInt(str);
    int result= mult.square(in);
    addAuditTrailEntry("The result is: "+result);
    Finally here's the my build.xml:
    <?xml version="1.0"?>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Run cxant on this file to build, package and deploy the
    Calc BPEL process
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <project name="Calc" default="all" basedir=".">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Name of the domain the generated BPEL suitcase will be deployed to
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <property name="deploy" value="default"/>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    What version number should be used to tag the generated BPEL archive?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <property name="rev" value="1.0"/>
         <target name="CompileJava">
         <mkdir dir="${basedir}/BPEL-INF/classes"/>
              <javac srcdir="${basedir}/src" destdir="${basedir}/BPEL-INF/classes"/>
         </target>
    <target name="Calc">
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the bpelc task compiles and package BPEL processes into versioned BPEL
    archives (bpel_...jar). See the "Programming BPEL" guide for more
    information on the options of this task.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <bpelc home="${home}" rev="${rev}" deploy="${deploy}"/>
    </target>
    <target name="all" depends="CompileJava, Calc"/>
    </project>

  • Error in embedding java code in Bpel process

    I am calling one of the java snippet in my process which in turn uses the files from some jars.
    But I am getting error :
    <2006-11-07 12:08:51,227> <ERROR> <default.collaxa.cube.engine.bpel> BPELExecution
    java.lang.ExceptionInInitializerError
         at bpel.p0.ExecLetBxExe0.execute(ExecLetBxExe0.java:35)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:52)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
         at com.misys.eqplus.framework.management.instrumentation.ManagementEvent.<clinit>(ManagementEvent.java:36)
         ... 22 more
    I am putting the jar files in my
    BPEL_INF flder
    and entering it in this in C:\OraBPELPM_1integration\orabpel\domains\default\config\domain
    properties file in C:\OraBPELPM_1\integration\orabpel\domains\default\config
    ear file in C:\OraBPELPM_1\integration\orabpel\system\appserver\oc4j\j2ee\home\applications
    Please help me

    Hello Santosh,
    Are you importing the used java classes using <bpelx:exec import="classname"/>
    Regards,
    Melvin

  • Compiling Java code with Japanese characters

    I have a Java code with some Japanese characters. My compiler doesn't recognise these characters and gives me error messages.
    Please help me.

    Obviously it's not the copmiler's fault. You need to fix your code.
    Here is a link to the Java Language Specification.
    The link is to section 3.8 - Identifiers.
    It describes the acceptable naming:
    http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#40625
    Perhaps your editor is not saving the text file in an appropriate format.
    What editor are you using?
    Try vim http://www.vim.org
    or SciTE http://www.scintilla.org/SciTE.html

  • Calling java classes using bpelx:exec (Java Embedding) Erorr

    I try to add java embedding activity.
    So, I add code in this activity:
    <bpelx:exec name="Java_Embedding_1" language="Java" version="1.4"><![CDATA[Element ele=(Element)getVariableData("/StringForSubject");
    ]]>
    </bpelx:exec>
    where ("/StringForSubject") is local variable of scope activity, where situated java embedding activity.
    Try to compile, but JDeveloper show error message:
    Error: Java compilation failed. Failed to compile file(s) "test.bpel". Exception reported is: test.bpel:1156: Class bpel.p0.Element not found. Element ele=(Element)getVariableData("/StringForSubject"); ^ test.bpel:1156: Class bpel.p0.Element not found. Element ele=(Element)getVariableData("/StringForSubject"); ^ 2 errors Please verify that file test.bpel is valid java file or if all required libraries are included in your classpath.
    How can i solve this problem.
    Thank You!!!!

    add an import at the top of the process .. or specify the package ..
    org.w3c.dom.Element
    hth clemens

  • Error in deploying BPEL Process with Embedded Java code

    Hi all,
    I am trying to do a simple sample BPEL Process which invokes a Java class.i have placed the jar file in the classpath and the Process compiles and builds in the BPELDesigner,but when deployed it shows the below error in the BPEL console.The beauty here is it show a success message in the BPEL Designer after deployment.
    <2007-07-19 05:03:07,640> <INFO> <production.collaxa.cube.compiler> validating "C:\OraHome_1\integration\orabpel\domains\production\tmp\.bpel_Employee_1.0.jar\Employee.bpel" ...
    <2007-07-19 05:03:09,187> <ERROR> <production.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
    Process "Employee" (revision "1.0") compilation failed.
    <2007-07-19 05:03:09,187> <ERROR> <production.collaxa.cube.engine.deployment> <CubeProcessLoader::create> Failed to compile classes.
    Failed to compile the generated BPEL classes for "Employee".
    <2007-07-19 05:03:09,187> <ERROR> <production.collaxa.cube.engine.deployment> Process "Employee" (revision "1.0") load FAILED!!
    <2007-07-19 05:03:09,203> <ERROR> <production.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "domain manager": Error while loading process.
    The process domain encountered the following errors while loading the process "Employee" (revision "1.0"): Failed to compile classes.
    Failed to compile the generated BPEL classes for "Employee".
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
    ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "Employee" (revision "1.0"): Failed to compile classes.
    Failed to compile the generated BPEL classes for "Employee".
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:1269)
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(CubeProcessHolder.java:882)
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadArchive(CubeProcessHolder.java:824)
         at com.collaxa.cube.engine.CubeEngine.loadProcessArchive(CubeEngine.java:939)
         at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.loadProcessArchive(BPELDomainManagerBean.java:390)
         at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchive(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2157)
         at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubeProcessMonitorWork.java:130)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
         at java.lang.Thread.run(Thread.java:534)
    <2007-07-19 05:03:09,234> <ERROR> <production.collaxa.cube.engine.deployment> <CubeProcessMonitorWork::run> Error while loading process archive C:\OraHome_1\integration\orabpel\domains\production\deploy\bpel_Employee_1.0.jar
    ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "Employee" (revision "1.0"): Failed to compile classes.
    Failed to compile the generated BPEL classes for "Employee".
    If you have installed a patch to the server, please check that the bpelcClasspath domain property includes the patch classes.
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.bind(CubeProcessHolder.java:1269)
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadAndBind(CubeProcessHolder.java:882)
         at com.collaxa.cube.engine.deployment.CubeProcessHolder.loadArchive(CubeProcessHolder.java:824)
         at com.collaxa.cube.engine.CubeEngine.loadProcessArchive(CubeEngine.java:939)
         at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.loadProcessArchive(BPELDomainManagerBean.java:390)
         at IBPELDomainManagerBean_StatelessSessionBeanWrapper34.loadProcessArchive(IBPELDomainManagerBean_StatelessSessionBeanWrapper34.java:2157)
         at com.collaxa.cube.engine.deployment.CubeProcessMonitorWork.run(CubeProcessMonitorWork.java:130)
         at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
         at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:267)
         at java.lang.Thread.run(Thread.java:534)
    Your sugegstions are appreciated..
    Plzz help...
    Regards
    Subramanian

    Hi all..
    Thanks for ur response,but still my problem is not solved...
    Below is the BPEL file and the java class (which isinvoked from the process)
    BPEL FILE
    <!-- Employee -->
    <process name="BusinessTravelProcess" targetNamespace="http://packtpub.com/bpel/travel/" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:emp="http://packtpub.com/service/employee/" xmlns:bpelx="http://schemas.oracle.com/bpel/extension">
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="com.packtpub.EmployeeStatus"/>
    <partnerLinks>
    <partnerLink name="employeeTravelStatus" partnerLinkType="emp:employeeLT" myRole="employeeTravelStatusService"/>
    </partnerLinks>
    <variables><!-- input for this process -->
    <variable name="EmployeeTravelStatusRequest" messageType="emp:EmployeeTravelStatusRequestMessage"/><!-- output from the Employee Travel Status web service -->
    <variable name="EmployeeTravelStatusResponse" messageType="emp:EmployeeTravelStatusResponseMessage"/>
    </variables>
    <sequence><!-- Receive the initial request for business travel from client -->
    <receive partnerLink="employeeTravelStatus" portType="emp:EmployeeTravelStatusPT" operation="EmployeeTravelStatus" variable="EmployeeTravelStatusRequest" createInstance="yes"/><!-- Prepare the output -->
    <assign>
    <copy>
    <from>
    <travelClass xmlns="http://packtpub.com/service/employee/">Economy
    </travelClass>
    </from>
    <to variable="EmployeeTravelStatusResponse" part="travelClass"/>
    </copy>
    </assign><!-- Invoke the EmployeeStatus Java class instead of web service -->
    <bpelx:exec name="Java_Embedding_1" language="Java" version="1.4"><![CDATA[
    EmployeeStatus e = new EmployeeStatus();
    String firstName = ((Element)getVariableData(
    "EmployeeTravelStatusRequest", "employee",
    "/employee/FirstName")).getNodeValue();
    String lastName = ((Element)getVariableData(
    "EmployeeTravelStatusRequest", "employee",
    "/employee/LastName")).getNodeValue();
    String empStatus = e.getTravelStatus(firstName, lastName);
    addAuditTrailEntry("Employee status is: " + empStatus);
    setVariableData("EmployeeTravelStatusResponse", "travelClass",
    "/travelClass", empStatus);]]>
    </bpelx:exec>
    <reply partnerLink="employeeTravelStatus" portType="emp:EmployeeTravelStatusPT" operation="EmployeeTravelStatus" variable="EmployeeTravelStatusResponse"/>
    </sequence>
    </process>
    Java File:
    package com.packtpub;
    public class EmployeeStatus {
    public String getTravelStatus (String firstName, String lastName) {
    return "Economy";
    }

  • ORABPEL-05250 - Deployment error after embedding java code

    hi i am getting the following error when deploying my composite i added embedded java and imported the necessary classes i think but if i take the embedded java out it deploys succsefully :
    [09:17:17 PM] Received HTTP response from the server, response code=500
    [09:17:17 PM] Error deploying archive sca_getPickFile_rev1.0.jar to partition "default" on server SANDPIT_SOA
    [09:17:17 PM] HTTP error code returned [500]
    [09:17:17 PM] Error message from server:
    There was an error deploying the composite on SANDPIT_SOA: Error occurred during deployment of component: processGetPckFile to service engine: implementation.bpel, for composite: getPickFile: ORABPEL-05250
    Error deploying BPEL suitcase.
    error while attempting to deploy the BPEL component file "/u01/oracle/FSOAS/product/fmw/user_projects/domains/FSOAS_domain/servers/SANDPIT_SOA/dc/soa_e76b434b-6704-4820-b544-ad56277e0fd9"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of processGetPckFile
    This error contained an exception thrown by the underlying deployment module.
    Verify the exception trace in the log (with logging level set to debug mode).
    [09:17:17 PM] Check server log for more details.
    [09:17:17 PM] Error deploying archive sca_getPickFile_rev1.0.jar to partition "default" on server SANDPIT_SOA
    [09:17:17 PM] #### Deployment incomplete. ####
    [09:17:17 PM] Error deploying archive file:/C:/JDeveloper/mywork/pdfService/getPickFile/deploy/sca_getPickFile_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)

    Hi
    some times this error comes if the Packages for using JAVA are not i mported into BPEL Weused to get same error but after importing the packages the error usually used to be solved please check whether if the class files which you are using are correctly imported or not
    ex
    <import location="java.util.Properties"
    importType="http://schemas.oracle.com/bpel/extension/java"/>
    <import location="java.io.*"
    importType="http://schemas.oracle.com/bpel/extension/java"/>

  • Calling EJB with bpelx:exec lookup-methode

    I created a EJB3.0 that I try to lookup in a BPEL Java Embedding activity with following code:
    try {          
      Object homeObj = lookup("ejb/stateless/LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote");
    } catch (Exception ex) {              
       addAuditTrailEntry(ex);   
    }I get Logged exception "NameNotFoundException" as result. Unfortunately I do not have a clue why this happens.
    To prove the lookup-name I checked jndi-tree and it shows Binding-Name: ejb.stateless.LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote. So jndi-name seems to be ok.
    Also I generated a java client with JDeveloper that works well too.
    Code Java Client:
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"; );
    env.put(Context.PROVIDER_URL, "t3://server:port");
    InitialContext context = new InitialContext( env );     
    LoginDataBeanRemote loginDataBeanRemote = (LoginDataBeanRemote)context.lookup("ejb/stateless/LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote";);The bean I try to call is following:
    @Stateless(name = "LoginData", mappedName = "ejb/stateless/LoginDataBean")
    @Local(LoginDataBeanLocal.class)
    @Remote(LoginDataBeanRemote.class)
    public class LoginDataBean implements LoginDataBeanLocal, LoginDataBeanRemote{
      public LoginDataBean() {}
    }I did online research but could not find any usefull information. Also I do not know if remote or local jndi-name is necessary for lookup-methode. I am using SOA Suite 11.1.1.3.0.
    I would really appreciate some help.
    Thx
    Pascal

    Have you resolved this? I'm struggling with the exact same problem; a standalone EJB Java client works and I can see the mapped name in the soa server JNDI tree etc

  • Java code with BSP

    Hi Experts,
    Is there any way to write java code in BSP pages or to call java code from BSP pages?
    Thanks in Advance
    Shilpa Dhawan

    Hi,
    Let there be no misunderstanding.
    Java has NOTHING to do with Javascript and vice versa.
    Check this like
    http://www.htmlgoodies.com/beyond/javascript/article.php/3470971
    http://www.dannyg.com/ref/javavsjavascript.html
    for the differences
    Eddy
    PS. Reward the useful answers and you will get <a href="/people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

  • Format Java Code with jdeveloper

    Hi Everybody,
    Can anybody tell me How I can Indent Java Code Automatically using JDeveloper 9i.
    It is a facility which is provided in almost all the editor and I believe it should be in jdeveloper also but the problem is I dont know how to go for it.
    I will be very kind to anybody who will solve this problem as this will reduce my lot of unwanted work.
    Regards,
    Amit Jain

    If you're looking for a code beautifier (a tool that can apply a coding style to your source code automatically), try the Jalopy extension. It's an open source code beautifier that is tightly integrated with JDeveloper:
    http://jalopy.sourceforge.net/plugin-jdev.html
    Thanks,
    Brian
    JDev Team

  • Integrating Java code with pre-existing C application

    My team has been tasked to develop wizards for a pre-existing C application on Unix. We don't own the C code so we can make only limited changes to the native code.
    The challenge is to call the Java wizard from within the C code, and then to allow the Java code to use services and data in the C code. I can call Java from C, and then call C from Java. But the C code that gets called from Java doesn't seem to have access to the data known by the C code that called the Java.
    The only way I've thought of to handle this is to pass function pointers as paramters to the Java program, which can then pass the pointers on to the C code that it calls. Is there a way to pass pointers into Java?

    But the C code that gets called from Java doesn't seem to have access to the data known by the C code that called the Java.
    I don't know exactly what you mean here, unless you're simply saying that the scope of your C data makes it inaccessible between functions.
    Is there a way to pass pointers into Java?
    Yep - Just treat the pointers as opaque types and wrap them in something large enough for the platform - for example a jlong. You need to be sure to be careful in managing the lifetime of the pointers with respect to the Java objects that hold onto them - for example, with function pointers that come from a dynamically loaded shared library or any data pointers that you might be passing around. You probably want to read the section on native peers in the JNI programmer's guide.
    God bless,
    -Toby Reyelts
    Check out the free, open-source, JNI toolkit, Jace - http://jace.reyelts.com/jace

  • Embedded Java Code - How to retrieve multivalue payload value

    I'm working in my SOA-Composite which is used with OIM and our approval process. Here is an example of the payload data:
    >
    <ns2:RequesterDetails>
    <ns2:FirstName>System</ns2:FirstName>
    <ns2:MiddleName/>
    <ns2:LastName>Administrator</ns2:LastName>
    <ns2:Login>XELSYSADM</ns2:Login>
    <ns2:DisplayName>System Administrator</ns2:DisplayName>
    <ns2:ManagerLogin/>
    <ns2:OrganizationName>Xellerate Users</ns2:OrganizationName>
    <ns2:Email>[email protected]</ns2:Email>
    <ns2:StartDate/>
    <ns2:EndDate/>
    <ns2:Status>Active</ns2:Status>
    <ns2:XellerateType>End-User Administrator</ns2:XellerateType>
    <ns2:UserType>Full-Time</ns2:UserType>
    <ns2:Role>SYSTEM ADMINISTRATORS</ns2:Role>
    <ns2:Role>Test Role 1</ns2:Role>
    <ns2:Role>Test Role 2</ns2:Role>
    </ns2:RequesterDetails>
    >
    I am able to retrieve single values with code like this:
    >
    //Retrieve Requester Login
    Object requesterXMLElem = getVariableData("inputVariable", "payload","/ns3:process/ns4:RequesterDetails/ns4:Login");
    String requesterLogin = ((oracle.xml.parser.v2.XMLElement)requesterXMLElem).getText();
    >
    How do i retrieve the multivalue Role values and not just a single entry?
    Thanks,
    Kevin

    I see what i missed with the doube slash, i thought you had a typo and assumed i used it. If i use the following:
    //Retrieve Requester Roles
    Object requesterRolesXMLElem = getVariableData("inputVariable", "payload","/ns3:process/ns4:RequesterDetails//ns4:Role");
    System.out.println("Requester Roles Type[" + requesterRolesXMLElem.getClass() + "]");
    int requesterRolesCount = ((oracle.xml.parser.v2.XMLElement)requesterRolesXMLElem).getAttributes().getLength();
    System.out.println("Requester Roles Length[" + requesterRolesCount + "]");
    String requesterRole = ((oracle.xml.parser.v2.XMLElement)requesterRolesXMLElem).getText();
    System.out.println("Requester Roles[" + requesterRole + "]");
    I get the following output:
    Requester Roles Type[class oracle.xml.parser.v2.XMLElement]
    Requester Roles Length[0]
    Requester Roles[SYSTEM ADMINISTRATORS]
    I am not seeing how to loop through each if the type is class oracle.xml.parser.v2.XMLElement
    Thanks,
    Kevin

  • Importing classes with embedded java

    I have the following line of code:
    Element input = (Element)getVariableData("sourceString");
    I'm trying to get the value the the variable 'sourceString' from the bpel process. When I try and compile I get the error:
    class bpel.testmq.Element not found.
    testmq is the name of my bpel process.
    I have tried using javax.lang.model.Element, and org.jdom.Element with no success.
    cheers
    James

    Finally, I think I have figured out all my java issues.
    to import java classes all you need to do is enter the following in the source code of your bpel process. This is places after the last line of the process and before the partner links.
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.rmi.RemoteException"/>
    <bpelx:exec import="javax.naming.NamingException"/>
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="java.math.*"/>
    cheers
    James

  • Embedded Java in BPEL and exception handling

    Hello everybody,
    i want to use some embedded java code in my BPEL process (bpelx:exec). This code would sometimes throw exceptions. How can i deal with these exceptions to control my BPEL process? I would like, in a sense, to do some catching of java exceptions but at the BPEL level... for example, my java code would throw an exception, that my BPEL process would "catch" and react the way i want. Is it possible to do that?
    Thanks for your help!
    Nicolas

    you need to throw a com.oracle.bpel.client.BPELFault ..
    from the code
    * This class represents a standard fault that may be thrown by the server
    * during run-time. A BPEL fault has defined, minimally, a QName that
    * corresponds to the fault name (there are several standard faults that
    * are supported, please refer to Appendix A - Standard Faults in the BPEL
    * 1.1 specification for a complete list).
    * <p>
    * This class can only be used from within a <code>bpelx:exec</code> activity;
    * the <code>throw</code> activity can be used from BPEL code.
    * <p>
    * Additional information (such as a fault variable) can be passed through
    * as a part. Currently, internal system errors populate error codes and
    * summary messages via parts.
    hth clemens

Maybe you are looking for

  • Adobe Air not working - error on mouseover or any interaction

    I had Adobe Air installed on Windows XP for a while, updated and all. It was working fine a few days ago, then an error repeatedly started occurring immediately after running an app. Normal Adobe Air deinstallation was not possible, due to the same p

  • Photo uploaded from PC when posted, displays long description of image, instead of my own comments that were just typed.

    All previous saved and uploaded images were able to be posted without excessive, unwanted image descriptions. I typed my OWN comment to go along with my posting, but the image description appeared in the box instead. I tried posting ONLY the image, b

  • How to block my lost BB Torch 9800?

    I lost my BB Torch 9800 few days ago and I have not download/activated the BB Protect feature. There was no password, no lock at all. I also removed my sim so I could not even try to call it. I hope you could help me block the unit in order not to be

  • Purchased Songs Scroll, Songs From CDs Play

    I have a recurring problem with my new mini. I go for a run, using my mini, and it works great. I turn it off and go to use it the next day, and if I did not recharge the mini over night, my mini will scroll through music purchased from iTunes, and w

  • Safari Reopening After Quitting

    I've been having this problem ever since I installed Mac OS X 10.6 Snow Leopard on my 13" MacBook: Whenever I quit Safari, it automatically reopens and hides itself for no apparent reason. I thought this was just an issue with an add-on I had on Safa