facebook

tomcat ignores logging.properties when started from eclipse

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #239235 Reply

    Rob Curry
    Member

    I am running tomcat-5.5.9 on windows XP professional, 1GB RAM, java SDK 1.5. I have configued tomcat from within MyEclipse settings with just the default settings, nothing added to classpath, startup, etc.

    When I start tomcat directly from %TOMCAT_HOME%/bin/startup.bat, tomcat reads %TOMCAT_HOME%/common/classes/logging.properties and creates the appropriate log files. When I start tomcat from Eclipse using MyEclipse Application Server connector, tomcat starts and runs fine in both debug and run mode, but it never creates the log files specified in logging.properties. BTW – log4j config files for deployed applications are always read and logs created.

    MyEclipse Configuration Details:
    *** Date: Wed Oct 12 11:28:18 EDT 2005

    *** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_04

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.0.1 GA
    Build id: 20050930-4.0.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Platform

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse RCP

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Java Development Tools

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Plug-in Development Environment

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse Project SDK

    Version: 3.1.0
    Build id: I20050627-1435

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    108_54
    -data
    C:\data\workspace
    -jvm
    C:\Program Files\Java\jdk1.5.0_04
    -vm
    C:\Program Files\Java\jdk1.5.0_04\bin\javaw.exe

    #239341 Reply

    Riyad Kalla
    Member

    Rob,
    if you navigate to the TOmcat 5 > Paths preferences under MyEclipse prefs, and add the common/classes directory to the classpath (Append to classpath is fine), does it now work?

    #239352 Reply

    Rob Curry
    Member

    @support-rkalla wrote:

    Rob,
    if you navigate to the TOmcat 5 > Paths preferences under MyEclipse prefs, and add the common/classes directory to the classpath (Append to classpath is fine), does it now work?

    No, that did not fix it. I tried both Append and Prepend.

    #239363 Reply

    Riyad Kalla
    Member

    If you drop the properties file into the root of your /src tree, and redeploy your project and restart Tomcat, does that work? (I’m trying to narrow down if this is a classpath issue)

    #239371 Reply

    Rob Curry
    Member

    No, that does not work either.

    #239372 Reply

    Riyad Kalla
    Member

    Did you modify start.bat to perform any additional initialization steps? Do you have the log4j JAR files in your common/lib directory?

    #239377 Reply

    Rob Curry
    Member

    No modifications to start.bat. I have not added commons-logging.jar or log4j.jar to common/lib directory. My applications are setup for log4j, and log4j logging works just fine whatever way tomcat is started.

    I tried adding log4j.jar to common/lib directory. I still don’t get the tomcat logs when starting from MyEclipse. I do get them when starting externally from start.bat. So, no change.

    #239434 Reply

    Scott Anderson
    Participant

    Rob,

    Can you try adding <path-to-tomcat-home>/common/classes as an additional classpath directory on your connector settings at Window > Prefereces > MyEclipse > Application Servers > Tomcat 5 > JDK? It might simply be that Tomcat tries to load the properites file with the classloader and it’s just not on the classpath when starting from within MyEclipse. I don’t believe this directory is added by default.

    #239560 Reply

    Rob Curry
    Member

    I do not understand how is this different from the first response that I received from rkalla. I have tried all options for adding this directory under the Windows > Preferences > MyEclipse > Application Servers > Tomcat 5 > Paths.

    Windows > Preferences > MyEclipse > Application Servers > Tomcat 5 > JDK only provides for adding JVM arguments.

    #239562 Reply

    Riyad Kalla
    Member

    Rob,
    Sorry there was a miscommunication between Scott and myself, these are infact the same suggestion. We are looking into possible causes of this, in the mean time are you able to use remote debugging and external launching as a workaround? http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/remotedebugging/index.html

    #239564 Reply

    Rob Curry
    Member

    Thanks for the clarification. I am able to work around this issue as you suggested, so this is not holding me back.

    #241651 Reply

    Rob Curry
    Member

    rkalla and scott: are you guys still looking in to this problem? I have updated to latest jdk, latest myeclipse, etc., and the problem still exists.

    #241659 Reply

    Riyad Kalla
    Member

    In lui of all the other items we have targetted for 4.1 there currently isn’t anyone assigned specifically to this issue.

    #251051 Reply

    nealkatz
    Member

    Has there been any progress on this bug ?

    My system was working fine, until I upgraded to myeclipse 4.1.1 and then I encountered the same problem.
    My logging.properties filein C:\Tomcat 5.5\common\classes is ignored when I start tomcat from within the IDE.
    It works fine when I start the service outside of Eclipse.

    #251057 Reply

    Riyad Kalla
    Member

    There has not been any update on this, but I will try and push for it.

Viewing 15 posts - 1 through 15 (of 21 total)
Reply To: tomcat ignores logging.properties when started from eclipse

You must be logged in to post in the forum log in