newbie: adding jar files in ETW Servlet project [message #181637] |
Fri, 13 October 2006 07:34  |
Eclipse User |
|
|
|
Originally posted by: peter.kolbe.korasoft.net
WTP Eclipse SDK Version: 3.2.0, Apache Tomcat/5.5.17
Hi experts,
creating and running the sample
HelloWorldServlet extends javax.servlet.http.HttpServlet
is running fine.
Now I'm trying to import a jar file from an external vendor.
At runtime I get an error
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO
What is the normal way to add jar files in Eclipse environment?
Thank you!
Peter
|
|
|
|
|
|
Re: newbie: adding jar files in ETW Servlet project [message #181664 is a reply to message #181660] |
Sat, 14 October 2006 18:33   |
Eclipse User |
|
|
|
Originally posted by: luca.nosp.am
Hello,
I am having a problem related to the adding of jar giles to a Dynamic
Web Page. Currently I am using Eclipse 3.2.1 an WTP 1.5.1, just up to
date today.
The problem is that i added a .jar file to my web-inf/lib directory, but
then when i deploy and run the webapp (i am using tomcat 4.1.27 as
server container), i am getting classnotdeffound exception by all my
servlets: in fact i am seeing that the .jar file (which is properly
shown under the "Web application libraries") does not get deployed.
After i copied manually the .jar file to
<workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp2\webapps \ <projectname>\WEB-INF\libs
then it worked properly.
Why the jar file did not get deployed automatically?
Greetings,
Luca
Konstantin Komissarchik wrote:
> Peter,
>
> That's actually what's supposed to happen. It's an odd behavior, I know,
> but unfortunately we in WTP cannot do anything about it. :( After the
> drag-n-drop, you should see the jar under the "Web Application
> Libraries" node in the Package Explorer. You will not see it under the
> WEB-INF/lib directory unless you switch to the Resource perspective and
> use the Resource Navigator view.
>
> - Konstantin
|
|
|
Re: newbie: adding jar files in ETW Servlet project [message #181670 is a reply to message #181664] |
Mon, 16 October 2006 08:58  |
Eclipse User |
|
|
|
In the future, for what is effectively a new question, I would recommend
starting a new thread.
Based on what you describe, I can't think of any likely reason the jar
wouldn't get published. What would be helpful is to delete the jar
under "/tmp2/webapps/.../WEB-INF/lib" and verify that the jar continues
not to be published. If it still won't publish, open a Bugzilla report
with the details of your environment and attach a copy of the
"publish?.xml" file found under in the
"<workspace>\.metadata\.plugins\org.eclipse.wst.server.core\publish "
directory.
The '2' following "tmp" in your path suggests you may have more than one
Tomcat server at the moment. If there are multiple "publish?.xml"
files, then examine the servers.xml file in the
"<workspace>\.metadata\.plugins\org.eclipse.wst.server.core " directory
to find the "id" attribute associated with the Tomcat 4.1.27 server in
question. Then examine the publish.xml file in the same directory to
find which publish?.xml file is linked to that "id".
After saving a copy for the bug report, you can try deleting the file
and see the publish works any better. This file is where publish
operations cache what has already been copied to avoid copying files
that haven't changed.
Cheers,
Larry
Luca wrote:
> Hello,
>
> I am having a problem related to the adding of jar giles to a Dynamic
> Web Page. Currently I am using Eclipse 3.2.1 an WTP 1.5.1, just up to
> date today.
> The problem is that i added a .jar file to my web-inf/lib directory, but
> then when i deploy and run the webapp (i am using tomcat 4.1.27 as
> server container), i am getting classnotdeffound exception by all my
> servlets: in fact i am seeing that the .jar file (which is properly
> shown under the "Web application libraries") does not get deployed.
> After i copied manually the .jar file to
> <workspace> \.metadata\.plugins\org.eclipse.wst.server.core\tmp2\webapps \ <projectname>\WEB-INF\libs
>
> then it worked properly.
>
> Why the jar file did not get deployed automatically?
>
> Greetings,
> Luca
>
> Konstantin Komissarchik wrote:
>> Peter,
>>
>> That's actually what's supposed to happen. It's an odd behavior, I
>> know, but unfortunately we in WTP cannot do anything about it. :(
>> After the drag-n-drop, you should see the jar under the "Web
>> Application Libraries" node in the Package Explorer. You will not see
>> it under the WEB-INF/lib directory unless you switch to the Resource
>> perspective and use the Resource Navigator view.
>>
>> - Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.04914 seconds