Can't get a servlet to work [message #258283] |
Thu, 12 June 2008 11:50  |
Eclipse User |
|
|
|
Originally posted by: jim.fayettedigital.com
I am just diving into using eclipse with tomcat and have generated a
simple web app. The first thing I did was to add an index.jsp to the
WebContent and add it to the server and publish it. That worked, then I
added a servlet using New->Other->Web->Servlet. That didn't.
It uses the Xapian java bindings jar file which I put in
..../WebContent/WEB-INF/lib and then went into the project properties for
the JXSearch project. I added the jar as a "Add Jars" button on the
libraries tab in the Java Build Path of the properties screen. That
seemed to go OK. It found the file and it is listed when I bring up
that tab again.
I'm getting a couple of error messages displayed on the browser, the
last being:
java.lang.ClassNotFoundException: org.xapian.Query
org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1362)
org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1208)
(truncated)
The full output of the error can be viewed at
http://fayettedigital.com/err.html.
The last line of that output says, "note The full stack trace of the
root cause is available in the Apache Tomcat/5.5 logs." but I can't find
any log files for Tomcat. I've done quite a bit of Tomcat development
in the past and am familiar with a traditional Tomcat install but I
can't figure out where anything is on the Eclipse install. The
$TOMCAT_HOME/logs directory is empty.
If there is more info somewhere I'd sure like to figure out where it is
and if anyone has any idea why it isn't finding or using the jar file,
that would be nice too. Oh here's part of the jar output listing
contents of the xapian jar file:
jar -tf xapian_jni.jar
META-INF/
META-INF/MANIFEST.MF
org/xapian/Database.class
org/xapian/Document.class
org/xapian/Enquire.class
org/xapian/ESet.class
org/xapian/ESetIterator.class
org/xapian/ExpandDecider.class
org/xapian/MatchDecider.class
org/xapian/MSet.class
org/xapian/MSetIterator.class
org/xapian/PositionIterator.class
org/xapian/Query.class
org/xapian/RSet.class
org/xapian/Stem.class
....
org.xapian.Query is surely there.
Thanks,
Jim.
|
|
|
|
|
|
|
Re: Can't get a servlet to work [message #258441 is a reply to message #258346] |
Thu, 12 June 2008 16:58  |
Eclipse User |
|
|
|
Originally posted by: jim.fayettedigital.com
Eric Rizzo wrote:
> Jim Lynch wrote:
>> Jim Lynch wrote:
>>> I am just diving into using eclipse with tomcat and have generated a
>>> simple web app. The first thing I did was to add an index.jsp to the
>>> WebContent and add it to the server and publish it. That worked,
>>> then I added a servlet using New->Other->Web->Servlet. That didn't.
>>>
>>>
>> Here's a bit more confusing information. When I look in the Navigator
>> tab, I do not see the jar file in the .../lib direcory (folder).
>> However when I inspect the .classpath file in the .settings directory
>> I see an entry for that jar file. Yes, the path is correct, I
>> copied/pasted the entry and did an ls to prove it to myself.
>>
>> For some reason the build is not paying attention to the classpath
>> that Eclipse generated.
>>
>> Is there any way I can see what the build step is doing? I think I'm
>> going back to vi, ant and Tomcat. At least I'm able to make that
>> work. I don't see Eclipse as anything more than an impediment to
>> getting my work done.
>
> You might get more response by posting the question(s) to the
> eclipse.webtools newsgroup
>
> Eric
Thanks, I couldn't figure out which group was better.
Jim.
|
|
|
Powered by
FUDForum. Page generated in 0.07825 seconds