Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: problems installing tomcat

    i try to install tomcat 5.0.18 on OSX 10.3.2.

    fallowing the instructions at http://jakarta.apache.org/tomcat/tom...doc/setup.html i get this error:

    /tomcat/bin/jsvc-src jrb$ make
    make -C native all
    gcc -g -O2 -DCPU=\"powerpc\" -DOS_DARWIN -DDSO_DYLD -I/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2 -Wall -Wstrict-prototypes -c home.c -o home.o
    home.c: In function `parse':
    home.c:113: error: parse error before "if"
    make[1]: *** [home.o] Error 1
    make: *** [native/all] Error 2

    after this the jsvc binary does not exist.

    thx for the help

    jonas

  2. #2
    Join Date
    Feb 2004
    Posts
    1

    Cool Read the fine source?

    First of all, your compile error is really simple to fix. Just take
    a look at the source code for help.c around line 113 for a minute.

    It looks like someone was in a hurry:

    Code:
            /* Format changed for 1.4 JVMs */
            sp = strchr(ret, ' ');
            if(sp != NULL)
                *sp = '\0'
    Put the semicolon on the end of the last line in that block and
    recompile. You'll get farther. ;-)

    You may also have to do something special to find the jvm.cfg
    if you're on certain platforms using certain versions of Java
    (e.g., 1.4.0_01 on SPARC Solaris). Just find your jvm.cfg and
    put them into location.c like this:

    Code:
        char *location_jvm_cfg[] = {
            "$JAVA_HOME/jre/lib/sparcv9/jvm.cfg", /* JDK SPARC v9 */
            "$JAVA_HOME/jre/lib/sparc/jvm.cfg", /* JDK SPARC */
            "$JAVA_HOME/jre/lib/jvm.cfg", /* JDK */
            "$JAVA_HOME/lib/jvm.cfg",     /* JRE */
            NULL,
        };
    Then I suggest adding -jvm server to your invocation line. For
    those of you who are having coredumps in jsvc --help right after
    it prints the first two lines of the -jvm help information, the code
    change and specifying your JVM may fix your problems. Adding
    the location of the jvm.cfg for Sparc/Sparc V9 fixed my problems
    on Solaris 8 and Solaris 9 with that particular version of the JDK.

    It's going to be a good idea to create specialized versions of
    the Tomcat startup/shutdown scripts to work with jsvc since
    Tomcat.sh is a bit fluffy and light. That's what I wound up
    doing. You can take pretty much whatever you have in
    catalina.sh and glom the other options on top of it, but
    make sure you're setting -user, -home, -pidfile, -jvm, -outfile,
    -errfile, and -cp to something you expect. If you're running more
    than one Tomcat server on a machine, you're going to need to
    configure -pidfile correctly.

    The documentation for jsvc is pretty spare, so I suggest taking
    a look at arguments.c to see what arguments jsvc accepts and
    what it'll pass to Java.

    Anyway ... read the fine source? Sometimes it helps. :-)

    chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •