Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Can't get a servlet to work
Can't get a servlet to work [message #258283] Thu, 12 June 2008 15:50 Go to next message
Eclipse UserFriend
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 #258287 is a reply to message #258283] Thu, 12 June 2008 15:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jim.fayettedigital.com

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.
>
> 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.
Forgot to mention I have this in the source code:

import org.xapian.*;
import org.xapian.errors.*;
Jim.
Re: Can't get a servlet to work [message #258294 is a reply to message #258283] Thu, 12 June 2008 16:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jim.fayettedigital.com

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.
>
I should also probably mention I'm running Ubuntu 8.04, Eclipse 3.2.2
that came with Ubuntu and Tomcat 5.5. I could tell you a lot more but I
don't know what's important.

Jim.
Re: Can't get a servlet to work [message #258307 is a reply to message #258283] Thu, 12 June 2008 18:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jim.fayettedigital.com

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.

Thanks,
Jim.
Re: Can't get a servlet to work [message #258346 is a reply to message #258307] Thu, 12 June 2008 20:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

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
Re: Can't get a servlet to work [message #258441 is a reply to message #258346] Thu, 12 June 2008 20:58 Go to previous message
Eclipse UserFriend
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.
Previous Topic:noob question
Next Topic:Programatic launch of Eclipse application
Goto Forum:
  


Current Time: Sat Oct 19 11:38:03 GMT 2024

Powered by FUDForum. Page generated in 0.08622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top