Exception while adding External Jar files in NWDS
Dear Friends,
Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.
Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
<provider-descriptor>
<display-name>
XML2EDI_Library
</display-name>
<component-name>
XML2EDI_Library
</component-name>
<major-version>6</major-version>
<minor-version>40</minor-version>
<micro-version>0</micro-version>
<provider-name>
dom4j.org
</provider-name>
<references>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.Document</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.DocumentException</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.Element</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.io.SAXReader</reference>
</references>
<jars>
<jar-name>EDI_Module.jar</jar-name>
</jars>
</provider-descriptor>
I have included 4 references because i have imported following in my ejb module.
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:
1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
Help me in this issue..
Thanks in advance
N.Jayanth Kumar
thanks for you help sidharth.
i have now jar files in the server and the application referring to the jar files. everything is deployed fine. however, when i start the application..i get the error -"package jcifs.smb does not exist". the jar i am using is jcifs-1.2.7.jar. in my web module when i expand the jar i see the package and the .class files inside. what am i missing?
Also, i din't define a SharingReference to usermanagement in portalapp.xml as i am working towards a pure j2ee enterprise application. the web module (DC) referes to the jar files. is there any step similar to defining the sharing reference for the web module DC?
please help. thanks - sowmiyar
Similar Messages
-
Hello,
I have successfully created and deployed a portal application project (par file) that required adding as an external jar the file com.sap.portal.usermanagementapi.jar. Now I am re-doing the project as a development component in NWDI and I can add the external jar file fine and the source code shows no errors. However as soon as I build the DC I get a source error that says the import to com.sap.ip.portal.service.ume.IUserManagementEngine can not be resolved. If I go back to the java build path the usermanagementapi.jar is no longer there.
Do I have to handle the adding of external jar files in a different way for a DC as opposed to a par project?
Thanks,
Bertthanks for you help sidharth.
i have now jar files in the server and the application referring to the jar files. everything is deployed fine. however, when i start the application..i get the error -"package jcifs.smb does not exist". the jar i am using is jcifs-1.2.7.jar. in my web module when i expand the jar i see the package and the .class files inside. what am i missing?
Also, i din't define a SharingReference to usermanagement in portalapp.xml as i am working towards a pure j2ee enterprise application. the web module (DC) referes to the jar files. is there any step similar to defining the sharing reference for the web module DC?
please help. thanks - sowmiyar -
Adding External jar file in webdynpro in CE 7.1 EHP 1
Hi,
How to add external jar file in webdynpro component. I am using CE 7.1 EHP 1 SP04 .Public part of external library is used in the webdynpro dc. I created Enterprise Application and used that in runtime in the wybdynpro dc also.
I am not getting any error at the time of deploy but at the time of activating getting the following error.
ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:23: package com.sap.security.api does not exist
[javac] ERROR: import com.sap.security.api.ISearchAttribute;
[javac] ERROR: ^
[javac] ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:24: package com.sap.security.api does not exist
[javac] ERROR: import com.sap.security.api.ISearchResult;
Please help.
RaktimHello Raktim
com.sap.security.api should be available within NWDS plugins and should work fine if you add sap-jee DC as used dc.
For external jars check this link
[http://wiki.sdn.sap.com/wiki/display/Java/Externaljarfileerrorand+Solution]
works fine in netwever 7.01 .
Regards -
Help need in Adding External jar files.
Hi all,
Iam developing ADF application using JDEV 11.1.1.3.0.
I need to move files from one directory to another so i have used external jar "commons-io-1.4.jar" file.
i did this by going to the project properties -->Libraries and Classpath -->Add Library
added the jat file.
In java class i have used the function
File.copyFileToDirectory(reQueueFile, TargetLocation,false);
it was working fine when i tried in IntegratedWeblogic server but when i deploy in Standalone Weblogic server its not getting the jar file.
Its throwing me the exception
javax.el.ELException: java.lang.NoSuchMethodError: org/apache/commons/io/FileUtils.moveFileToDirectory(Ljava/io/File;Ljava/io/File;Z)V
at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1303)
Please let me know is there a way of adding the lib to the project.
Regards,
Suresh kumar.kFirst you should check that the library has the checkbox 'Deploy by default' is checked for your library.
The you open the project properties of the view controller project, select Deployments, edit the deployment descriptor. Select the Node 'File Groups'->'WEB-INF/lib'->'Contributors'. this should give you a list of libraries your project uses. Check if your library has the checkbox checked (is selected fro deployment). If it's not checked, set it.
This should include the library.
Timo -
OutOfMemory Exception while running a JAR file
Hi,
I am working with Java 1.5 and using Eclipse to build a GUI. My application has intensive image loading involved so I set -Xmx inside Eclipse when running the application in debug mode.
However, once a JAR file is exported, I do not know how to specify the heap size required to run the program. Is there a way to ...
1. embed the heap size info inside the JAR file?
2. specify a heap size when running the JAR file?
Thanks in advance.Heap size is specified by the -Xmx option on the java command. See the java command documentation.
-
Exception while creating a jar file for bean
Friendz,
I am getting this error whenever i tried to create a jar file.
I am using win 98 os and jdk1.4 please tell me what error it is
C:\bean\programs\spectrum>jar cfm a.jar manifest.mft spectrum.class
java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:355)
at java.util.jar.Manifest.read(Manifest.java:162)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at sun.tools.jar.Main.run(Main.java:124)
at sun.tools.jar.Main.main(Main.java:904)
Contents of manifest template file:
Name:spectrum.class
Java-Bean:TrueManifests are saved with the .mf file extension. Rename your manifest mainfest.mf.
-
Adding External Jars in Module development
Dear Friends,
Actually i am adding an external Jar file in my EJB Module in NWDS.I am using this jar file for converting XML to flat file and i am calling this module from Receiver ommunication channel.For this process, i am importing dom4j.jar file in the EJB Module.I have created a jar file for that module,
Now i have created an external Library project for the cause that i have used the external jar file, and i have made following code in the provider.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
<provider-descriptor>
<display-name>
XML2EDI_Library
</display-name>
<component-name>
XML2EDI_Library
</component-name>
<major-version>6</major-version>
<minor-version>40</minor-version>
<micro-version>0</micro-version>
<provider-name>
dom4j.org
</provider-name>
<references>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.Document</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.DocumentException</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.Element</reference>
<reference
provider-name="dom4j.org"
strength="weak"
type="library">org.dom4j.io.SAXReader</reference>
</references>
<jars>
<jar-name>EDI_Module.jar</jar-name>
</jars>
</provider-descriptor>
I have included 4 references because i have imported following in my ejb module.
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
I am not sure of wht to include in reference target and provider name, I am getting the following exceptions in Message monitoring:
1. AO: Document Exception: org.dom4j.DocumentException: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
2. Nested exception: E:\usr\sap\BWS\DVEBMGS00\j2ee\cluster\server0\
Help me in this issue..
Thanks in advance
N.Jayanth KumarDear Stefan,
I will explain my problem here..in brief
1. I have created an EJB Module and adding an external jar dom4j.jar
2. I have the my jndi name as XmltoText
3. In my application-j2ee-engine.xml in my EAR file...i have included :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference
reference-type="weak">
<reference-target
provider-name="dom4j.org"
target-type="application">TEST_LIBRARY
</reference- target>
</reference>
<fail-over-enable mode="disable"/>
</application-j2ee-engine>
TEXT_LIBRARY is name of my Library Project.Please tell me corrections in the above code...i have doubt regarding provider name.
4. As i have added external jar file in my ejb module..._i have created a Library project and in that project in provider.xml_ file i have included the following code...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE provider-descriptor SYSTEM "library.provider.dtd">
<provider-descriptor>
<display-name>TEXT_LIBRARY</display-name>
<component-name>TEXT_LIBRARY</component-name>
<major-version>6</major-version>
<minor-version>40</minor-version>
<micro-version>0</micro-version>
<provider-name>****</provider-name>
<references>
<reference
provider-name="****"
strength="weak"
type="library">****</reference>
</references>
<jars>
<jar-name>EJBModule.jar</jar-name> (This is my EJB Module jar file)
</jars>
</provider-descriptor>
Now what should i include in the places of **** in the references above??
Thanks and Regards,
N.Jayanth Kumar -
Exception is thrown only while executing the jar file
java.lang.NoClassDefFoundError: javax/mail/Address Exception is thrown only while executing the jar file. But the program compiles and executes good when executed for command prompt through the class files.
I used javamail API in my program. Classpath and every others are set to the right one's. Executed fine when used java Random.class. But the problem is only with the jar file.
Please help me out in this regard. Why the exception is thrown only in jar but not at class level.Assuming you're running your program using "java -jar", your jar file needs a Class-Path entry
in the manifest file that references mail.jar. -
How to call external jar files in EJB project for CE
Hi,
I would be thankful if someone could help me with this -
I need to call the external jar files into my EJB project - Here is what I have done and am getting runtime exception as -
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
1. Created a EJB project" HelloWorld " using Java perspective in NWDS 7.1 called with client as HelloWorldClient and EAR project as HelloWorldEAR.
2. Am working on HelloWorld project (1st one).
3. In my code I am instantiating a class which is a class in one of the external jar file that I need to refer in my project.
4. I have set the Java Build path but it works only for the compile time and fails during runtime.
5. Have read I need to create external library DC and refer in my project "HelloWorld".
Can anyone help me with exact steps what needs to be done - during creation of external library project and then for my "HelloWorld" EJB project. How would I be able to reference or set the external library project in my EJB project?
Looking forward to hear from experts.
Thanks,
Shiv
Edited by: Shiv Khullar on Aug 30, 2010 9:39 PMHi Edson,
I tried it , but it still gives me runtime exception.
javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
Steps I performed are -
1. Created a library project and created 2 Public parts "Compilation" and "Assembly"
2. Build the library project.
Now in my EJB project using Project Explorer - set the classpath and added both compilation jar and assembly jar files.
This is how the classpath entries for external library looks like -
<classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkAssembly/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkAssembly.jar"/>
<classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkCompilation/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkCompilation.jar"/>
I have also added the jar files I used in my external library project as "User Library" from Java Build Path . I dont do it , then the code fails during compilation itself.
Regards,
Shiv -
Deploying external jar files in CE 7.1
Hi All,
I am using CE 7.1 SP01 NWDS to develop my applications.
Now I want deploy one external jar files to J2ee engine.
I know how to do the same in NWDS 2004s. But here the steps seems to be little bit different.
I referred the following blog for doing this in CE 7.1
/people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii
But, still I am getting Classnotfound exception, when i try to use the jar file in dc applications. There, I posted some queries, but I didnt get any solution.
Can any one help me on this please.
Thanks,
Fahad HamsaHi Fahad,
I am facing the same problem, but am not able to get the solution.
I am following the below steps..
1) Created a Webdynpro DC - "testProj" to which i need to add the external library DC.
2) Created a DC of type "External Library" called "externaljar"
3)Added Public Parts of type assembly and compilation to the "externaljar" DC (Component Properties Tab -> Public Parts)
4) Right click on the assembly Public Part name -> Manage entities, and added the JAR files as archive.
5)Right click on the compilation Public Part name -> Manage entities, and added the JAR files as archive.
6)Go to Webdynpro DC "testProj" .
Under Component Properties Tab -> Dependencies tab -> Add -> selected the "externaljar" DC -> Next -> for "externaljar" DC checked Deploy time and Run time.
For assembly Public Part and compilation Public Part "build" is selected by default.
7) I did build of both the DC's and deployed it.
Im getting "Class not found" error.
Please let me know where i am going wrong.
Thanks,
Shilpa. -
How to add SDK jar file in NWDS
Dear Friends,
Currently i have an issue. I have to bring the BO favorite to my Portal Screen. My Portal is developed in PDK.
I have few links where the source code is writhen. Those link's are
/people/michael.nicholls/blog/2010/02/22/using-the-pdk-to-access-businessobjects-infoview
http://wiki.sdn.sap.com/wiki/display/Snippets/ReadInfoViewfavoritesfromthe+portal
I don't know more about BO. I have few points which i mentioned below.
1) How to add SDK jar file in NWDS.
2)DO i need any specific package for that.
Kindly help me with your Valuble suggestion and document.
Thanx in Advance.
Prashant KrishenHi,
for adding all the jar files in NWDS fallow below steps
windows >> preferences >>Java>>Java buildpath>>Libraries>>add external jars
Hope this helps
Edited by: polaka123 on Nov 13, 2010 12:44 PM -
Hello,
I was trying to create a WDJ applicantion for connecting to the MDM system.
When I tried to add the MDM jars through "Add External Jars" option in NWDS.
Also i tried to add through external library and add that in my WDJ application.
When I tried to build the error: Compilation and build fails. Please see the error message.:
Compile failed; see the compiler error output for details.
Can anybody please suggest teh remidy for this
[Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-689,5,main]]
[EXCEPTION]
C:\Documents and Settings\mnaraya4\workspace.jdi\LocalDevelopment\t2\F867B35130709687F0871E7D15573434\default\logs\build.xml:244: Compile failed; see the compiler error output for details.
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)
at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)
at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:196)
at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:168)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)
at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)
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:592)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)
at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)
at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)
at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:302)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1355)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1337)
at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3653)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:376)
at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:190)
at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:198)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:207)
at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)
at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:188)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:305)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runL(InternalDiiJob.java:207)
at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:194)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
[Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-689,5,main]]Hello Saurav,
Thanks for replying.
Yes, I have gone through this link.
We are using SAP NetWeaver Developer Studio 7.1 SP08 .
We tried to add through the external library.
But again the same error.If iam not adding the jars, its working fine.
But the moment I add the jars (either through the external library or through "Add external jar") option, Its giving error.
Basically 2 error:output for details.
Error1: output for details. [Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-732,5,main]]
Error 2: [Error: com.sap.tc.buildplugin.DefaultPlugin Thread[Worker-732,5,main]]
Please suggest me if i am doing something wrong.
Regards
-sandip -
To import a .jar file in NWDS 7.0
Hi All,
I have to establish connection between NWDS 7.0 and MDM . Therefore, I want some .jar files to be used in my application.
But, I am unable to include them.
Have tried a lot of threads but still am unable to include them.
Please help me.
Thanks and regards,
Shubham Narayan GuptaDear Shubham,
You need to create external library dc to includes external .jar file.
Please refer to below documents :
How to use external libraries in the SAP component model (PART I)
How to use external libraries in the SAP component model (PART II)
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/006a6229-b1ed-2e10-0c8c-cc5673cf268f
Best Regards
Arun Jaiswal -
How to include an external jar file in .EAR project
Hello All,
I have created a web service through java class in sap netweaver 7.1.
For database connection i want to add external jar file as reference. could you all please tell me how to do this or can i get some scenario where it is explained.
Please Help
Regards,
Vanita JainHi Vanita,
open your project in nwds > right click on the project > click on properties option from the menu > click on java build path from the left-side navigation of the window > and click on libraries in the right side tab > here you'll get a button called add external jars > clicking to this, will open browser window to select a jar file.
Regards,
Sen -
Hi,
I have a jar file in the ext folder of BPEL. When i use the class in java embedding activity it says class not found error how do i solve it. Or please tell me the procedure of adding external jars
Edited by: user10545499 on Nov 5, 2008 9:40 PMTo make external Jar files available in your BPEL PM, you could put the files in:
[ORACLE_HOME]\bpel\system\classes
Restart the server, you they are read when BPEL PM is started. If you want them available in the whole J2EE environement, you sould place them in the j2ee enviornment.
Marc
Maybe you are looking for
-
Songs cutting short, play for 1st few seconds and s
Hi, I noticed some of my songs that I've transferred into my muvo v00 are cutting short and would only play for the first 0 or so seconds. I've got the latest firmware and I know that there isn't anything wrong with these songs when I play it on my o
-
Sending rejection back to vendor
Hi, In case of rejection, after usage decision (mvt 122) material is to be send back to vendor. Which T-code is to be used to print delivery challen / hard copy to send with rejected material ?
-
HI everybody I have the problem to replace the old TRANSLATE-command with CL_ABAP_CONV_X2X_CE. Before the code was like: TRANSLATE NAMEN FROM CODE PAGE '1800' TO CODE PAGE '9011'.(in 4.7EE) Under unicode the translate statement is not allowed for
-
I am working with the MIDP PIM API (javax.microedition.pim.*) so in the contacts part, could i define new fields other than the existing standard fields as the Name and Address in an item? I read in the PIM specification that there are extended field
-
Is there a program that can replace entourage?
I tried to install entourage to my computer because i got a new macbook, and to my suprise now i have to have a premium account to use it. And i dont feel like paying the 30 dollars for it, so if someone knows a program to replace entourage or how to