Java Callout on Eclipse Workshop

Guys,
It seems to be impossible to design a Proxy Service that uses a Java Callout on Oracle Workshop for WebLogic Version: 10.3 (Eclipse).
It deppends of a Jar Resouce File. The problem is to make available this jar to Eclipse Workshop. When using the web console it goes fine, but with Workshop it seems to have this limitation.
Does anyone know a workaround?
I have only one, not tested yet. To export the project deployed and import it back to Eclipse. Does anyone knows a better way?

I experienced a similar problem when opening a OSB Project developed by another user. He was using the windows version of Workshop/Eclipse while I used a unix-version.
Opening projects in workshop with error is quite common, so I did not reflect on the error on two of the proxy services that appeared on this one before the regular steps "build/clean..", close and reopen project, close workshop, reinstall workshop etc. did not work at all. Always the same error: Archive resource [my resource] does not exist.
Investigating the error showed that workshop did not manage to find the class needed for the JavaCallout. Even when I opened the JavaCallout action and tried to tell it where to look workshop could not find it.
After starting workshop from the command line shell a root cause appeared as a java.io.IOException: Permission denied.
To shorten the story a bit, it appeared that the java.io.tmpdir was write protected. In fact it was created by root. After a quick sudo, rm -rf /tmp/alsbTempJars and a workshop restart and a build clean I could proceed with development.
Edited by: Helge Aarstein on Oct 1, 2010 5:49 AM

Similar Messages

  • ServiceBus java callout - how to pack the JAR file with libraries?

    Hello
    I want to use a Java Callout from a Service Bus flow.
    What is the correct way to pack the JAR file with its nessecary libraries?
    I tried different methods to pack my JAR, but yet, as though the Java runs perfectly from the Workshop (Eclipse) , when I am trying to use the exported Jar on the ServiceBus flow, it fails with an ClassNotFoundException.
    I would really appreciate your advice here.
    Thanks
    Koby

    Well.. Looking inside my exported JAR file, I got all of the files there inside, including the jar file containing the library.
    What I'm trying to do is run a simple java program that connect through SSH and therefore use an SSH library.
    On the workshop I got it as an imported library JAR. And it works perfectly there.
    Any idea?
    Here's the complete error I get:
    <BEA-382515> <Callout to java method "public static java.lang.String sshpackage.SshProg.remoteScriptInvoke(java.lang.String,java.lang.String,java.lang.String,java.lang.String)" resulted in exception: null
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at stages.transform.runtime.JavaCalloutRuntimeStep$1.run(JavaCalloutRuntimeStep.java:158)
    Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: ch/ethz/ssh2/Connection
    at sshpackage.SshProg.remoteScriptInvoke(SshProg.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: ch.ethz.ssh2.Connection
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:283)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:256)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at com.bea.wli.sb.resources.archive.HookedJarClassLoader.loadClass(HookedJarClassLoader.java:251)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    Truncated. see log file for complete stacktrace
    Edited by: kobyssh on 04:12 01/02/2010

  • Java -cp org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar

    In Command Prompt this is what I typed.
    cd C:\bea_10_3_1_0\tools\eclipse_pkgs\2.0\eclipse_3.3.2\eclipse\plugins
    next...
    java -cp org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    but why isn't the above jar file able to run?
    I'm following Oracle Guide to upgrade my project == "Upgrading Applications to Oracle Weblogic Integration 10g Release 3 (10.3.1)
    http://download.oracle.com/docs/cd/E14981_01/wli/docs1031/upgrade/prepare.html#wp1250696
    Anybody can guide me to use the command prompt.
    Guide skeleton structure
    java -cp <%BEA_HOME%>\tools\eclipse_pkgs\2.0\eclipse_3.3.2\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    -Dwlw.home=%WL_HOME%
    -Dwlw.application=%WORK_FILE%
    -application.com.bea.workshop.upgrade81.upgradeStarter
    -data %WORKSPACE%
    -pluginCustomization %PREFS_FILE%
    My Copy
    java -cp C:\bea_10_3_1_0\tools\eclipse_pkgs\2.0\eclipse_3.3.2\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
    -Dwlw.home=bea_10_3_1_0\wlserver_10.3
    -Dwlw.application=C:\Untitled\Untitled.work
    -application.com.bea.workshop.upgrade81.upgradeStarter
    -data C:\bea_10_3_1_0\user_projects\workspaces\cmd
    -pluginCustomization
    Edited by: skylover87 on Jun 18, 2010 5:13 PM [Included the link to the guide]

    this may or may not help u. But i am just wondering why aint ur weblogic home having drive name in the path which is passed as an argument ?
    -Dwlw.home=*C:\*bea_10_3_1_0\wlserver_10.3
    Edited by: suhas_sm on Jun 21, 2010 12:37 AM [Highlighted what I am trying to say]

  • How to Create a connection pool in OSB java callout

    Dear Team,
    In our project, we need read some data from DB, and do corresponding operation. currently, we need setup the connection first, execute the SQL, and close the connection.
    But the concurrency of call is very high, is there a way to create a connection pool, then we can use the connection pool to get the connection and execute the SQL, then return the connection to the pool.
    if connection pool is not available, is there any way to create the connection outside the java callout, that we can just execute the SQL in java callout.
    The OSB version is 11.1.1.6.0
    Thanks.
    Best Regards,
    Raysen Jia
    Edited by: Raysen Jia on Oct 16, 2012 8:44 AM

    Hi Team,
    Thanks for your help.
    What I need is not only the db connection, may be other kind of things, such as read configuration from file...
    If I write the code in java callout with static java method to create and close the connection, each time when request come in, OSB will create a new connection (or read the file), I think it's not the best practice to do this kind of work.
    I think the weblogic is running in JVM, is there any way we can define variables or new object in the JVM directly?

  • Java Callout in OSB failing with null pointer exception

    Hi,
    We have a requirement where we need to convert XML String to org.apache.xmlbeans.impl.values.XmlAnyTypeImpl type using java-callout, but value is not getting set when we are trying to do the same. Below is the code we are using in the java callout:
    byte [] bArray = xml.getBytes();
    InputStream is = new ByteArrayInputStream(bArray);
    Reader reader = new InputStreamReader(is,"UTF-8");
    InputSource iss = new InputSource(reader);
    iss.setEncoding("utf-8");
    xmlNode1 =
    DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(iss);
    XmlAnySimpleType xmlObj = XmlAnySimpleType.Factory.parse(n);
    xmlAnyTypeImpl.set_newValue(xmlObj);
    Node resNode = xmlAnyTypeImpl.getDomNode();
    Can someonce please help for the same.
    Regards,
    Soumik

    First check whether the java class that is called is able to read the string message that is passed by the proxy service.

  • How to Handle Multiple Thread in JAVA Callout with OSB 11g

    Hi Team,
    With My OSB 11g, I want create a static Thread when Java callout.
    Java code as below.
         private static Thread thread;
    static {
              * lazy load thread and with thread-safe ensure
              if(thread == null){
                   synchronized (HornetQConnectionHelper.class) {
                        thread = new ConnectionRecoveryThread();
                        // Daemon thread, JVM level, Won't be interrupted, Safe!
                        thread.setDaemon(true);
                        thread.start();
    When this class was first called in OSB, the thread start run. while when I redeploy it, the old Thread is still running, if call the class again, it will create a new Thread. The two threads will run at the same time.
    Any body know how do configure it, so that there is only one static Thread in the Weblogic JVM.
    Thanks.
    Best Regards,
    Raysen Jia

    Hi Raysen Jia,
    Create a weblogic startup class... See the references bellow...
    Hope this is helpful...
    http://jagadesh4java.blogspot.com.au/2010/05/working-with-weblogic-startup-shutdown.html
    http://docs.oracle.com/cd/E23943_01/upgrade.1111/e10126/basic_upgrade.htm#FUPAS464
    Cheers,
    Vlad

  • B2B Java Callout Class not found exception

    Hello B2B Gurus,
    I am facing class not found exception, when trying to call a java code from B2B and below the configuration done from B2B side.
    Could you please help me to identify that the configuration done suffice the requirement
    1.Created a call out from
    Adminstration-- Callout-- Create Callout -- XXJavaCallout(Name of the Java Callout)
    Administration-- Callout Details -- Implementation Class -- XXClassFileName
    Administration-- Callout Details -- Library Name -- XXJarFileName.jar
    Administration-- Configuration -- Callout Directory -- xx/yy/zz (UNIX server that is accesible from B2B)
    2.Partners--XX--Delivery Channel -- Select the channel where we need the call out -- Channel Attributes -- Transport Callout -- XXJavaCallout
    3.Agreement--Callout -- XXJavaCallout
    Place the jar file in xx/yy/zz UNIX location.
    Please let me know if any steps I have missed for using the callout functionality.
    Thanks,
    Sunil
    Edited by: Dathu Sunil on Mar 29, 2012 8:17 AM

    Sunil,
    Administration-- Callout Details -- Implementation Class -- XXClassFileNameMake sure that you are giving complete name of the class (without extension .class.). For an example if your class name is Sample and it is in package a.b.c then give class name as a.b.c.Sample
    Administration-- Configuration -- Callout Directory -- xx/yy/zz (UNIX server that is accesible from B2B)This must be valid directory existing on machine where B2B is installed.
    2.Partners--XX--Delivery Channel -- Select the channel where we need the call out -- Channel Attributes -- Transport Callout -- XXJavaCallout
    3.Agreement--Callout -- XXJavaCalloutTransport Callout and Agreement Callouts are used for different purpose. Are you sure that you really need both in your case?
    You may like to refer -
    http://docs.oracle.com/cd/E17904_01/integration.1111/e10229/callouts.htm#CHDEFBDG
    Regards,
    Anuj

  • Including library dependency for Java Callout in OSB Proxy

    Hi,
    I have a simple question for which a simple answer is eluding me:
    I have developed a simple Java Callout for us in a proxy message flow and that Java class has a dependency on the Commons IO library but for the life of me I can see how I can ensure the proxy is deployed with the library in the classpath because when I perform a simple publish and test the service I get the exception:
    <8/06/2009 10:22:27 AM NZST> <Error> <OSB Transform> <BEA-382515> <Callout to java method "public static void com.oracle.mtm.tools.Archiver.archive(byte[],java.lang.String)" resulted in exception: null
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at etc...
    java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
         at etc...
    i.e. the Commons IO (e.g. org/apache/commons/io/FileUtils) is not in the classpath.
    There must be a simple way of declaring this dependency or something and have the library loaded but I can't find it.
    Any help much appreciated!

    Well I managed to answer my own question in the end. It's simply a matter of selecting jar dependencies from other jars which can be done by double clicking ("opening") the jar within the OSB Conf project which opens a jar dependencies dialogue box. As expected it's easy when you know how...

  • How to Debug a Java Project in Eclipse using Tomcat6.0

    Hi
    Can anybody help me with the following questions.
    1.How to create a java project in eclipse(I am using jsp,servlets,jsf,spring,jasper,struts).
    2.How to debug my application in Eclipse Europa by putting break points.
    3.how should i add Tomcat6.0 to my project in order to debug my application so that i can put break points while running the applications and observe the values.
    Thanks
    Bala

    You may find this tutorial useful regarding to JSF, Eclipse and Tomcat: http://balusc.blogspot.com/2008/01/jsf-tutorial-with-eclipse-and-tomcat.html
    To put breakpoints, just doubleclick on the left gray rule of the code, you'll get blue bullets at the left rule, indicating a break point. Run Tomcat in debug modus (rightclick Tomcat � debug). Use the Eclipse debug perspective to step in the code (window � open perspective � debug).

  • How to get File name in Java Callout

    Hi,
    We are receiving EDI files with random file names through SFTP listening channel. How can we get the file name in the java callout.
    ~Ismail M

    You can try to find it out under CalloutMessage.
    CalloutMessage.getParameters().getProperty("filename")
    Thanks,
    Kathar

  • Java Callout with Collections in OSB

    I need return a collection (List) in Java Callout Action, i recive only this content in any variable:
    <con:java-content ref="jcid:15906698:135e486b745:-7f91" xmlns:con="http://www.bea.com/wli/sb/context"/>
    how i do for read or convert to list in OSB message flow ?
    my escenary is, excecute un method in java callout, this method recive a colection and return a collection. i cant view estructur in message flow. only view <con:java-content.....
    can any help me?
    I need your help.
    Regards
    [email protected]

    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/eclipsehelp/ui_ref.html#sj_uiSplitJoinJavaCalloutProperties
    try returning an Array, it seems more supported than a List :o)

  • How can i import dll files in java project in eclipse?

    Hi All,
    How can i import or link dll files in java project in eclipse?....
    dll files contains
    import com.ms.com.ComLib;
    import com.ms.com.Variant;
    import com.ms.com.ComFailException;
    import com.ms.wfc.data.AdoException;
    import com.ms.wfc.data.AdoEnums;
    Any idea of this please tell me.....
    I am using eclipse 3.4 and JRE 1.4
    Is this possible?
    Please tell me!!!!!!!!!!!!!
    Voddapally

    iMovie cannot edit mpg files, unles they come directly from a supported camera.
    I would suggest that you use a free third party app to convert it.
    Get MPEG Streamclip from Squared 5, which is free.
    Drag you mpg clip into MPEG Streamclip.
    Then, FILE/EXPORT USING QUICKTIME
    Choose Apple Intermediate Codec, and save it where you can find it. You should be able to import this file into iMovie, using the FILE/IMPORT/MOVIE command.
    Note: If your file is an MPEG2 clip, you may need to purchase the Apple QuickTime MPEG2 Playback Component from Apple. MPEG Streamclip will tell you if you need this. Don't buy it unless you have to. It costs about $20. You just have to install the component. MPEG Streamclip will use it in the background.

  • ALSB / OSB Java callout to gunzip

    We have an input file which is in a gz format, which we need to gunzip before passing onto our business service.
    We're writing a simple Java callout component to do this - taking an input stream and returning an output stream.
    What variable should I pass into my input stream from the callout in the proxy service message flow?
    I've tried $body and $input, but neither of these work.
    Thanks in advance
    Phil Riley

    Have tried logging to output, and this is what I get:
    $attachments[0]/ctx:attachment/ctx:body - empty
    $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <con:binary-content ref="cid:2a96c6b3:12da3c4b844:-7f3c" xmlns:con="http://www.bea.com/wli/sb/context"/>
    </soapenv:Body>
    $inbound
    <con:endpoint name="ProxyService$FredhopperExtract$ProxyServices$Test GZip" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service/>
    <con:transport>
    <con:uri>file:////apps/bea/dp_tmp</con:uri>
    <con:mode>request</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="file:FileRequestMetaData" xmlns:file="http://www.bea.com/wli/sb/transports/file" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="file:FileRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <file:fileName>/apps/bea/dp_tmp/test.txt.gz</file:fileName>
    </tran:headers>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
    <file:isFilePath>false</file:isFilePath>
    </con:request>
    </con:transport>
    <con:security>
    <con:transportClient>
    <con:username>&lt;anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    None of these actually have the contents of the message - the $body is the closest which tells me that it is binary and has a ref.

  • Invoke DBAdapter from Java Callout

    Hello,
    in OSB I need to invoke a DB-Adapter from a Java Callout. How can I achieve this?
    I cound not find any documentation about this (javadoc etc).
    Horst

    Ideally you should not need to access DB adapter from a Java callout. Use java callout for transformations, get back the transformed data, and call a business service based on DB Adapter.
    Alternatively, call java callout and make write code in Java to access DB directly using Weblogic datasource and connection pool.
    And if you dont want to do it any other way, create a business service based on the said DB Adapter, create a wrapper proxy(which internally calls the DB adapter based business service) of Any XML type with HTTP transport or even a WSDL based webservice, and call this from your Java code.

  • ALSB - Java Callout (.jar using commons-httpclient-3.1)

    Hello everyone,
    I'm having a not so funny problem.
    I made a Java class, that will be called by a Proxy Service (Java callout). I'm using the commons.httpclient-3.1.jar (+ codec and logging).
    Here's the code:
    package util.http;
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.methods.*;
    public class UtilitaireHTTP {
    // method used by the Proxy Service
    public static String getLastModified (String url){
    return getHeader(url,"last-modified");
    private static String getHeader(String url, String header){
    HttpClient client = new HttpClient();
    String lastModified = "404";
    HeadMethod head = new HeadMethod(url);
    try {
    //not working
    /*int statusCode = client.executeMethod( head );
    if (statusCode == 200){
         lastModified = head.getResponseHeader(header).getValue();
    //working
    lastModified = "200";
    catch(Exception e){
         System.out.println(e);
    finally {
    // release any connection resources used by the method
    head.releaseConnection();
    return lastModified;     
    Here's the problem: Whenever I remove the comment block, test it (it's going to work with JUnit), create a JAR. Import it into ALSB jar resources folder. When I do a Java Callout in a Proxy Service I won't be able to see my method getLastModified. If I put that block in comment, re-do all the export import, I'll see the method in the list.
    //not working
    /*int statusCode = client.executeMethod( head );
    if (statusCode == 200){
         lastModified = head.getResponseHeader(header).getValue();
    //working
    lastModified = "200";
    Anyone knows the solution or problem.
    Thank you!
    Van

    While playing with java callouts i've built working "groovy callout" sample. This way you can keep logic in your alsb proxy service rather than in jar file. Have a look. http://blog.aujava.com/?p=64

Maybe you are looking for

  • External display recognized but not working?

    So, I've got kind of a weird problem. Whenever I connect my iMac (through the Thunderbolt port) to my 32" RCA HDTV via a displayport to HDMI adapter, it shows on my iMac that there is a display connected (TTE HDTV), but my TV isn't recognizing it. I

  • File-to-RFC Scenario Table Param are empty

    Hello, I create a file adapter to rfc adapter scenario. Thereto  I implemented a RFC in SAP which has only a table param. Furthemore I mapped the XML-File, that will be read by the File Adapter sender, to the SAP RFC Table structure. However the scen

  • No Response from service on request of trial Account

    I've posted my mail on 26th oct 2006, to get trial account updation actually the application was working since 10 days but it automatically stops....on the demo day of the project.... till then i havent received any mail or response from that side ..

  • Cisco ACS register to primary with different acs versions

    Hello, I've updated a backup unit of two acs to  version 5.4.0.46.0a first I changed it to standalone, and now I try to register to the main ACS which is running version 5.1.0.44.2   And I get this error This System Failure occurred:  com.cisco.nm.ac

  • Mapping functions in XI

    HI Experts, I am looking for a doc , blog or any link where i can get explanation on all the mapping functions available and also about the user defined java mapping functions that we create. thanks sankar