Solved

How to create jar file in jdeveloper ?

Posted on 2011-03-10
21
1,442 Views
Last Modified: 2012-08-13

Hi ,

I have developed some web services code in Jdeveloper . i want to use those code in my application . My application is developed in Eclipse IDE.  So how can i create a jar of(web services tire ) web servcies code ?

0
Comment
  • 9
  • 9
  • 3
21 Comments
 
LVL 92

Expert Comment

by:objects
ID: 35105857
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35105892
in that same manner only i create a jsr file of web services call . while deploying in EClipse its says class Not found exception !??
0
 
LVL 92

Expert Comment

by:objects
ID: 35105919
does the jar contain the class?
have you added the jar to your projects build path?
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35106017
ya i put it web-inf folder of my application.

its running in the Jdeveloper , and i created thw whole application as a jar file ! and put it in web-inf/lib folder , while running class not found exeption its give !
0
 
LVL 92

Expert Comment

by:objects
ID: 35106119
> ya i put it web-inf folder of my application.

not enough, you need to specifically add it to the build path
right click on the jar and pick add to build path
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35106135
the same error only after added to build path
 
java.lang.NoClassDefFoundError
	oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.class$(StandardSOAPTypeMappings.java:124)
	oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.<init>(StandardSOAPTypeMappings.java:557)
	oracle.j2ee.ws.client.BasicService.createSoapMappings(BasicService.java:259)
	oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(BasicService.java:236)
	activityplanning.proxy.runtime.Lead_Service_SerializerRegistry.getRegistry(Lead_Service_SerializerRegistry.java:26)
	activityplanning.proxy.runtime.Lead_Service_Impl.<init>(Lead_Service_Impl.java:26)
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	java.lang.reflect.Constructor.newInstance(Unknown Source)
	java.lang.Class.newInstance0(Unknown Source)
	java.lang.Class.newInstance(Unknown Source)
	oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:92)
	oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryImpl.java:121)
	activityplanning.proxy.LeadClient.<init>(LeadClient.java:20)
	com.merck.emea.xforces.common.WebServicesCall.webServicesCallIn(WebServicesCall.java:41)
	com.merck.emea.xforces.dao.ApproveActResDao.exportActToMSDC(ApproveActResDao.java:1125)
	com.merck.emea.xforces.action.ActivityExport.execute(ActivityExport.java:72)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
	com.merck.emea.xforces.common.MatrixFilter.doFilter(MatrixFilter.java:44)

Open in new window

0
 
LVL 92

Expert Comment

by:objects
ID: 35106148
what class is it looking for?
0
 
LVL 92

Expert Comment

by:objects
ID: 35106157
> ya i put it web-inf folder of my application.

not where you should be putting it either, but shouldn't cause your problem
are you running it within eclipse?
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35106179
while acessing this LeadClient class its giving error like this !
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35106183
>>>>>right click on the jar and pick add to build path

I did that also .

>>>>>are you running it within eclipse?
yes .
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 92

Expert Comment

by:objects
ID: 35106211
are you sure it is in the jar
and you are specifying the fully qualified name (include package) of the class
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35106296
I checked that .All proxy class are there but related jar file are not there !
0
 
LVL 92

Accepted Solution

by:
objects earned 450 total points
ID: 35106470
you'll also need to add those dependencies yourself in the same way
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35107113
Try a full clean then rebuild (auto or not)
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35107336
>>>>> you'll also need to add those dependencies yourself in the same way

I added those files . but my application not working  !  :(

>>>>>>Try a full clean then rebuild (auto or not)
Its not working
0
 
LVL 92

Expert Comment

by:objects
ID: 35107357
> I added those files . but my application not working  !  :(

they all need to be added to your build path, and the server restarted
any run configurations should also be recreated
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35107385
Please post your current full stack trace
0
 
LVL 20

Author Comment

by:Sathish David Kumar N
ID: 35107413
I added some jar file in my application after that the error is change like this  
java.lang.NoClassDefFoundError: org/relaxng/datatype/Datatype
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
	org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
	java.lang.ClassLoader.loadClassInternal(Unknown Source)
	oracle.j2ee.ws.common.encoding.simpletype.XSDTimeEncoder.<clinit>(XSDTimeEncoder.java:57)
	oracle.j2ee.ws.common.encoding.soap.StandardSOAPTypeMappings.<init>(StandardSOAPTypeMappings.java:277)
	oracle.j2ee.ws.client.BasicService.createSoapMappings(BasicService.java:259)
	oracle.j2ee.ws.client.BasicService.createStandardTypeMappingRegistry(BasicService.java:236)
	activityplanning.proxy.runtime.Lead_Service_SerializerRegistry.getRegistry(Lead_Service_SerializerRegistry.java:26)
	activityplanning.proxy.runtime.Lead_Service_Impl.<init>(Lead_Service_Impl.java:26)
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	java.lang.reflect.Constructor.newInstance(Unknown Source)
	java.lang.Class.newInstance0(Unknown Source)
	java.lang.Class.newInstance(Unknown Source)
	oracle.j2ee.ws.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:92)
	oracle.j2ee.ws.client.ServiceFactoryImpl.loadService(ServiceFactoryImpl.java:121)
	activityplanning.proxy.LeadClient.<init>(LeadClient.java:18)
	com.merck.emea.xforces.common.WebServicesCall.webServicesCallIn(WebServicesCall.java:41)
	com.merck.emea.xforces.dao.ApproveActResDao.exportActToMSDC(ApproveActResDao.java:1125)
	com.merck.emea.xforces.action.ActivityExport.execute(ActivityExport.java:72)
	org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
	com.merck.emea.xforces.common.MatrixFilter.doFilter(MatrixFilter.java:44)

Open in new window

0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 50 total points
ID: 35107437
You need the relaxNg jars on your buildpath
0
 
LVL 92

Expert Comment

by:objects
ID: 35107475
You need to add all the jars as I pointed out in my earlier comments
0
 
LVL 20

Author Closing Comment

by:Sathish David Kumar N
ID: 35111716
I have found only 6 related jars .
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now