Adding a java class code in BPEL 11g

Hi Friends ,
i m doing one simple example of calling a java class from bpel ,
1. first i created a java class
2. After that in my project i imported the jar file of the same class , and i am using JavaEmbedding
for creating one object of that class and calling one method which return me the string result and finally i am setting the result in bpel variable.
the application is build successfull but when i am deploying it i am getting following error
[02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
[02:31:19 PM] HTTP error code returned [500]
[02:31:19 PM] Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: JavaCallBPELProcess to service engine: implementation.bpel, for composite: JavaCall: ORABPEL-05250
Error deploying BPEL suitcase.
error while attempting to deploy the BPEL component file "/u04/FMW_HOME/user_projects/domains/Training_domain/servers/soa_server1/dc/soa_3e8c5747-aba0-49b7-91d4-56f74bec87b8"; the exception reported is: java.lang.RuntimeException: failed to compile execlets of JavaCallBPELProcess
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).
[02:31:19 PM] Check server log for more details.
[02:31:19 PM] Error deploying archive sca_JavaCall_rev1.0.jar to partition "OrderProcessing" on server soa_server1 [http://10.45.4.206:8006]
[02:31:19 PM] #### Deployment incomplete. ####
[02:31:19 PM] Error deploying archive file:/C:/JDeveloper/mywork/Trimble/JavaCall/deploy/sca_JavaCall_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
please tell me what is the problem.

You have to use the below value there.
+2. After that in my project i imported the jar file of the same class ,+
There are 2 things, if you are not going to reuse the same code, its better to use Java Embedded component.
If you are going to reuse the same methods from the class then it make sense to import as jar file and use it.
Thanks,
Vijay

Similar Messages

  • 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

  • Problem While checkin in NWDI  adding TableSorter.java class in src of DC

    Hi
    I have added TableSorter.java class in Source folder of One Develop Component and implemented the code to sort the table.It is working fine Locally.
        While I am trying to checkin in NWDI it is throwing error messages like
    location: package tests
        private com.sap.tc.webdynpro.tests.utils.TableSorter _tableSorter;
                                              ^
    /usr/sap/GJ0/JC00/j2ee/cluster/server0/temp/CBS/149/.B/21713/t/47794B28F57C19FA453190A8074C0706/gwd/packages/com.sap.tc.webdynpro.tests.utils.TableSorter/TableBasketView.java :1851: cannot resolve symbol
    symbol  : class TableSorter
    location: package tests
        public com.sap.tc.webdynpro.tests.utils.TableSorter getTableSorter() {
                                             ^
    /usr/sap/GJ0/JC00/j2ee/cluster/server0/temp/CBS/149/.B/21713/t/47794B28F57C19FA453190A8074C0706/gwd/packages/com.sap.tc.webdynpro.tests.utils.TableSorter/TableBasketView.java :1859: cannot resolve symbol
    symbol  : class TableSorter
    location: package tests
        public void setTableSorter(com.sap.tc.webdynpro.tests.utils.TableSorter value) {
                                                                 ^
    /usr/sap/GJ0/JC00/j2ee/cluster/server0/temp/CBS/149/.B/21713/t/47794B28F57C19FA453190A8074C0706/gwd/packages/com.sap.tc.webdynpro.tests.utils.TableSorter/TableBasketView.java :1886: cannot resolve symbol
    symbol  : class TableSorter
    location: package tests
              this._tableSorter = (sap.tc.webdynpro.tests.utils.TableSorter)value;
                                                                 ^
    /usr/sap/GJ0/JC00/j2ee/cluster/server0/temp/CBS/149/.B/21713/t/47794B28F57C19FA453190A8074C0706/gwd/packages/sap.tc.webdynpro.tests.utils.TableSorter/TableBasketView.java:262: cannot resolve symbol
    symbol  : class TableSorter
    location: class sap.tc.webdynpro.tests.utils.TableSorter.TableBasketView.java
         wdContext.currentContextElement().setTableSorter((new TableSorter(table, wdThis.wdGetActSortPrice(), null)));
    Please help me.
    Thanks&Regards

    Hi,
    Where exactly did you put your TableSorter.java?
    It should be in src\packages\<your package foleders>\util
    Please also don't forget to add your TableSorter.java in the OpenActivity which you want to check in.
    I suggest there is also another way to do this but I didn't try it:
    Create new Java Project DC
    Put your TableSorter.java there
    Add all necessary DC for build
    Create two public parts (assembly and compilation)
    And use this parts in your WD DC
    Regards
    Pavel

  • WSIF - Can we return java class back to bpel (PLEASE HELP)

    Scenario : We have old project and migrating to Oracle BPEL.
    In this project we have Java Files and inside that java files we have many functions which return java object. Is it possible to return java value object to bpel process.
    Steps which i have followed:
    1. Created a WSDL file using the control file given below.
    2. Changed the name spaces and types generated to XFMFRq and TXNLog as i/p and o/p.
    3. Imported same file into oracle bpel.
    4. Called the function : logbegin.
    EXCEPTION : The types are not compactable is the exception we are getting but we are able to call the function and execute first line but not able to return TXNLOG class as an xml element to bpel.
    For Example :
    1. Java Method and this method returns Java Value Object
    Java Control which has TXNLOG as the value object which will return the value.
    CONTROL FILE
    public TxnLog logBegin(com.hp.rtfs.xfmf.doc.XFMFRqDocument requestXML)throws Exception
    //LogUtil.logDebug(LogConstants.MODULE_BPM,BPM_CONTROL_NAME,"Enter Method logBegin ");
    txnLog=new TxnLog();
    try
    System.out.println("AMMA1121212");
    LogUtil.logDebug(LogConstants.MODULE_BPM,BPM_CONTROL_NAME,"Entering Top user id update in LogBegin");
    txnLog.setTlogChannelLoginId("AMMA1");
    txnLog.setTlogChannelUserId("AMMA2");
    System.out.println("AMMA2");
    txnLog.setTlogChinChannelId("ATM");
    txnLog.setTlogChannelSessionId("SESSION-1111");
    System.out.println("AMMA3");
    txnLog.setTlogCustCifKey((new Long("121212")));
    txnLog.setTlogEmtnTxnCd("TXN-001");
    System.out.println("AMMA4");
    txnLog.setTlogSendIpAddr("10.1.1.1");
    txnLog.setTlogChannelTxnSeqId(new Integer("1212"));
    System.out.println("AMMA5");
    TxnLogPK txnLogPk=new TxnLogPK(new Integer("121212"),
    DateUtil.getDate(requestXML.getXFMFRq().getMsgRqHdr().getUID().getRTFSTransSeqUIDDt()),"1212");
    txnLog.setTxnLogPK(txnLogPk);
    System.out.println("AMMA6");
    catch(Exception e)
    //LogUtil.logError(LogConstants.MODULE_BPM,BPM_CONTROL_NAME,"Exception "+e.getMessage());
    e.printStackTrace();
    return txnLog;
    TXN LOG value object is :
    // Oracle JDeveloper Stub Generated Source
    package com.hp.rtfs.ods.infra.trx;
    public class TxnLog
         implements java.io.Serializable
         // Constructors
         public TxnLog(com.hp.rtfs.ods.infra.trx.TxnLogPK p1, java.lang.Long p2, java.lang.String p3, java.util.Calendar p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8, java.lang.String p9, java.lang.Integer p10, java.util.Calendar p11, java.lang.String p12, com.hp.rtfs.ods.infra.channel.ChannelInfo p13, java.util.Set p14) { }
         public TxnLog() { }
         public TxnLog(com.hp.rtfs.ods.infra.trx.TxnLogPK p1, java.util.Set p2) { }
         // Fields
         private com.hp.rtfs.ods.infra.trx.TxnLogPK TxnLogPK;
         private java.lang.Long tlogCustCifKey;
         private java.lang.String tlogEmtnTxnCd;
         private java.util.Calendar tlogStartDt;
         private java.lang.String tlogStat;
         private java.lang.String tlogSendIpAddr;
         private java.lang.String tlogChannelUserId;
         private java.lang.String tlogChannelLoginId;
         private java.lang.String tlogChannelSessionId;
         private java.lang.Integer tlogChannelTxnSeqId;
         private java.util.Calendar tlogEndDt;
         private java.lang.String tlogChinChannelId;
         private com.hp.rtfs.ods.infra.channel.ChannelInfo channelInfo;
         private java.util.Set txnLogDatas;
         // Methods
         public com.hp.rtfs.ods.infra.trx.TxnLogPK getTxnLogPK() { }
         public void setTxnLogPK(com.hp.rtfs.ods.infra.trx.TxnLogPK p1) { }
         public java.lang.Long getTlogCustCifKey() { }
         public void setTlogCustCifKey(java.lang.Long p1) { }
         public java.lang.String getTlogEmtnTxnCd() { }
         public void setTlogEmtnTxnCd(java.lang.String p1) { }
         public java.util.Calendar getTlogStartDt() { }
         public void setTlogStartDt(java.util.Calendar p1) { }
         public java.lang.String getTlogStat() { }
         public void setTlogStat(java.lang.String p1) { }
         public java.lang.String getTlogSendIpAddr() { }
         public void setTlogSendIpAddr(java.lang.String p1) { }
         public java.lang.String getTlogChannelUserId() { }
         public void setTlogChannelUserId(java.lang.String p1) { }
         public java.lang.String getTlogChannelLoginId() { }
         public void setTlogChannelLoginId(java.lang.String p1) { }
         public java.lang.String getTlogChannelSessionId() { }
         public void setTlogChannelSessionId(java.lang.String p1) { }
         public java.lang.Integer getTlogChannelTxnSeqId() { }
         public void setTlogChannelTxnSeqId(java.lang.Integer p1) { }
         public java.util.Calendar getTlogEndDt() { }
         public void setTlogEndDt(java.util.Calendar p1) { }
         public java.lang.String getTlogChinChannelId() { }
         public void setTlogChinChannelId(java.lang.String p1) { }
         public com.hp.rtfs.ods.infra.channel.ChannelInfo getChannelInfo() { }
         public void setChannelInfo(com.hp.rtfs.ods.infra.channel.ChannelInfo p1) { }
         public java.util.Set getTxnLogDatas() { }
         public void setTxnLogDatas(java.util.Set p1) { }
         public java.lang.String toString() { }
         public boolean equals(java.lang.Object p1) { }
         public int hashCode() { }
    ---------------------------------------------------------------------------

    I have been bragging to my clients the benefits of
    Java Applications, but one thing I couldn't convince
    them is the use of a JVM. They dislike the idea of
    downloading the JRE, and the slowness of programs
    running in an interpreter. I am stumped for not being
    able to satisfy their need for a .EXE program on their
    Win32 systems. And, it would be ridiculous to go back
    again to C++, after learning Java. I'm not going to address the JRE distribution as it's already been mentioned and there are several ways of approaching that problem that you can find easily in the forum so I won't waste space for it here.
    What you need to address more than anything is the supposed slowness of java programs. The question at hand is slow as compared to what? In what context? A benchmark can be twisted to show whatever the author of the report wants it to show. Thus I tend to distrust such statistics in general due to the economical influence of the author or comissioner of the report being in the business of trying to sell something. Exactly what are they calling slow and what causes this perception on their part? I wouldn't sidestep the issue, or try to B.S. about it, but I'd be willing to bet that their fears are unfounded and based on superstition and hearsay.
    >
    Is their a tool or a way to convert .CLASS files into
    .EXE(Win32) files, to make it execute faster and
    independent? I know it would sacrifice portability,
    but I have to give in to demands. As they say it,
    "The customers are always right." Please, anybody out
    there, shed some light for me on this one. Thanx in
    advance.
    BlueKnyght.ph

  • Adding More Java Classes

    Can I add my own Java classes in the Import Java Classes... (Program -> Import Java Classes...) in the Report Builder? In what path I should place my Java classes if it is possible?

    what happens if you do the following on all three different environments:
    SQL> select to_char(exp_date, 'dd-mon-yyyy hh24:mi:ss') from your_table where your_condition ;
    [pre]

  • Java embedding code in BPEL 2.0 giving deployment errors

    Hello,
    I am using Jdeveloper and SOA 6 11.1.1.0.6 version. BPEL 2.0
    When i use simple sysout in the java embedding it is deploying fine but when using XMLElement api in the java embedding it s giving deployment error.
    Please suggest me how to make it work.
    Please see the error message below:
    Error deploying archive sca_FetchAttachments_rev1.1.jar to partition "default" on server soa_server1 [http://XXX.XXX.com:8001]
    [01:04:09 PM] HTTP error code returned [500]
    [01:04:09 PM] Error message from server:
    There was an error deploying the composite on soa_server1: Error occurred during deployment of component: FetchAttachments to service engine: implementation.bpel, for composite: FetchAttachments: ORABPEL-05250

    Hello Rolando Carrasco,
    Thank for responding my question. I figure out the issue. It is because we need to import the java API's what we are using in the java embedding.
    Thank you,
    Raj

  • 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

  • How to invoke a Java class located outside of  BPEL PM server?

    I konw the way of invoking the Java class deployed in BPEL PM server by using WISF binding. But now I have a legacy Java Application located in another Appache Server.I hope the BPEL process can invoke this legacy Java Application. How should I do?
    Anybody can help me?
    Kind regard
    Qu

    You can use axis to create a webservice out of this class, or do the same with oracle jdeveloper - remote class mean remote protocol..
    /clemens

  • Use of bpelx built-in methods like getVariableData in custom java classes

    Hi,
    how can I use bpelx built-in methods like getVariableData ...
    inside custom java classes embedded with BPEL project?
    I have large java code to embed with BPEL process
    and it will be very useful ....
    It is possible to access these methods like static methods of some class?
    import com.xxx.yyy.class;
    class.getVaribleData("inputVariable","payload","/ns1:mailMessage/ns1:content/ns1:multiPart");
    Regards
    Karel

    you can access them from <bpelx:exec> activity and you can pass these returned document to underlying java class.
    Re: getVariableData in Java Exec

  • How to use java classes of DC1 in DC2

    When I was trying to use a java-class from another DC, I stumbled into an error I didn't expect:
    java.lang.NoClassDefFoundError: com/company/application/utils
    This is what I did to get this far:
    1. Created an empty Web Dynpro DC (DC1), to be used as a utilities library.
    2. Added a Java class to the webdynpro project.
    3. Added the class to a public part of type compilation.
    4. Created a second Web Dynpro DC (DC2), which is supposed to consume the class from DC1.
    5. Added a DC-usage relation, so that DC1 is in DC2's used DCs. In this usage-relation built-time and run-time were checked
    5. Used DC1's class in DC2's component controller
    6. Built both DCs and deployed them
    7. Ran the application in DC2.
    When I run the application, the application dumps a stack trace at the moment that and object is created based on the class in DC1.
    Any idea how to get this working?

    Vincenzo, here is the real error message:
    java.lang.IllegalAccessError: tried to access method nl.phoqus.pataut.Guid.getGuidString()Ljava/lang/String; from class nl.phoqus.pataut.PatientAuthorization
    I have inserted a very simple GUID generator that I used in a previous project. Please find the class file below:
    package nl.phoqus.pataut;
    import java.util.Random;
    public class Guid {
         private static Guid guidFactory = new Guid();
         static Random random = new Random();
          * Allow global replacement of the GUID generator.  Applications
          * wishing to install their own GUID generators should sub-class
          * Guid, override the getGuid() method, and use this method to
          *  install their generator.
         public static void
         setGuidImpl(Guid factory) {
         guidFactory = factory;
          * Return a GUID as a string.
         public static String getString() {
         return guidFactory.getGuidString();
          * Return a GUID as a string.  This is completely arbitrary, and
          * returns the hexification of a random value followed by a
          * timestamp.
         protected String getGuidString() {
            long rand = (random.nextLong() & 0x7FFFFFFFFFFFFFFFL) | 0x4000000000000000L;
            return Long.toString(rand, 32) + Long.toString(System.currentTimeMillis()&0xFFFFFFFFFFFFFL, 32);
    I'm calling the class using the following statements from the component controller of DC2:
    Guid x = new Guid();
    String y = x.getGuidString();
    The component controller resides in package package nl.phoqus.pataut.
    Would that be the problem?

  • Compiler ignores changes in a java class

    Hi,
    I made changes to the java class code, compiles correctly and not execute this new java code. The new code is ignored for the jdeveloper. I tried with several version like jdk1.4.2_06, jdk1.4.2_12,jdk1.4.2_13,jdk1.4.2_17. I need to work with 1.4.2.
    Thanks in advance.

    Hi,
    too many missing information make it hard to give any useful answer to this
    - which version of JDeveloper
    - what is the java code you compile
    - in which context do you execute the code ?
    Frank

  • Unable to compile the java class in the SQL PLUS

    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;

    860411 wrote:
    Hi Team,
    I am unable to compile the java class in the SQL PLUS in dev1 and dev2. It is giving the following error.
    But the same class get Compiled in the Toad(Tool) without any error and working fine. Could someone help me
    What to do for this for your reference ,Attaching the java class file.
    “ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 28.
    Was expecting one of:
    I believe the error message is clear and self-explanatory.
    ----------------------Here is the Java class Code.....................
    create or replace and compile java source named "XXVM_ZipFileUtil_Ela"
    as
    import java.math.BigDecimal;
    import java.util.zip.Deflater;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import java.sql.*;
    import java.io.*;
    public class XXVM_ZipFileUtil_Ela
    public static oracle.sql.BLOB getZipFile(
    oracle.sql.CHAR zipFilePathCHAR, oracle.sql.CHAR zipFileNameCHAR,
    int fileBufferSize, int zipFileBufferSize,
    boolean deleteZipFile, java.sql.Array fileNames, java.sql.Array fileContents, java.sql.Array fileContentsLength)
    throws IllegalArgumentException, FileNotFoundException, IOException, java.sql.SQLException
    String zipFilePath = (zipFilePathCHAR == null) ? null : zipFilePathCHAR.stringValue();
    String zipFileName = (zipFileNameCHAR == null) ? null : zipFileNameCHAR.stringValue();
    String zipPathAndFileName = new String(
    new String(zipFilePath == null || zipFilePath == "" ? "/tmp/" : zipFilePath) +
    new String(zipFileName == null || zipFileName == "" ? System.currentTimeMillis() + ".zip" : zipFileName));
    byte[] buffer = new byte[fileBufferSize == 0 ? 100000000 : fileBufferSize];
    try
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    oracle.sql.CLOB[] fileContentsCLOB = (oracle.sql.CLOB[])fileContents.getArray();
    String[] fileNamesString = (String[])fileNames.getArray();
    BigDecimal[] fileContentsLengthNumber = (BigDecimal[])fileContentsLength.getArray();
    ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipPathAndFileName));
    zipOut.setLevel(Deflater.DEFAULT_COMPRESSION);
    for (int i = 0; i < fileNamesString.length; i++) {
    System.out.println(i);
    zipOut.putNextEntry(new ZipEntry(fileNamesString));
    InputStream asciiStream = fileContentsCLOB[i].getAsciiStream(1L);
    int asciiReadCount = asciiStream.read(buffer,0,fileContentsLengthNumber[i].intValue());
    zipOut.write(buffer, 0, fileContentsLengthNumber[i].intValue());
    zipOut.closeEntry();
    zipOut.close();
    byte zipFileContents[] = new byte[zipFileBufferSize == 0 ? 100000000 : zipFileBufferSize];
    FileInputStream zipIn = new FileInputStream(zipPathAndFileName);
    int byteCount = zipIn.read(zipFileContents);
    zipIn.close();
    byte returnFileContents[] = new byte[byteCount];
    System.arraycopy(zipFileContents,0,returnFileContents,0,byteCount);
    String returnFileContentsString = new String(returnFileContents);
    if (deleteZipFile)
    boolean deletedFile = (new File(zipPathAndFileName)).delete();
    oracle.sql.BLOB returnFileContentsBLOB = null;
    returnFileContentsBLOB = BLOB.createTemporary(conn, true, BLOB.DURATION_SESSION);
    returnFileContentsBLOB.open(BLOB.MODE_READWRITE);
    //OutputStream tempBlobWriter = returnFileContentsBLOB.getBinaryOutputStream();
    OutputStream tempBlobWriter = returnFileContentsBLOB.setBinaryStream(1);
    tempBlobWriter.write(returnFileContents);
    tempBlobWriter.flush();
    tempBlobWriter.close();
    returnFileContentsBLOB.close();
    return returnFileContentsBLOB;
    catch (IllegalArgumentException ex) {
    ex.printStackTrace();
    throw ex;
    catch (FileNotFoundException ex) {
    ex.printStackTrace();
    throw ex;
    catch (IOException ex)
    ex.printStackTrace();
    throw ex;
    catch (java.sql.SQLException ex)
    ex.printStackTrace();
    throw ex;
    The last two lines above should be
    /Srini

  • Passing array of Types to java class

    I am trying to pass a user defined type (that is an array) from PL/Sql to a javaclass. Here are the definitions that make-up the parameter to pass from PL/Sql to Java (uri_digest_array):
    CREATE OR REPLACE TYPE uri_digest as object (uri VARCHAR2(256),
    digest_value CLOB);
    CREATE OR REPLACE TYPE uri_digest_array AS VARRAY(10) OF uri_digest;
    In Oracle-land, java classes are published to PL/Sql by way of the following definition. Note that the intent here is to have compatible data-types.
    CREATE OR REPLACE FUNCTION SIGNRETURNINGXML (p_array IN uri_digest_array)
    RETURN LONG
    AS LANGUAGE JAVA
    NAME 'SignReturningXml.main(oracle.sql.Array) return java.lang.String';
    Here is a fragment of the java class code:
    class SignReturningXml {
    public static String main(String [] [] signItems ) // I have no idea what datatype to use here!
    { . . . . The code in here would process the passed array normally from first entry to last.
    Currently I get the following error:
    PLS-00311: the declaration of
    "SignReturningXml.main(oracle.sql.Array) return
    java.lang.String" is incomplete or malformed
    I could use some suggestions on resolving the datatype conflicts. Any ideas? Has anyone tried this kind of thing?
    Thanks,
    Michael

    Michael,
    At the risk of another [non] useful response, I meant that you should try searching the "Ask Tom" Web site, because usually you will find an answer to your question that has already been asked by someone else. Perhaps these will be helpful:
    [url=http://asktom.oracle.com/pls/ask/f?p=4950:8:1320383202207153292::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:8908169959941
    ]Can I Pass a nested table to Java from a pl/sql procedure
    [url=http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:712625135727
    ]passing arrays into pl/sql stored procedures
    Good Luck,
    Avi.

  • 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

  • Invoking bpel process from java in oracle soa/bpm 11g

    Hi,
    We have some java code to invoke bpel process in oracle BPM 10g following the instructions in http://download-east.oracle.com/docs/cd/B14099_19/integrate.1012/b14448/invoke.htm.
    Basically the steps are:
    1) get a Locator (com.oracle.bpel.client.Locator)
    2) get IDeliveryService (com.oracle.bpel.client.delivery.IDeliveryService) reference from locator
    3) call IDeliveryService method request or post with input message and get the response back.
    Recently we want to migrated from oracle bpm 10g to oracle soa/bpm 11g. But I can not find the similar API in 11g. It seems now some adapter/binding need to be added in exposed service lane in soa composite view, for example, ADF-BC, direct binding etc, in order to allow java to invoke a bpel process. Here are two very useful links from Edwin about the detail how this is implemented.
    http://biemond.blogspot.com/2009/11/invoking-soa-suite-11g-service-from.html
    http://biemond.blogspot.com/2009/11/calling-soa-suite-direct-binding.html?showComment=1285198033913#comment-c1055322845511794252
    My question is:
    1) what are the choices and the official/best way to invoke a bpel process in oracle soa/bpm 11g from java?
    2) does user need to add an adapter/binding in exposed service lane in order to let the bpel service be called in java?
    3) what is the real difference between a bpm application and soa application in 11g?
    I will really appreciate any expert's opinion.
    Thanks,
    Bin

    Thanks for your reply and confirmation, really appreciate it.
    Yes, I found the difference of the invoking process API and was able to invoke bpel process using direct and ADF-BC binding by following Edwin's blog. But I have not found any official reference to compare this API difference between 10g and 11g ( I will mark this question as answered if anyone can find an official source from oracle, need to prove it to the team). The API to work with human task workflow seems pretty much the same between 10g and 11g.

Maybe you are looking for

  • Change name of AuthoredContent.xml

    I am using Encore to create some simple interactive flash banners to put on a website, but I am running into a problem due to the fact that each flash file requires the AuthoredContent.xmlfile. If I try to load multiple flash files into a single page

  • A "sleep your display" app for Lion?

    I'm looking for a one click solution to turning off my external monitor from bed. I keep a mouse at my nightstand to control what I'm watching before bed. I'm aware of the option+shift+eject method but preferably I'd like something that doesn't requi

  • How do you get Video INTO an iMac?

    I am looking to record a video feed on a mini or iMac using QuickTime. Looking at the specs for both ... no can do. Is there a way?

  • I cannot fill in my phone number and birthday on web sites

    I cannot fill in my Birthday, Phone number and credit card info on website order forms

  • Adding properties to XML Registry

    I'm using WLS 6.0. I was wondering if it is possible to add more properties into the XML Registry on the console. The two properties currently there are: DocumentBuilderFactory and SaxParserFactory. I'd like to add the two system properties: javax.xm