4 Replies Latest reply on Mar 2, 2010 9:40 AM by 609890

    Problems Compiling Java embedded code in BPEL

    609890
      Hi everyone,

      I am new to oracle soa 11g, but experience in soa 10g. In 10g I never had problems using java embedded in BPEL. Using 11g I experience problems and tried several thinks but my java embedded code does't want to compile. See below the error in cursive. Please also see the java code I have embedded in my bpel process at the end of this thread in bold. This code works in oracle 10g, but in 11g it fails. It seems it can't find the class com.collaxa.common.util that I want to use. I tried to include the follow libraries in my composite: Orabpel-common.jar, Orabpel.jar, BPEL1-1xbeans.jar, Oracle.soa.bpel.jar. Including these jars doesn't fix the problem I am experience. I am a bit stuck and would like to have some direction of how to fix this problem.

      Thanks for your time.

      Buildfile: C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml

      scac:
      +[scac] Validating composite : 'D:\Project\POC\EasyPickUp\composite.xml'+
      +[scac] D:\Project\POC\EasyPickUp\SCA-INF\bpel\PickupFile\src\orabpel\pickupfile\ExecLetBxExe2.java:3: cannot find symbol+
      +[scac] symbol : class Base64Encoder+
      +[scac] location: package com.collaxa.common.util+
      +[scac] D:\Project\POC\EasyPickUp\SCA-INF\bpel\PickupFile\src\orabpel\pickupfile\ExecLetBxExe2.java:54: cannot find symbol+
      +[scac] symbol : variable Base64Encoder+
      +[scac] location: class orabpel.pickupfile.ExecLetBxExe2+
      +[scac] Note: D:\Project\POC\EasyPickUp\SCA-INF\bpel\PickupFile\src\orabpel\pickupfile\BPEL_BIN.java uses unchecked or unsafe operations.+
      +[scac] Note: Recompile with -Xlint:unchecked for details.+
      +[scac] FATAL_ERROR: location {ns:composite/ns:component[@name='PickupFile']}(19,32): Failed to compile bpel generated classes.+
      +[scac] failure to compile the generated BPEL classes for BPEL process "PickupFile" of composite "default/EasyPickUp!1.0"+
      +[scac] The class path setting is incorrect.+
      +[scac] 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.+

      +[scac]+


      BUILD FAILED
      C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:264: Java returned: 1 Check log file : D:\Project\POC\EasyPickUp\SCA-INF\classes\scac.log for errors

      Total time: 5 seconds



      *<bpelx:exec import="com.collaxa.common.util.Base64Encoder"/>*
      *<bpelx:exec name="Java_Embedding_1" version="1.5" language="java">*
      *<![CDATA[/*Write your java code below e.g.*
                                   
      *     System.out.println("Hello, World");*
                                  
      **/*
                                  
                                       
      *try {*
                          
          *String message = (String)getVariableData("ExampleMessage");*
                 
         *// StringBuilder contents = new StringBuilder();*
               
                 
          *String encodedMessage = Base64Encoder.encode(message.getBytes());*
                                      
          *setVariableData("EncodedMessage", encodedMessage);*
                       
        *}*


      *catch (Exception exception) {*

      exception.printStackTrace();

      *}]]>*
      *</bpelx:exec>*