File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Works through Jdeveloper not through Console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Works through Jdeveloper not through Console" Watch "Works through Jdeveloper not through Console" New topic
Author

Works through Jdeveloper not through Console

Aftab Mahmood
Greenhorn

Joined: Apr 03, 2008
Posts: 1
Hi,

I have created a proxy to a webservice using Jdeveloper. All Works fine when I run the java application that calls the webservice through Jdeveloper. When I try running the application from a console window (eg java webservicecleint) I get the PrivilegedActionException.

Any ideas as to why it does that. I am running the colsole version from the same machine where Jdeveloper is running

Confused.....
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Al",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Markus Koegel
Greenhorn

Joined: Apr 23, 2008
Posts: 3
Hello,

I am new one in Java. Was just digging into jdeveloper and soap. But I have exactlty the same problem.

Start it outside the jdeveloper with
java -jar archive1.jar

All webproxys are in the jar.
But I get the error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceFactory

Thank you for help!

Markus
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
The proxy classes don't contain the JAX-RPC classes. You need to add those to your classpath.
Markus Koegel
Greenhorn

Joined: Apr 23, 2008
Posts: 3
Hello,

a short report of my progress:
All the hints that I have to add to the classpath the needed jar files were right. I figured out that running a jar file with "java -jar" ignores the -cp option.
I finally found out how to add the Class-Path tag to the mainifest file in JDeveloper Deployment-Profile.

Now my program runs from a DOS-Box (java -jar archive1.jar arg1 arg2) with no error message. But unfortunately also with no reply. It just ends very shortly.

So I will keep hanging on to the problem.

Regards

Markus
Markus Koegel
Greenhorn

Joined: Apr 23, 2008
Posts: 3
Hello,

finally I gave up the path to create a jar file.
Java didn't react as I expected from the documentation.

I continued using all class files. And finally I got it run outside the JDeveloper.

It still needs a little tuning but I have a base I can work on.

Thanks to all,

Markus
Brian Rhees
Greenhorn

Joined: Jul 01, 2008
Posts: 1
Are there any solutions to this?
I am having the same problem.

I have a web service proxy within JDeveloper (created from a wsdl file). I created a .java file to call the web service. It runs fine within JDeveloper. When I deploy it to a .jar file I get the exception: "Exception in thread "main" java.long.NoClassDefFoundError: javax/xml/rpc/ServiceFactory"

Any ideas?

Thanks
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
Is that class contained in the jar file, or otherwise in the classpath, when the WS client is run?
 
Don't get me started about those stupid light bulbs.
 
subject: Works through Jdeveloper not through Console