views:

27

answers:

2

when i try to show my .rpt report (Crystal Report XI file)in my java desktop application i've the following errors.

when i call this method:

 try{
               ....  //some code that works correctly

        reportClientDoc.getDatabaseController().logon(USERNAME, PASSWORD);

 }
 catch(ReportSDKException ex) {
        System.out.println(ex.getMessage());
        System.out.println(ex.getCause());
        System.out.println(ex);
 }

it throws this Warning and Exception:

log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportdefinition.ReportDocument).

log4j:WARN Please initialize the log4j system properly.

Errore nella ricerca del nome JNDI (D:\Documenti\NetBeansProjects\italpolVigilanza\dbData\italpol.mdb)

com.crystaldecisions.reports.common.JndiNotFoundException: Errore nella ricerca del nome JNDI (D:\Documenti\NetBeansProjects\italpolVigilanza\dbData\italpol.mdb)

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Errore nella ricerca del nome JNDI (D:\Documenti\NetBeansProjects\italpolVigilanza\dbData\italpol.mdb)---- Error code:-2147467259 Error code name:failed

i've only imported log4j.jar in my application. there are some specific preliminary steps that i must do?

pls help me!

A: 

I suspect that the clue is in the earlier error messages, which (according to Google) says "Error in JNDI name search" in Italian.

In short, it would appear that your application is expecting to find the reference to database controller via JNDI, but that it is not there.

By the way, the "error code: -2147467259" is probably just due to the application calling System.exit(-1).

Stephen C
A: 

See this, Java Reporting Component Deployment Guide, especially the section on setting up log4j.
Once you have read the doc you should be able to see error messages in more detail and then report them.

Romain Hippeau