Trying to invoke a Java class from BPEL Proces using Java Embedding

Hi All,
I have a requirement to invoke a Java class from the BPEL process;
I am trying to import the class by "* <bpelx:exec import="+package_name.classname+"/>*.
But, while compiling, I get the following error:
"Error(19,57): Failed to compile bpel generated classes. failure to compile the generated BPEL classes for BPEL process "BPEL_PROCESS_NAME" of composite "default/COMPOSITE_NAME!1.0"
The class path setting is incorrect. Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version."
Referred the scac.log:
SAXParseException in file +project_path+\composite.xml
org.xml.sax.SAXParseException: <Line 29, Column 32>: XML-24535: (Error) Attribute 'http://www.w3.org/XML/1998/namespace:id' not expected.
     at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:422)
     at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:335)
     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:318)
     at oracle.soa.scac.ValidationFaultUtil.validateStreamWithSchema(ValidationFaultUtil.java:146)
     at oracle.soa.scac.ValidationFaultUtil.validateCompositeWithSchema(ValidationFaultUtil.java:120)
     at oracle.soa.scac.ValidateComposite.validateWithSchema(ValidateComposite.java:1480)
     at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:519)
     at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:223)
May 19, 2010 6:46:29 PM com.collaxa.cube.CubeLogger info
INFO: LibClasspath=E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\commonj.sdo_2.1.0.jar;E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-common.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-exts.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-thirdparty.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-validator.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-client.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-tools.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.ext_11.1.1\./classes
May 19, 2010 6:46:37 PM com.collaxa.cube.CubeLogger info
INFO: validating "RHMEDIInboundProcess.bpel" ...
May 19, 2010 6:46:37 PM com.collaxa.cube.CubeLogger warn
WARNING: CubeProcessor.compileGeneratedClasses() classpath is: E:\Softwares\OracleFMW\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;E:\Softwares\OracleFMW\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;E:\Softwares\OracleFMW\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\JDeveloper\mywork\InboundEDI_RnD\parseInboundEDIXML\classes\com\onerheem\integration\EDIInboundProcess\parseInboundEDIXML.jar;;C:\JDeveloper\mywork\InboundEDI_RnD\RHMEDIInboundProcess\SCA-INF\classes;C:\JDeveloper\mywork\InboundEDI_RnD\RHMEDIInboundProcess\SCA-INF\classes;C:\JDeveloper\mywork\InboundEDI_RnD\RHMEDIInboundProcess\SCA-INF\gen-classes;E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\commonj.sdo_2.1.0.jar;E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;E:\Softwares\OracleFMW\jdeveloper\..\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-common.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-exts.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-thirdparty.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel-validator.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-client.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-ext.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\oracle.soa.fabric.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-tools.jar;E:\Softwares\OracleFMW\jdeveloper\soa\modules\oracle.soa.ext_11.1.1\./classes
Any suggestions to rectify the same?

Hi,
I wud suggest you to make a jar of ur java class and include it in the project libraries of BPEL and make use of java embedded activity this way it works.
have a luk at below link:
http://niallcblogs.blogspot.com/search/label/embedded%20Java

Similar Messages

  • Error Invoking Java class from Stored proc

    We are getting this error while calling a stored procedure that invokes a
    static function of a java class from inside Oracle 8.1.7.
    ORA-29516: Aurora assertion failure: Java thread deadlock detected
    ORA-06512: at "APPS.SERVICECONSUMERINVOKE", line 0
    ORA-06512: at line 40
    In a Toad SQL Window, when I execute the stored procedure that invokes the
    java function, it executes successfully on the first attempt. When I try to
    execute it again on the same SQL Window, it gives the above error. The java
    class is part of a package and indirectly makes a JMS request-reply call
    via other helper classes.
    The same package works fine from other web containers and
    unlike the Oracle JVM Aurora, the JVMs don't detect a deadlock.
    Why does the Aurora throw an error?

    Did you try issusing a commit and then trying again in Toad SQL Window?
    The advice is to contact support:
    ORA-29516: Aurora assertion failure: string
    Cause: An internal error occurred in the Aurora module.
    Action: Contact Oracle Worldwide Support.

  • Calling Custom XSLT java class from BPEL in SOA Suite 11g

    Hi All,
    Morning...need some help with this issue...we are currently on SOA Suite 11g (11.1.1.4) version.
    Earlier while we were on SOA Suite version 10g (10.1.3.3) we were calling the custom java classes from the xsl mapping for complex transformation and for this we were placing the .class file as .jar file at the location mentioned here $OC4J_HOME/j2ee/home/applib directory and then mentioning the namespace as http://www.oracle.com/XSL/Transform/java/{$classname$} in the XSLT mapping file.
    Now in SOA Suite 11g if we need to retain similar functionality for external custom java calls could someone please help us where do we need to put the .jar file now ..
    exactly at which directory location/path and on which instance/server (application server instance or middle tier instance ) we need to put this .jar file
    Currently we are stuck and need some help with this.
    With thanks & Regards

    Hi Eric & Anuj,
    Thanks for replying , sorry for checking on this now...
    here at this path /opt101/app/oracle/SOAD/SOA11gR1/fmw/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1
    we got the ora.soa.ext.jar file and extracted it to get the MANIFEST.mf file ..have mentioned below.
    Now if we need to link our custom .jar file named customfunctions.jar so we need to mention it as below is this correct :
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 17.0-b17 (Sun Microsystems Inc.)
    Implementation-Vendor: Oracle
    Implementation-Title: Oracle SOA EXT
    Implementation-Version: 11.1.1
    Product-Name: Oracle SOA EXT
    Product-Version: 11.1.1.4.0
    Specification-Version: 11.1.1
    Extension-Name: oracle.soa.ext
    Class-Path: classes/
    Class-Path:customfunctions.jar classes/ -- is this the way to mention (means we need to add this additional line or we need to add to the existing line at Class-Path: classes/)
    2.
    Eric the Alternative method mentioned in your update :
    Open a command prompt and change the current directory to the oracle.soa.ext_11.1.1 directory ,
    then execute the build.xml file in the oracle.soa.ext_11.1.1 folder using Ant
    Now could someone please guide us regards this ANT means how does it work and its relation to the build.xml file and how do we check whether we have ANT utility available or not..
    not much conversant with this ANT hence asking here..would lookout for your reply
    thank you

  • Java.lang.NoClassDefFoundError while calling a java class from BPEL

    Hi,
    I'm calling a java class to convert JSON to XML using BPEL. I have imported all the necessary jar files in the project and compiling done successfully.
    But at runtime , i get the java.lang.NoClassDefFoundError: net/sf/json/JSON error.
    For this i placed all the necessary jars under FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ path and restarted the server.
    But still i'm getting the same error at runtime.
    Did i missed any step? Let me know the procedure to solve this.
    Do i have to run ant or edit Manifest file after placing the jar?
    in one site i find we have to place the jars under <DOMAIN HOME>/lib directory. Is this correct?
    We are using SOA suite 11.1.1.6.
    Thanks,
    Terry

    Hi Karan,
    I have done placing the jars at FUSION_HOME/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/ and ran ant  -f build.xml .The build was successful without any error.
    I have even placed the jars in <DOMAIN HOME>/lib (/us2001/fmw/11.1.1.6/user_projects/domains/ohsdomain/lib) and did a server restart.
    After these activities, when i execute the composite, i still get the error in em console,
    Message
    got RuntimeException
    Supplemental Detail
    oracle.fabric.common.FabricException: Could not create object of class 'packageName.className'; nested exception is:
    java.lang.NoClassDefFoundError: net/sf/json/JSON
    at oracle.integration.platform.blocks.wsif.WsifReference.request(WsifReference.java:698)
    at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:139)
    at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:182)
    Any help on this.
    Thanks,
    Terry

  • Retrieving suitcase jar back from BPEL PM using 'java client api' ?

    Hi All,
    I have ANT based TeamFoundationServer auto builds working for BPEL workflow. I also have custom ANT tasks that call oracle bpel java API to be able to clearWSDL cache in various non-production environments.
    I would now like to attempt retrieving suitcase jar that was deployed previously. Before describing any further, I guess, my first question would be whether this is a possible thing to do.
    While browsing the JAVA API , I came across a method in class --> IBPELDomainHandle ( getSuitcase ) that seem to be returning back byte[] if the suitcaseId was provided to it.
    If below approach is in right direction, what else could I be missing ? Once , below class begins to retrieve the suitcase jar, the goal is to package it in an already existing jar and make it part of regular auto builds ( using ANT 1.6.5's custom task) hosted on windows 2003 server.
    The line in bold below, when uncommented, gives error that is posted after the java code.
    ********START : LocallyConnect2BPELPM.java ************************************************
    package com.collaxa.cube.ant.taskdefs.deploy;
    import com.oracle.bpel.client.BPELProcessMetaData;
    import com.oracle.bpel.client.IBPELDomainHandle;
    import com.oracle.bpel.client.IBPELProcessHandle;
    import com.oracle.bpel.client.Locator;
    import java.util.Properties;
    import java.io.*;
    import org.apache.tools.ant.BuildException;
    public class LocallyConnect2BPELPM {
    public LocallyConnect2BPELPM() {
    public static void main(String[] args) {
    LocallyConnect2BPELPM locallyConnect2BPELPM = new LocallyConnect2BPELPM();
    args[0]="SOME_BPEL_DOMAIN";
    String BPELdomain;
    BPELdomain = args[0];
    try {
    Properties props = new Properties();
    String hostName = "hostAtMyWork";
    String port = "10000";
    String user = "SomeServiceAccount";
    String pwd = "SomePassword";
    String domain = BPELdomain ; //getProject().getProperty("domain");
    System.err.println("host name - " + hostName + " port - " + port + " passwd - " + pwd);
    props.put("java.naming.factory.initial", "weblogic.jndi.WLInitialContextFactory");
    props.put("java.naming.provider.url", "t3://" + hostName + ":" +port);
    props.put("java.naming.security.principal", user);
    props.put("java.naming.security.credentials", pwd);
    System.out.println("test connection to host = " + hostName + " port " + port);
    Locator locator = new Locator(domain,"bpel",props);
    IBPELDomainHandle d = locator.lookupDomain();
    //get Handle to list of processes deployed in the domain
    IBPELProcessHandle[] processes = locator.listProcesses();
    for(int j = 0 ; j < processes.length ; j++) {
    IBPELProcessHandle process = processes[j];
    String processName = process.getProcessId().getProcessId() ;
    if ( process.isDefaultRevision())
    System.out.println(" processName = " + processName + "_" + process.getProcessId().getRevisionTag() + " in domain " + domain);
    /* I am intending to use class BPELProcessMetaData's java.lang.String getSuitcaseId() method to retrieve suitcaseId
    http://www.oracle.com/technology/products/ias/bpel/htdocs/apidocs/101340MLR4/com/oracle/bpel/client/BPELProcessMetaData.html
    attempting to use Interface IBPELDomainHandle's method --> byte[] getSuitcase(java.lang.String suitcaseId)
    since it needs suitcaseId, I am trying to get it from class BPELProcessMetaData's method --> java.lang.String getSuitcaseId() to retrieve suitcaseId .
    however, i always get suitcaseId as null for all processes resulting in error posted.
    // to get suitcaseId, BPELProcessMetaData has getSuitcaseId. pass this to d.getSuitcase
    String strFilePath = "D://bpel_"+processName +"_" + process.getProcessId().getRevisionTag() + ".jar";
    FileOutputStream fos = new FileOutputStream(strFilePath);
              // upon uncommenting the line below , I get error that is posted after the java code.
    // byte[] jarfile = d.getSuitcase(process.getMetaData().getSuitcaseId() );
    BPELProcessMetaData bpelMeta = process.getMetaData();
    String suitcaseId = bpelMeta.getSuitcaseId() ;
    System.out.println( processName + " suitcaseId = " + suitcaseId );
    // fos.write(d.getSuitcase(process.getMetaData().getSuitcaseId() ));
    System.out.println(strFilePath);
    fos.close();
    // uncomment below
    // d.getSuitcase(process.getMetaData().getSuitcaseId());
    }catch(Exception ex) {
    ex.printStackTrace();
    throw new BuildException(ex);
    String BPELdomain;
    public void setBPELdomain(String BPELdom) {
    BPELdomain = BPELdom;
    *************END : LocallyConnect2BPELPM.java **********************************************
    java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at weblogic.ejb.container.internal.BaseEJBContext.setRollbackOnly(BaseEJBContext.java:361)
         at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.setTransactionRollback(BaseCubeSessionBean.java:180)
         at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.getSuitcase(BPELDomainManagerBean.java:1544)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl.getSuitcase(DomainManagerBean_tho2et_EOImpl.java:615)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:553)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:443)
         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:439)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:61)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:983)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Exception in thread "main" java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at com.collaxa.cube.ant.taskdefs.deploy.LocallyConnect2BPELPM.main(LocallyConnect2BPELPM.java:76)
    Caused by: java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:215)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl_923_WLStub.getSuitcase(Unknown Source)
         at com.oracle.bpel.client.BPELDomainHandle.getSuitcase(BPELDomainHandle.java:234)
         at com.collaxa.cube.ant.taskdefs.deploy.LocallyConnect2BPELPM.main(LocallyConnect2BPELPM.java:60)
    Caused by: java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.setTransactionRollback(BaseCubeSessionBean.java:184)
         at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.getSuitcase(BPELDomainManagerBean.java:1544)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl.getSuitcase(DomainManagerBean_tho2et_EOImpl.java:615)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:553)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:443)
         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:439)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:61)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:983)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at weblogic.ejb.container.internal.BaseEJBContext.setRollbackOnly(BaseEJBContext.java:361)
         at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.setTransactionRollback(BaseCubeSessionBean.java:180)
         ... 13 more
    --- Nested Exception ---
    java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:215)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl_923_WLStub.getSuitcase(Unknown Source)
         at com.oracle.bpel.client.BPELDomainHandle.getSuitcase(BPELDomainHandle.java:234)
         at com.collaxa.cube.ant.taskdefs.deploy.LocallyConnect2BPELPM.main(LocallyConnect2BPELPM.java:60)
    Caused by: java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.setTransactionRollback(BaseCubeSessionBean.java:184)
         at com.collaxa.cube.ejb.impl.BPELDomainManagerBean.getSuitcase(BPELDomainManagerBean.java:1544)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl.getSuitcase(DomainManagerBean_tho2et_EOImpl.java:615)
         at com.collaxa.cube.ejb.impl.DomainManagerBean_tho2et_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:553)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:443)
         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:439)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:61)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:983)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: java.lang.IllegalStateException: [EJB:010158]Illegal attempt to call EJBContext.setRollbackOnly() from an EJB that was not participating in a transaction.
         at weblogic.ejb.container.internal.BaseEJBContext.setRollbackOnly(BaseEJBContext.java:361)
         at com.collaxa.cube.ejb.impl.BaseCubeSessionBean.setTransactionRollback(BaseCubeSessionBean.java:180)
         ... 13 more
    Process exited with exit code 1.
    Thanks in advance for your time !!
    Sameer
    Server side:
    Oracle BPEL v10.1.3.4.0
    MLR 8 patched.
    Windows 2003
    underlying server : weblogic 9.2
    client side: (while running the above java code)
    windows vista
    ANT: version 1.6.5
    Java: Jrockit 1.5.2

    Hi
    I have been trying what you want to achieve. I was getting some other error.
    Then I tried to print the suitcase Id as returned by process.getMetaData().getSuitcaseId() and this is returning null.
    Is that the case with you too?

  • Compling java class from another currently running java class.!

    Hi,
    Im using Netbeans 6.1 for my project.im creating FORMS which create code for a search page i.e. jsp file and java file at run time.i also compile the search page java code at run time.
    The ONLY problem that i face while compiling is that, it does not recognizes the getter and setter for request bean, session bean and and application bean.
    When i do not create these getter and setter at run time,the compilation is just perfect at run time and produces the reqiured output that i want.
    BUT for further enhancement of the same code i require the request and session beans.
    Can anyone tell me the solution to the problem.!
    Thankx in advance

    Wrapper your class in the following pair <? ?>
    If you look at the LKM File to Oracle External table it defines java in a class that is then subsequently utilized. You can do this too.
    Cheers
    David

  • How do I call a simple java class from a bpel process?

    Hi.
    In JDeveloper 10.1.4.3.0 I've created a simple java class that does an ftp get operation followed by an unzip. The class uses some 3rd part libraries (jars).
    I want to use a simple bpel process to schedule a daily execution of this java class, and deploy it all to our SOA-server, - and was looking into using the <bpelx:exec> function.
    The java class and the bpel process is all stored in the same JDeveloper project.
    How do I put this together so that both my java class and the necessary jars are available to the bpel process?
    I've looked into the JavaExecSample.bpel, and it's says something about "...the class com.otn.samples.javaexec.CreditCalculator is locally packaged with this BPEL process".
    How do I do that?
    Can I make it and test it all locally from my workstation (only JDeveloper installed, I guess there's nothing that can execute the bpel code?), or do I have to compile class etc (make war-file?) and deploy to SOA server (BPEL-INF/lib or classes?) before anything can be tested?
    (I guess all this is simple, once you know how, but being a newbie to this I need a shove in the right direction :-)
    Regards,
    -Haakon-

    To create a java class and dependent jars inside the BPEL process project you need to do the following:
    1. Right click on your BPEL process project and select New and then Java Class from the Items.
    2. Make the BPEL process project, JDeveloper would compile the java classes and add them into the BPEL suite case jar, see the output folder and check the BPEL suite case jar file for java classes and dependent jars.
    You can test your Java classes from JDeveloper IDE, no need to deploy the classes on SOA server. When you make the BPEL project it compiles .bpel files and Java classes. You can test your classes once .bpel file and java classes compiled successfully.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • Is it possible to invoke a Java class from Data Services 4.0?

    Is it possible to invoke a Java class from Data Services? I have a query transform with a varchar column which I want to run an external java class against to encrypt the string value. In the Management Console, I created an adapter of type TestAdapter and referenced my jar file in the Classpath section, but when I create a Datastore of type Adapter I can't import any functions related to my java class? It seems like I need to create a new Adapter type similar to the TestAdapter with the 'Adapter Class' set to my java class? I can't figure out how to do this - which is the correct approach and is there some documentation available? thanks!

    First u nees to imoprt the class which u are doing right
    then u need to call the function of the class , and then you can put the value in a string .
    DbCon.function()
    String data = DbCon.db;
    where db is a string in DbCon
    Cheers
    Varun Rathore

  • I want to call External Java class from the PL/SQL

    Hi,
    I am using Oracle Apps R11i (11.5.7), I wanted to call external Java class from the PL/SQL. This external Java class is residing in another application server.
    How do I do this.
    I know one way. Develop C routine in Oracle Apps to call external java class and call this C routine from the PL/SQL.
    Is there any simple method available? or any other method?
    Thanks in advance.
    -Venkat

    First of all, this is a Java application you're talking about, right (i.e. it has a main() function)? It's not just a class that you're trying to instantiate is it? If it's an application, you obviously have to start a new virtual machine to run it (rather than using the virtual machine built into the database like stored java). I'm a little leary of your mention of an "application server" as this would more commonly mean that a virtual machine is already over there running with access to this class. In which case, you'd typically interface with SOAP or some other RPC API.
    All that aside, as long as you have physical disc access (through NFS or whatever) to the class file, you could use a java wrapper class with a system call to do this. In fact, there is a thread in just the last day or so on this very forum that has the code to do just that (see " Invoking OS Commands from PL/SQL"). However, it's worth noting that the virtual machine will be running on the database server in this case and not the application server.

  • How to call Java class from Forms 6i?

    Hi friends,
    I need to call a Java class from my Forms 6i application.
    (It runs under WIndows XP. It's a client/server application and I have only the client and the Form builder installed on my PC)
    I don't know almost anything about Java's world so your help would be very useful for me.
    Could you tell me exactly what i have to do?
    I've read in metalink several Notes, but they supposed that the Java architecture is already installed in the computer.... I only have the default installation of Developer 6i... so I would need to know:
    - How to install/configure the neccesary to execute Java classes without problem
    - How to invoke the .class from Forms 6i.
    Thanks a lot
    Jose.

    And also this one:
    Problem Description
    Installed Forms 6i Rel 2 on a MS Windows machine. When trying to Import the Java
    Classes getting the errors
    PDE-UJI0001 Failed to create the JVM
    Solution Description
    You need to to install JDK 1.2.2 to run the Java Importer. And set the PATH's
    and classpath's correctly.
    Explanation
    1. Download and install the JDK 1.2.2.
    Possibly available at: http://java.sun.com/products/archive/
    2. Assuming the JDK 1.2.2 is installed in c:\jdk1.2.2 directory and the JRE in
    C:\PROGRA~1\JAVASOFT\JRE\1.2 directory; ORACLE_HOME=C:\Dev6iR2.
    Set the PATH to
    set PATH=c:\jdk1.2.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin\classic;%PATH%
    ( If you are using ias9i then the JDK 1.2.2 comes with the ias installtion ,
    in this case please set the PATH to
    D:\ias9i\Apache\jdk\bin;D:\ias9i\Apache\jdk\jre\bin;D:\ias9i\Apache\jdk\jre\bin\classic;%PATH% )
    3. Set the CLASSPATH to set CLASSPATH=%CLASSPATH%;C:\Dev6iR2\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
    (If you do not set the CLASSPATH correctly you will get the error
    PDE-UJI002 Unable to find the required java importer classes)
    4. Now run the Forms Builder by using the command.
    C:\Dev6iR2\bin\ifbld60.exe
    Now the Java Importer Should Run fine.
    Francois

  • Calling java class from SLSB

    I am trying to call a java class from SLSB . There are external jars which are imported in my java class . When i try to instatiate the java class in SLSB. It ia not able to access the external jars. It gives the following exception :
    0000002e ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "applyRules" on bean "BeanId(MDB_SLSBEAR#MDB_SLSB.jar#msgProcess, null)". Exception data: java.lang.NoClassDefFoundError: org.springframework.context.ApplicationContext
    My code is as follows :
    SLSB:
    package com.vsnl.ejbs;
    import com.vsnl.pricing.bizObjects.CustomizedRateRequest;
    import com.vsnl.pricing.bizObjects.RateRequest;
    import com.vsnl.pricing.dao.ARR.AutoprocsMain;
    import org.springframework.context.ApplicationContext;
    * Bean implementation class for Enterprise Bean: msgProcess
    public class msgProcessBean implements javax.ejb.SessionBean {
    static final long serialVersionUID = 3206093459760846163L;
    private javax.ejb.SessionContext mySessionCtx;
    * getSessionContext
    public javax.ejb.SessionContext getSessionContext() {
    return mySessionCtx;
    * setSessionContext
    public void setSessionContext(javax.ejb.SessionContext ctx) {
    mySessionCtx = ctx;
    * ejbCreate
    public void ejbCreate() throws javax.ejb.CreateException {
    * ejbActivate
    public void ejbActivate() {
    * ejbPassivate
    public void ejbPassivate() {
    * ejbRemove
    public void ejbRemove() {
    public void applyRules(CustomizedRateRequest customizedRateRequest){
    System.out.println("RR ID in SLSB***"+customizedRateRequest.getProductCustomerId());
    System.out.println("RR ID in SLSB$$$"+customizedRateRequest.getIsDestFlag());
    try{
    System.out.println(" before the callng of commented function ");
    AutoprocsMain autoprocsMain = new AutoprocsMain();
    System.out.println(" after making instance ");
    //autoprocsMain.applyRules(customizedRateRequest);
    catch(Exception e){
    e.printStackTrace();
    My Java Class:
    package com.vsnl.pricing.dao.ARR;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import java.util.ArrayList;
    import java.util.List;
    import com.vsnl.pricing.dao.ARR.Base;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.apache.log4j.Logger;
    import org.drools.FactHandle;
    import org.drools.RuleBase;
    import org.drools.RuleBaseFactory;
    import org.drools.WorkingMemory;
    import org.drools.compiler.PackageBuilder;
    import org.drools.rule.Package;
    import org.springframework.context.ApplicationContext;
    import com.vsnl.pricing.bizObjects.Customer;
    import com.vsnl.pricing.bizObjects.RateRequest;
    import com.vsnl.pricing.interfaces.ARR.IARRDAO;
    import com.vsnl.util.VSNLLogger;
    import com.vsnl.pricing.bizObjects.InnerObject;
    import com.vsnl.pricing.bizObjects.CustomizedRateRequest;
    public class AutoprocsMain extends Base{
    private static Log log=LogFactory.getLog(AutoprocsMain.class);
    private static Logger logger = Logger.getLogger(Invoker.class);
    ApplicationContext ctx;
    //ApplicationContext ctx;//=configure();
    IARRDAO autoprocsDAO;//=(IAutoprocsDAO)ctx.getBean("autoProcDAOTarget");
    public AutoprocsMain() {
    System.out.println(" inside the Autoproc constructor");
    //VSNLLogger.debug(logger, "before creatiom of CTX");
    //System.out.println(" before creation of CTX ");
    try{
    //System.out.println(" inside the Autoproc constructor");
    ApplicationContext ctx=configure();
    autoprocsDAO=(IARRDAO)ctx.getBean("arrTarget");
    catch(Exception e)
    //VSNLLogger.error(logger, e.getMessage());
    //VSNLLogger.debug(logger, "after creation of CTX");
    //System.out.println(" after creation of CTX ");
    public void applyRules(CustomizedRateRequest customizedRateRequest)throws Exception{
    RateRequest rateRequest=new RateRequest();
    List rateRequestObjs= new ArrayList();
    List<CustomizedRateRequest> CustomizedRateRequestObjs=new ArrayList<CustomizedRateRequest>();
    try{
    //rateRequest= autoprocsDAO.getRecord();
    rateRequestObjs=autoprocsDAO.getAllRateRequests();
    //VSNLLogger.debug(logger, " AFTER THE CALL OF getAllRateRequests() function ");
    CustomizedRateRequestObjs=autoprocsDAO.getCustomizedObjects(rateRequestObjs);
    catch(Exception e)
    //VSNLLogger.error(logger, e.getMessage());
    RuleBase ruleBase=readRule();
    WorkingMemory workingMemory = ruleBase.newStatefulSession();
    FactHandle handle =workingMemory.insert(customizedRateRequest);
    //customizedRateRequest.setContinueRule("1");
    workingMemory.fireAllRules();
    if(CustomizedRateRequestObjs.size()>0)
    FactHandle handle =workingMemory.insert(CustomizedRateRequestObjs.get(0));
    for(int i=0;i<CustomizedRateRequestObjs.size();i++)
    CustomizedRateRequest customizedRateRequest=CustomizedRateRequestObjs.get(i);
    customizedRateRequest.setContinueRule("1");
    workingMemory.modifyInsert(handle,customizedRateRequest );
    workingMemory.fireAllRules();
    System.out.println(" after the firing of all rules ");
    public static void main (String args[])
    AutoprocsMain procsMain = new AutoprocsMain();
    try{
    procsMain.applyRules();
    catch(Exception e)
    e.printStackTrace();
    private static RuleBase readRule() throws Exception {
    System.out.println(" ****** inside readrule &&&& ");
    //read in the source
    Reader source = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/Sample.drl" ) );
    // Reader source1 = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/com/vsnl/resources/Sample2.drl" ) );
    //Reader source = new InputStreamReader( AutoprocsMain.class.getResourceAsStream( "/com/vsnl/resources/CustomerDiscount.drl" ) );
    //optionally read in the DSL (if you are using it).
    //Reader dsl = new InputStreamReader( DroolsTest.class.getResourceAsStream( "/mylang.dsl" ) );
    //Use package builder to build up a rule package.
    //An alternative lower level class called "DrlParser" can also be used...
    System.out.println(" after package builder ");
    PackageBuilder builder = new PackageBuilder();
    System.out.println(" after package builder ");
    //this wil parse and compile in one step
    //NOTE: There are 2 methods here, the one argument one is for normal DRL.
    builder.addPackageFromDrl( source );
    System.out.println(" after add package source");
    //builder.addPackageFromDrl(source1);
    System.out.println(" after add package source1");
    //Use the following instead of above if you are using a DSL:
    //builder.addPackageFromDrl( source, dsl );
    //get the compiled package (which is serializable)
    Package pkg = builder.getPackage();
    System.out.println(" after get package ");
    //add the package to a rulebase (deploy the rule package).
    RuleBase ruleBase = RuleBaseFactory.newRuleBase();
    ruleBase.addPackage( pkg );
    System.out.println(" end of read rule function");
    return ruleBase;
    public IARRDAO retBean()
    return null;
    }

    Hi i am new to EJB .
    please explain me the problem ..and kindly tell me to how to add this in classpath. I am using webSphere application server.
    I added this in the classpath in the startup script.
    I also added all the required jars in the EAR libraries ( I am using the RAD IDE).
    Please help.

  • Calling a Java Class from PL/SQL

    Hai,
    I need a technique of calling a class file and invoke its
    methods written in Java by PL/SQL for my intranet development.
    PLease let me know if you have really experienced and won.
    Thanks
    JOhnson

    First, to call a Java class from PL/SQL the class needs to be
    deployed to the database. you can check the 8i documentation for
    the instructions for loading Java into the database(LoadJava).
    The document contains information on how to load the Java and
    call it from PL/SQL. The following links should help.
    Loading Java:
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    java.817/a83728/03write6.htm
    Invoking a Java Method in the database:
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    java.817/a83728/04jserv2.htm
    Gary (JDev Team)

  • Calling my Java class from JSP page

    Hello, I am trying to call my Java class from my JSP page passing parameters to it and getting back a collection of result sets. Can someone tell me what I might be doing wrong:
    JSP code to call Java class:
    <%
    String strEssUser = "test";
    String strProcessingMonth = "JUL";
    String strProcessingYear = "2002";
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    %>
    I get this error when I try to run this JSP page using tomcat:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\em\jsp\Test_0005fSummarySBU_0005fscreen$jsp.java:77: Class org.apache.jsp.ListReturn not found.
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    I'm not sure if this problem is the way I am calling the Java class, or if I have a problem in the Java code itself. Can anyone help?

    Ok, I get a very strange error now:
    org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    What is this??? Anyone?

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • Can we call Java class from LiveCycle Process?

    hi..
    I have a general query, is it possible to call customeized java class from Workbench Process?
    I found dat we can invoke a web service... is there some operation like that for calling a java class...
    Thanks and Regards,
    Ambika

    Yes.
    You can use the Script service and put your Java code in there
    Or build your own component, which is really a Java pojo, and deploy it to LiveCycle. See http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000934.html.
    Jasmin

Maybe you are looking for

  • Error while generating PDF

    Hello Guru's, I have done the ADS configuration setup and checked all configuration settings.It seems everything is working fine but when i select the option  "Print Verison" ( I have executed a query using the query  designer) i am getting above err

  • TIME MACHINE won't back up as not enough space but there is? HELP!

    My time machine was backing up fine and with everything being backed up was filling to about 360gb I backed it up last 5 days ago before it went in for a repair at the apple store (spotlight was not working properly) now I have the machine back and h

  • F4 functionality with code

    Hai, I have a requirement  to provide F4help without assigning search help for a z-transaction. can anyone guide me. Useful answers will be awarded. Thanks, Uga

  • Reader Slow Loading?

    Hi, Since getting Safari 5.0.1 with Reader, it seems Safari is much slower loading pages now. I'm not certain that it is reader slowing page loading but going to the same sites in Firefox and other browsers the pages load much faster. I'll open a pag

  • Friends macbook needs new hd but disks are in storage in nova scotia...can

    My friends macbook needs a new hd but disks are in storage in nova scotia...can I use my disks...I'm not sure whether they are from the same build...My macbook is build 9G55.