SAP Knowledge Base Article - Public

1699718 - Log4j is set to Level.ERROR upon first usage of reportClientDocument.open() method

Symptom

  • The root logger of Log4j is set to Level.ERROR upon usage of ReportClientDocument.open() method.
  • The logger does not log any log messages after the call to this method through code.

Environment

  • CrystalReports For Eclipse 2.0
  • JBoss Web Application Server 5.1

Reproducing the Issue

  1. Log4j is configured on the server side with JBoss 5.1 default settings.
  2. The application shares same logger as JBoss Application Server.
  3. Create an instance of
    com.crystaldecisions.reports.sdk.ReportClientDocument.
  4. Execute the open(...) method.
  5. After this point the root logger will be set to Level.ERROR and no
    log messages below this level will be recorded.

Resolution

There is currently no target Fix Pack or Service Pack scheduled for this issue. It has been reviewed by our Product Group and this behavior is not currently targeted for change.

However there is a possible Workaround:

  1. Capture the root loggers level before the open(...) method.
  2. Make call to ReportClientDocument.open()
  3. Set the level captured at step 1 after the call to open(...) method.

Following snippet shows how it can be done:

Level rootLevel=Logger.getRootlogger();
reportClientDocument.open(reportpath,0);
Logger.getRootLogger().setLevel(rootLevel); 

Also see the attached text file.

Keywords

log4j.xml jboss jboss-log4j.xml JRC CR4E log4j.properties ADAPT01636158 ADAPT 01636158 1636158 , KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Problem

Product

Crystal Reports, version for Eclipse 2.0

Attachments

sampleJsp.txt