weblogic.wsee.jaxrpc.ServiceImpl class not found - java

I'm coding a little servlet using weblogic.wsee.jaxrpc.ServiceImpl. My IDE(JDeveloper) doesn't say something wrong. But after launching app, I'm catching java.lang.ClassNotFoundException:weblogic.wsee.jaxrpc.ServiceImpl. Should I add new jar files to lib directory? This is what lib contains:

If you use weblogic 12.x then the jar that contains weblogic.wsee.jaxrpc.ServiceImpl is located in
{WL_INSTALL_FOLDER}/wlserver/modules/clients/com.oracle.webservices.wls.jaxws-wlswss-client.jar
or
wls.jaxrpc-client
depending on which one you use.
If you add that to your lib, it should work.

Related

Microprofile misses manifest.mf

I created an example microprofile app. And the readme says i can start it with java -jar myjar.jar
But when I try it i get an error that no manifest.mf exists.
I really don't have one in my example generated project. But when I extract the jar, there is one generated, but without a main class.
How is a Microprofile app even supposed to run? I know there is a class extending Application. But how should I handle this manifest file?
Ok sorry just realized IntelliJ placed the projet into another folder. So now I have two folders. And handled the wrong project.

BlueJ Importing custom class library

Ok the deal is, I've made a small class library (*.Jar file) to help make a more visually organized code and to help with some common tasks.
Before you tell me to go to: Tools > Preferences > Libraries.
I have done that, over and over and over again.. I also tried to manually add it to: C:\Program Files\BlueJ\lib\userlib\"jar file here"
And yes, i did restart BlueJ to load the newly added libraries.
No matter what i seem to try it won't let me import it to my project using the import command, but without it, it just won't compile.
I know i can just add the classes manually, but as the class library slowly grow, so does the effort of adding all the classes in that library.
In advance, thanks for your help and consideration.
If adding your jar file in the Preferences > Libraries tab doesn't work, you can try adding the jar to the "userlib" directory at <bluej-dir>/lib/userlib (where <bluej-dir> is the folder where BlueJ was installed).
A third option you can try is adding your jar file directly to a project by creating a +libs directory inside your project directory and copying the jar to that directory. This has the drawback that you have to manually copy the jar to each project +libs subfolder that needs your library. On the plus side, it allows you to distribute your project (library jars included) just by zipping up the root project directory.
On Windows I create directory named "+libs" on my blueJ project directory,
then add .jar to that directory, and restart blueJ ,
that´s help me, and import after that work fine
Despite the post's oldness for who stumble upon i can say with the newest version of BlueJ (actually 4.1.3) in an old Ubuntu distro(Lucid Lynx aka 10.04LTS) all work as intended per default without any hack

java manifest internal jar link

I'm trying to package some external libraries into my java project, but failing miserably. I've got a .jar-file, with external libraries packaged into ./lib/jars. If I have the manifest pointing the Class-Path: at lib/jars/theJar.jar, I get a NoClassDefFoundError. If I have the Class-Path pointing at C:\Users\Owner\workspace\theProject\lib\jars\theJar.jar, the jar file is found - but I suppose that will only work on my computer.
How do I make the program go looking for the jars inside of the jar?
You don't, unless you use a custom classloader like JarClassLoader.
Alternatives include things like jarjar and One-JAR.
Edit It appears I misunderstood your problem, based on your question title--they're not really "internal", they're external, as your question correctly states. The last sentence is again misleading: are you trying to reference external jars, or jars inside of the jar?

where to place jar in order to run a program from command-line?

this will sound silly but i am executing my code from command prompt and have to use a jar in my class.
I have placed my jar in lib folder of JDK..
but i am still getting error of file not found
any explanation??
EDITED : guys tried all but still not working
EDIT 2 :i am trying to work as was told by this link i am using js-1.6R5.jar
Edit 3 : i undestand all the things you ppl have told but nothing working for me.. pls give me a link to upload my example that i can share with you all.
Edit 4 : i am fed up by setting classpaths but its not working... i have SDK installed in my system, do i need an extra JDK to run my programs from command prompt??
You need to add the jar to the class path by doing the following...
java -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar org.mypackage.HelloWorld
Please see Wikipedia - Classpath_(Java)
You can place it anywhere, as long is you include it in your classpath. See Setting the Class Path for how to include jars in the classpath.
Have in mind that adding something in the JDK lib is almost never a good idea.
You can make a lib folder in your application's directory and put jar files there, then make your application find them by adding lib to your application's classpath.
And, don't put your jar files in JDK's lib folder. It's not good practise.
You need to let Java know that you want to include the jar in your classpath (the list of folders and jars it checks for classes). One way to do this is with the -cp command line argument, something like
java -cp ".;pathToMyJar\myJar.jar" MyClass
Another is to edit the CLASSPATH environment variable in your OS to include your jar.
A simple solution will be to place the jar fiel inside the windows folder if you are doing it in a Windows machine.
Unfortunately your question contains a lot of question signs and few information.
If you are using java.io.File to open jar as a regular file this jar should not be in lib directory. You just have to provide correct path in file system.
If however you are just trying to use jar as a part of your application it should be in classpath. Use either command line java -cp myjar.jar MyMainClassor put full path to this jar to global environment variableCLASSPATH`.

Problems including jar files outside the jar file containing the manifest

Basically let me first explain what I am aiming to do. I have a dynamic ETL transformer app written in JAVA. Due to the dynamic nature of this app I have to be able to add plugins jars to the app in a location outside of the apps jar file.
Basically would like to have the following directory structure:
AppFolder
|- plugins/
|- configs/
|- mainApp.jar
If possible I would like to be able to use wildcards in my manifest to dynamically add jars located in the plugins folder.
Unfortunately all I have tried so far has failed. I have tried to use both relative paths and absolute paths neither have worked (with or without wildcard).
If I however include the plugins folder in the main app's jar file itself it works fine given that I don't use wildcards.
So my question is, is it actually possible to have dependencies outside of a jar or do they always have to be contained within.
The other question is regarding the usage of wildcards. i have looked at [the java documentation] (http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html) to no prevail unfortunately.
some examples of what I have tried so far:
../plugins/*
../plugins/plugin.jar
/abolute/path/to/plugins/*
/abolute/path/to/plugins/plugin.jar
and unfortunately none of them have done the trick so any help would be very much appreciated...
Yes you can have dependencies outside the jar. But wildcards are not supported for specify dependant jars.
The jars need to be explicitly specified in your manifest, and the location needs to be relative to where the application is run from
A better option for you may be to use the Extension Mechanism
java -Djava.ext.dirs=/abolute/path/to/plugins/ ......
If you have control of the code you could always add a JarClassLoader and load the jars dynamically.
http://java.sun.com/docs/books/tutorial/deployment/jar/jarclassloader.html

Categories