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

Similar Messages

  • How to list the JAR files loaded into the Oracle Database ?

    How to list the JAR files loaded into the Oracle Database ?

    From 11.1 onwards, the below two views are available to identify the jar files loaded into the Database.
    JAVAJAR$
    JAVAJAROBJECTS$
    By querying the JAVAJAR$ view you can know information about the JAR files loaded into the Database and using JAVAJAROBJECTS$ view you can find all the java objects associated with the given JAR file.
    These views are populated everytime you use LOADJAVA with "-jarsasdbobjects" option to load your custom java classes.
    But unfortunately this feature is available only from 11.1 onwards and there is no clear workaround for above in 10.2 or earlier.

  • How to fix the .pdf file with error "invalid annotation object"

    how to fix the .pdf file with error "invalid annotation object"

    As long as the PDF opens, then just try saving it to a new file name. There may be a preflight script that would help troubleshoot the issue.

  • HOw To Identify The JAR File Name

    Hi,
    In an already developed java code how can we identify which jar file has been used? Does it depend on what packages are included? In a java code which I have the following packages are included, so please tell me what will be the name of the corresponding file:
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Iterator;
    import java.util.Map;
    import javax.xml.namespace.NamespaceContext;
    import javax.xml.xpath.*;
    import org.xml.sax.InputSource;
    import sun.misc.BASE64Encoder;
    import sun.misc.CharacterEncoder;
    Thanks,
    Abhishek.

    The .jar files that i will need are:
    1) aii_map_api.jar
    2) namespace.jar
    Regards,
    Abhishek.

  • ODI - Multi development environment how to share the JAR files

    Hi,
    For some of our functionality, existing KM not sufficient so we created with our own KM and we have called some jave code which we created and place inside lib directory of ODI as a JAR file. there are four people in the development work. so we have four development environment(all are complete installation, i.e while installing we choosing Complete Option).
    One of our developer created the our own KM and he placed the jar file in his own Dev environment's lib Directory. Since four Dev environment shares the some work rep we could see the new KM and all the ODI object in all the dev env. but if we run the the ODI interface which use the new KM from other Dev environment where we dint place the jar we are getting Error.
    if we keep the jar file in all the other three Dev environment's LIB directory then respective interface working.
    here my doubt,   is there any other way to share the JAR file to all the Environment without copying into everywhere?
    Thanks
    Knidhi

    Thanks you verymuch Cezar and Ratish, now almost i got the answer for my question.
    i installed ODI Server into separate machine. it has folder structure as follows
    Directory: D:/ODIServer/oracledi/ has the following subfolder
    1.bin 2.drivers 3.lib 4.tools.
    here i need to keep my Jar files under the lib folder. am i right?
    and bin directory contains only Agent related batch files. (agent.bat, agentscheduler.bat,agentservice.bat,agentstop.bat,agentstart.bat,agentweb.bat and jython.bat and respective .sh files)
    here dont know how to precede the following things
    1. how to configure the Master and Work Repository information with ODI Server?(MR and WR i already created with the help of one the ODI Client)
    2. how to configure the Client machine to Server?
    3. Since ODI Server not having the Topology, how to create the Agent? do i need to use any one of the ODI Client for this task?
    --Thanks
    Knidhi

  • How to modify the jar files information for Script Assets??

    Hi,
    I am using Open Script 9.2. We can add the external JAR files using Script->Script Properties--> Script Assets. I need to change the jar files when ever i am going to execute no of scripts. How can I modify them using JAVA Coding without manual handling. Is there any specific methods existed in OpenScript to serve the above scenario.
    Thanks in Advance.
    Thanks & Regards,
    Siva Thota

    Hi,
    When you say alter the jar file, do you mean alter the contents of the java code within the jar. If this is yes then the simple answer is no. As you are probably aware, a jar file contains pre-compiled java code, which you will not be able to alter. What is it you are trying to achieve?
    A simple answer maybe to use a child script which you can include into your main script. You can then change the code in the child script, and when you play back, this 'new' code will be compiled, and included within the replay.
    Regards
    Wayne.

  • How to download the .jar files for ESB?

    Hi,
    I'm connecting to a remote sandbox environment of CE 7.2. I'm running into the problem that some links point to URLs without a fully qualified host name. For example, in ESR (url .../rep) the link that points to the Enterprise Service Builder is http://server:port/rep/start/repository.jnlp instead of http://server.company.com:port/rep/start/repository.jnlp
    As a result, clicking the link results in Page not found.
    As a workaround, I can type the URL manually in the address field of my browser.
    That way, I can launch Web Start. However, it does not solve my problem, because soon after, the download fails because some of the .jar files have the short URL.
    I get the error message "Unable to load resource: http://host:port/rep/repository/com.sap.xpi.ibrep.client.jar
    Now how can I download the .jar files so that I can start the ESB? Typing the URL into the browser doesn't seem to work, and I don't know what else I should download to launch ESB.
    Is there a post-installation way to specify the URL for the components?
    Edited by: Arto Pihlaja on Dec 4, 2010 11:37 PM

    Found it.
    I had to change the value of the parameter com.sap.aii.connect.repository.name under CE - Administration - Properties Administration.

  • How to find the JAR files of a custom portal service?

    Hi all,
    I have created and deployed a custom protal service on to the portal. Now for any of the other apps to make use of this service, i need the JAR files which correspond to this portal service. Where do I find them??
    Regards,
    Narahari
    Message was edited by: Narahari Vedula

    Hi,
    Can you check up if this is located in the following path.
    System Administration ->Support->Portal Runtime
    Here navigate to ROOT/WEB-INF/portal/portalapps
    Open the folder with the name of the par file and check up if you can locate the jar.
    Regards,
    Harish
    (Please award points in case this helps)

  • Gridworld Case Study - how to use a .jar file with textpad

    Hello,
    I am a student currently working on a project involving the Gridworld case study. While trying to work on my project at home, I discovered that I would get new "cannot find symbol" compiler errors that I had not previously gotten while compiling the same code at school. I am assuming this has something to do with the .jar file included in the gridworld code. How do I get textpad and/or the java compiler to find and use the .jar file and reccognise the classes which i am importing and extending in my project?
    Thanks,
    -Alex

    Thanks, It works for compiler now.
    Now, I write a html to run the applet. appletviewer
    says "
    java.lang.NoClassDefFoundError: ij/process/ImageProcessor
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
    at java.lang.Class.getConstructor0(Class.java:1762)
    at java.lang.Class.newInstance0(Class.java:276)
    at java.lang.Class.newInstance(Class.java:259)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
    at sun.applet.AppletPanel.run(AppletPanel.java:292)
    at java.lang.Thread.run(Thread.java:536)
    It seems the appletviewer can not find the right path for the package. How can I fix this?
    Thank again,
    Hillxy

  • How to configure the .ini file with applet

    hai
    i am using native methods in that methods they use some ip addresses. when i am using that native methods in applet run the applet using appletviewer tool it works fine but when i am open that applet using html page browser not configure that .ini file data .how to configure that .ini file with browser

    Hi Jay SenSharma,
    Thanks for your immediate response.
    I saw your URL links, But in your link give the recursive deployment using wlst. But my question is how to configure the oracle weblogic library files into Admin server & Managed Servers by using the wls.jar file through wlst script to create the new domain.
    But if create the new domain by using GUI mode then we manually give the admin server port number & managed servers port number and name.
    By default the library files are configured with the Admin server in GUI mode. But the Managed server the Library files are not configured with the Managed servers. Then we manually select all the library files to the corresponding managed servers. Then only the applications are deployed into the corresponding managed server.
    Regards,
    S.vinoth Babu

  • I am getting the following error: Unable to locate class: java.lang.NoClassDefFoundError: on an iPlanet WS. We have ensured that the classpath in jvm12.conf includes the jar file with path. Any ideas?

     

    Well, now I'm pulling my hair out even more because I can't get it to resolve anything in jaxws-rt.jar at runtime. Note: compile-time still works FINE.
    I was messing with classpaths and stuff (and the endorsed dirs option of course) and it was "working" to the extent I had posted before, but then I kept playing with it and at some point I said, this isn't working and I need to reset all this stuff back to the way it was.
    ... so I did that. And now it won't resolve "PolicyException:"
    java.lang.NoClassDefFoundError: com/sun/xml/ws/policy/PolicyException
    This doesn't mean anything to you guys I bet, but that happens when it FIRST gets inside the web service code, which references PolicyException (doesn't even use it at that point.. I'm assuming the import is screwing it up when it's in the constructor). So now it won't resolve at all. Before, it was getting past this point and telling me the "method not found" error on the next line or this same error for WSBindingProvider two lines down, when it's actually being used. AWESOME.
    I downloaded the latest jaxws-rt.jar and all its dependencies, shoved that into my lib folder, and set the endorsed dir to that folder (There's kind of a web of dependencies here. jaxws-rt.jar expects all its dependencies to be in the same folder, it seems, so I don't know how it was "working" before when I just copied jaxws-rt.jar into my separate endorsed dir - but I can't move all of those files to endorsed because I need them in my project (which expects them to be in the lib folder)). What happened? It went back to my original "String" error (first error in the first post), which means it's not getting endorsed at all from that location.
    What a mess.
    Can someone tell me what the heck I'm supposed to do with this jar file?

  • In a java applet , how to call other jar file?

    i have i programm, this programm is a java application,
    also, i already put these program into jar file, and then if i double this jar file , its work!
    but , now i need to run this program in web browser,
    i thing that i will write a simple applet with a button
    after i click this jButton, how the java applet call and run the java file?
    please help me.. it is because this is my project! thx..........
    [email protected]

    I have a solution write one batch file in that you specify class path and java home.
    then give
    java -jar Test.jar
    then call this batch file from program using Java runtime
    Runtime.exec method...
    Hope will this work

  • How to Download the Jar files ?

    hi Experts,
    i have try in many sites but i no idea
    plz send the sites
    Regards
    Chandu

    Hi Lokesh,
    > Can u send me some reasons that we will face if we use this site
    The reasons why this site does not really make sense I have already given above: The tool ClassLocator does the same, does it locally on your hard drive, does support immediate extension of the .classpath file within your project (even using predefined ClasspathVariable, which makes it easy to exchange projects among different developers). Everything you need. If you need to know where some class is packed inside some JAR and where this is located -- then you will need physical access to the file (for decompiling, for using it at build time, ...). And if you have that, ClassLocator, as said, does all the site is doing - and even more.
    > That site has helped me a lot in finding the jars.
    >
    > I havent faced any probs using that that is why i thought of sharing this to other people on SDN.
    It's just that it is totally superflous; the only real reason to use it is not to know ClassLocator (OK, one possible reason: You need to know where some class is "hidden" but you don't have an NWDS; I can not really think how this should make sense, but who knows...).
    Best regards
    Detlev

  • How to debug the jar files while developing the native extension for android

    ANyone???

    I'm having the same problem. I learned FB and Eclipse. I've read the tutorials, created an ane, and built it into a test app. I can debug my test app within FB 4.7 on my mobile device via USB. But there are bugs and they silently fail. Despite all my Log statements in my android java code, they won't output to the FB console. I'm blind, without even trace statements to help fix my ane. I've searched the internet and can't find anything. It must either be terribly obvious or arcane, because no one mentions it.
    Can anyone tell me how to get trace out of an ane?
    The Android reference claims debug and verbose priority are stripped out at runtime. I switched to Log.i() but still get nothing. I suppose for now I'll try throwing errors and see if I can report trace info that way if possible.
    Anyone perhaps have a JUnit test that will mimic AIR using the ane jar file as an extension? Perhaps it will be easier to go full native until the android side is debugged.
    Update Edit: Ok, now spending more time reading the Android developers website. I've found I can use logcat to get all kinds of useful system logs, including the log output of my embedded ane. I created a nice big command line window (180 char wide with a 500 deep buffer so I can scroll back through all the messages), then from the android platform tools directory I ran 'adb shell', then at the shell prompt $>logcat
    Links to info that helped me:
    http://developer.android.com/tools/debugging/index.html
    http://developer.android.com/tools/help/logcat.html

  • How to get the jar file without knowing its name and any class inside it?

    Hello, everybody!
    I would like to know if there's a way to get a reference programatically to the initial jar without knowing its name and any class contained in it. By "initial jar" I mean the jar that was called in the prompt, like this:
    java -jar jarfile.jaror in another way, in a graphical system. To be sincere what I really want is to get a reference to the jar's manifest, but I know if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also help. So, is there a way to do this?
    Thank you.
    Marcos

    jverd wrote:
    marcos_aps wrote:
    abillconsl wrote:
    Can you be more specific - IOW, can you cite a specific case?Absolutely. I want to access the jar in source code with the java.util.zip.JarFile class, for example.But why? You still haven't provided a use case or explained what you're trying to accomplish. As already pointed out, whatever you're trying to do, this is a brittle solution. If you explain what you're trying to accomplish with this, somebody may be able to suggest a better approach.jverd, I explained for baftos. Anyway, I will try to be more specific. I start my sytem like this, from, say, for example, jar1.jar:
    import br.product.System;
    public static void main(String[] args)
        System.start("NameOfTheSystem");
    }The System class is in util.jar, for example. This jar is used by all systems. I wouldn't like to pass in the name of the system, as above. I would like that the System class could read it from jar1.jar's manifest file. I just would like to have this:
    import br.product.System;
    public static void main(String[] args)
        System.start();
    }It is more elegant and I don't have the name of the system in two places: code and manifest file.
    Marcos

Maybe you are looking for

  • Windows 8 upgrade

    I recently upgraded my HP Touchsmart 310-1020 Desktop PC from Windows 7 to Windows 8.  After the upgrade, I received a message that ATI needs to be upgraded.  When finding out how to do that, I found out I should have upgraded drivers prior to the Wi

  • ArrayIndexOutOfBoundException when using Callable Statement in Weblogic 8.1

    Hi all, We recently ported our application from 6.1 to 8.1. I have noticed the following exception in 8.1 (which was working fine in 6.1) java.lang.ArrayIndexOutOfBoundsException: 7 [ERROR] nfusion.admin.UpdateBureauLogin.5 131575 2003-10-15 16:21:58

  • Query Builder in Oracle Application Express

    I am unable to get columns to show after I submitt an object and click "columns" to add for a query. I also cannot get any query at all. Any help out there? Feel free to direct me to correct forum if necessary.

  • How to temporary block list of web pages?

    Hi While working I need access to web pages (I am developing web applications) but same time often I got distracted and spend my time reading interesting articles on web instead doing my job. I was using LeechBlock addon for Firefox, but now I migrat

  • Can we built connection between flash and JAVA?

    Hello i m a flash developer. I need a solution to improt java class in flash. Is there any solution to connect java and flash. Plz reply ASAP.