Solved

How to create jar file in jdeveloper ?

Posted on 2011-03-10
21
1,447 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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
 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
splitOdd10 challenge 5 109
jdbc error in jsp application 20 47
Custom Java Application connects to database: Which one of the 20? 4 29
Tomcat: Unable to run tomcat service. 2 20
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

831 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