Re: Need help deploying to Tomcat

From: David Avendasora (webobject..vendasora.com)
Date: Mon Jun 23 2008 - 06:35:09 EDT

  • Next message: Henrique Prange (JIRA): "[OS-JIRA] Created: (WOL-836) "Content Assist" did not complete normally (java.lang.NullPointerException)"

    On Jun 23, 2008, at 4:18 AM, Markus Ruggiero wrote:

    > Hi all,
    >
    > Tried to do my first servlet deployment to Tomcat but failed.
    >
    > What I have done (on Leopard client, Eclipse 3.3.2 with WOLips
    > 3.3.5226):
    >
    > created an out-of-the-box WOLips WO-App named DBTest -> ok
    > created EOModel against one table in a MySQL database -> ok

    How did you tell WOLips (WOProject) that you were deploying to a
    Servlet? You should get properties for your project, select "WOLips
    Build" and at the bottom select the options for "Servlet Deployment"
    and "Autogenerate web.xml"

    > using a WODisplayGroup and a WOBatchNavigationBar to show the
    > contents of the table on the Main page -> ok
    > test application running in direct connect -> ok
    > running ant target "build" (the default) in build.xml -> error
    > message ${classes.dir} not defined (WHY?)

    Don't run these sub-jobs. You are getting this error because you
    haven't compiled yet and put the compiled classes in the defined (in
    build.properties) classes directory. So there's no files to build into
    a jar.

    > running ant target "compileAndBuild" -> everything ok

    Because this compiles, then builds.

    > result is a war-file with all WO frameworks included, great, exactly
    > what I wanted

    What you want to run is the "Install" task. You do this by right-
    clicking on your project, select "WOLips Ant Tools" and then select
    "Install" and it will automatically compile, build and install the
    application into "/Library/WebObjects/Applications" which is the
    location defined in the build.xml file. You can then copy the .war
    file to your Tomcat webapps directory.

    >
    > now for the big test:
    >
    > Installed Tomcat 5.5.26 in WinXP as service, started, no config
    > changes whatsoever
    > Tomcat runs on port 8080 (http://localhost:8080 returns Tomcat page)
    > put the generated war from the Mac into Tomcat webapps dir -> file
    > is automatically unpacked
    >
    > AND NOW??? What URL would I give (working on the PC, local to Tomcat)
    > Tried various things like http://localhost:8080/DBTest, with and
    > without WebObjects, cgi-bin and other combinations
    > All I get is 404-not found

    You would use: http://localhost:8080/DBTest/WebObjects

    >
    > Oh, and just now I realized that catalina.log could have something:
    > INFO: validateJarFile(C:\Programme\Apache Software Foundation\Tomcat
    > 5.5\webapps\DBTest\WEB-INF\lib\javaxml.jar) - jar not loaded. See
    > Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/
    > Servlet.class

    Not sure if this is a real problem or not (I doubt it) but put off
    doing anything about this until you do the above things.

    Dave

    >
    > Ok, something is not correct, but I am no Tomcat/Servlet specialist.
    > What do I miss? What do I have to do to make my app run?
    >
    > Thanks for your help and kudos to the WOLips folks: GREAT JOB, it is
    > really fun to work with WO nowadays
    > ---markus---
    >
    > Markus Ruggiero
    > rucotec consulting and technologies email mailto:markus.ruggier..ucotec.ch
    > rucotec GmbH web http://www.rucotec.ch
    > Steinentorstrasse 8
    > 4051 Basel Mobile +41 (0)79 508 4701
    > Switzerland Phone/Fax +41 (0)61 271 4990
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Jun 23 2008 - 06:35:20 EDT