Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6528967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:35:05+00:00 2026-05-25T09:35:05+00:00

I have an servlet which should log message with log4j. Under development environment (Windows

  • 0

I have an servlet which should log message with log4j. Under development environment (Windows + Eclipse + tomcat), the log4j is working.

When I deploy the servlet into production (AIX + websphere), it didn’t give any log.

I don’t know what happened. What is the possible reason? The war file was created by eclipse after verify the logging function was working in development environment. I want to gather more clues before I deploy it again in production.

The java program didn’t give any clues. I looked up the SystemOut.log, and the log4j loggers were initialized successfully, however, they didn’t say anything went wrong about the log files.

I suspect 2 reasons:

1) the logging directory have drwxr-xr-x privileges, may be the java program don’t the right to create file there?

2) The log4j.properties files was strange. When I looked it up at AIX via vi, I discovered there was a ^M after every line ending. Probably unix don’t need this carriage return character. Maybe this ^M character messed up the things?

EDIT: I found out there are another log file called SystemErr.log. It contained the error message:

[9/1/11 17:07:43:086 HKT] 00000013 SystemErr R log4j:ERROR
setFile(null,true) call failed.

[9/1/11 17:07:43:086 HKT] 00000013
SystemErr R java.io.FileNotFoundException: /bps/log/BpsPdfBill.log
(The file access pe rmissions do not allow the specified action.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:35:05+00:00Added an answer on May 25, 2026 at 9:35 am

    How does it feel being a servlet? 🙂

    On topic: if you place your logfile outside of the folders where WAS unpacks your war file, who is the owner? To be able to write to the directory with those permision, the user was needs to be the owner (and has to have permission to access the parent folders too.)

    The ^M characters are the newlines that are present in DOS/windows, for UNIX thay are whitespace and as such not a problem (just a nuisance) you can add a task in your Ant build file to remove the newlines before you pack the war archive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My situation is: I have a servlet which should not be accessible by unauthentified
I have written code which should call MSSQL 2005 procedure from my servlet. The
We have a servlet which occupies more virtual memory on the server due to
We have a servlet which occupies more virtual memory on the server as it
I have a servlet which takes us to an existing jsp, say home.jsp. This
I have a Java servlet which generates XML, translates it with an XSLT stylesheet,
I have a servlet S which handles callbacks from a 3rd party site. The
I'm programming using GWT, which includes Jetty. I have defined my own servlet and
I have a servlet class which handles login. At the end of my login
I'm working on a GWT project, in which I have to fetch some JSON

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.