cancel
Showing results for 
Search instead for 
Did you mean: 

Error trying to display reports in JRC

Former Member
0 Kudos

Hi,

We have written some rather complex reports using Crystal Reports 2008. The reports are working well within the report editor, but when we try to run them in a JRC web application, they both fail.

We have 2 different error messages:

Error
Invalid Join Tree node.

and

Error
Unexpected database connector error.

The datasource is a JDBC connection, and the same errors occur with MySQL and Microsoft SQLServer. We use an SQL Command in both reports, to call a stored procedure. We also use subreports. The datasource for both reports is fairly similar, so nothing to explain the different error messages.

After logging the queries in MySQL, I found out that Crystal Reports will send all the required querys, but JRC doesn't send a single SELECT query. The other difference is that JRC sends a CONNECT message multiple times, without sending a password.

32 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
33 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
34 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
35 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
36 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
37 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
38 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
39 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
40 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
41 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
42 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
43 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
44 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
45 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
46 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
47 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
48 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
49 Connect     Access denied for user 'demo'@'localhost' (using password: NO)
50 Connect     demo@localhost on demo
50 Query       SHOW VARIABLES
50 Query       SHOW COLLATION
50 Query       SET NAMES utf8
50 Query       SET character_set_results = NULL
50 Query       SET autocommit=1

We have written other reports using the same SQL Command to call the same Stored Procedure, and they work just fine. There is something special about those reports that we can't figure out.

We use the same JDBC connector for both the report editor and the JRC web application.

I have also written a quick-and-dirty Java viewer application, based on the CR Java Runtime 12.2.200, and the same problem occurs.

Same with previewing the reports in Crystal Reports For Eclipse 2.

Has anybody experienced a similar problem? Is there something obvious that we are missing?

Thank you,

JC

Edited by: Jean-Charles Boude on Mar 9, 2009 5:52 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jean-Charles,

For the problem that you are facing in Crystal Reports for Eclipse 2, please perform the following steps

1>open the report from the CRDesigner and go to

File->Report Options please turn on the following options

convert other null values to default

verify on first refresh

verify stored procedures on first refresh

2>SP! for CR4Eclipse is available at

http://downloads.businessobjects.com

3>Please download it and put the jars in your project and try to view the report again.

Thanks.

Akshara.

Edited by: AksharaP on Apr 29, 2009 11:14 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

I am getting a similar error. It works properly when the report template points to the database, but when I point it to another DB (with exactly the same structure) it fails

03:17:10,140 ERROR crystaldecisions.reports.dataengine - Formula error: recompil

e formulas failed

com.crystaldecisions.reports.formulas.FormulaException: Exception in formula '{@Record_Selection}' at '{BB.COMPONENTNAME}':This field name is not known.

In the java code:


		ReportClientDocument reportClientDoc = new ReportClientDocument();
		reportClientDoc.open(this.template, 0);
        DatabaseController dc = reportClientDoc.getDatabaseController();
        IDatabase db = dc.getDatabase();

    	String JDBC_URL;
    	String UserName;
		String Password;
        switch(type){
        	case 0:	//SIT
		        	JDBC_URL = "jdbc:oracle:thin:@hostname1:6300:dbsid";
		        	UserName = "name";
		    		Password = "password";
		    		break;
        	case 1:	//UAT
		        	JDBC_URL = "jdbc:oracle:thin:@hostname2:6300:dbsid";
		        	UserName = "name";
		    		Password = "password";
		    		break;
		    		break;
		    default:
		    		return;
        		
        }
    	PropertyBag bag = new PropertyBag();
    	String JDBC_Class = "oracle.jdbc.OracleDriver";
    	bag.put(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_jdbc.dll");
    	bag.put(PropertyBagHelper.CONNINFO_SERVER_TYPE, "JDBC (JNDI)");
    	bag.put(PropertyBagHelper.CONNINFO_JDBC_DATABASECLASSNAME, JDBC_Class);
    	bag.put(PropertyBagHelper.CONNINFO_JDBC_CONNECTION_URL, JDBC_URL);

    	ConnectionInfo cinfo = new ConnectionInfo ();
    	cinfo.setUserName(UserName);
    	cinfo.setPassword(Password);
    	cinfo.setAttributes (bag);
        
        
        Map<ITable, ITable> oldNewMap = new HashMap<ITable, ITable>();
        for (Object table : db.getTables()){
        	ITable t = (ITable)((ITable)table).clone(true);
        	//System.out.println("Table=" + t.getName() + "::" + t.getAlias());
        	t.setConnectionInfo(cinfo);
        	oldNewMap.put((ITable) table, t);
        }
        for (Entry<ITable, ITable> e : oldNewMap.entrySet()){
        	dc.setTableLocation(e.getKey(), e.getValue());
        }
        
    	ParameterFieldController pfc = reportClientDoc.getDataDefController().getParameterFieldController();
        pfc.setCurrentValue("", "startTime", startTime);
        pfc.setCurrentValue("", "endTime", endTime);

        PrintOutputController printOutputController = reportClientDoc.getPrintOutputController();
        InputStream is = printOutputController.export(ReportExportFormat.PDF);
        
        FileOutputStream os = new FileOutputStream(new File("output.pdf"));
        int ch;
        while((ch=is.read()) != -1){
        	os.write(ch);
        }


Former Member
0 Kudos

Got round of the problem of multiple failed database logins now, by setting the database username and password to all subreports as well as the main report:


reportClientDocument.getDatabaseController().logon(DB_USER_NAME, DB_PASSWORD);
IStrings subreportNames = reportClientDocument.getSubreportController().getSubreportNames();
for (int i = 0; i < subreportNames.size(); i++) {
  ISubreportClientDocument subreportClientDoc = reportClientDocument.getSubreportController().getSubreport(subreportNames.getString(i));
  subreportClientDoc.getDatabaseController().logon(DB_USER_NAME, DB_PASSWORD);
}

However my main problem is still there, I get the same error message as before, and no query whatsoever is sent to the database:


090311 11:43:17	   2635 Connect     demo@localhost on demo
		   2635 Query       SHOW VARIABLES
		   2635 Query       SHOW COLLATION
		   2635 Query       SET NAMES utf8
		   2635 Query       SET character_set_results = NULL
		   2635 Query       SET autocommit=1
		   2635 Quit

If anybody can make sense of the stack trace, there it is:


03-11@11:43:17 INFO  (            ?:?)     - Time to load report /D:/FullReport2.rpt took 94 ms
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchReportContents
03-11@11:43:17 INFO  (            ?:?)     -  received request: modifyParameterFieldCurrentValuesRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: modifyParameterFieldCurrentValuesRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: getPromptConnInfos
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchSubreportNames
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchSubreportContents
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchSubreportContents
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchSubreportContents
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchSubreportContents
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: setSQLLogonInfoRequest
03-11@11:43:17 INFO  (            ?:?)     -  received request: queryServerCapabilitiesRequest
03-11@11:43:17 DEBUG (            ?:?)     - PageViewRequestHandler has been successfully created
03-11@11:43:17 INFO  (            ?:?)     -  received request: fetchReportPageRequest
03-11@11:43:17 INFO  (            ?:?)     -  attempting to send engine request
03-11@11:43:17 INFO  (            ?:?)     -  successfully sent engine request
03-11@11:43:17 DEBUG (            ?:?)     - Requesting page 1
03-11@11:43:17 DEBUG (            ?:?)     - New page formatter created with view context: ViewContext (Group Path: [])
03-11@11:43:17 ERROR (            ?:?)     -  detected an exception: Invalid Join Tree node.
	at com.crystaldecisions.reports.datafoundation.DFQuery.for(Unknown Source)
	at com.crystaldecisions.reports.datalayer.a.do(Unknown Source)
	at com.crystaldecisions.reports.datalayer.a.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.m.b(Unknown Source)
	at com.crystaldecisions.reports.dataengine.j.b(Unknown Source)
	at com.crystaldecisions.reports.dataengine.m.o(Unknown Source)
	at com.crystaldecisions.reports.dataengine.m.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.ContextNode.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.j.case(Unknown Source)
	at com.crystaldecisions.reports.dataengine.h.<init>(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataContext.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.a(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.new(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.try(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.int(Unknown Source)
	at com.crystaldecisions.reports.dataengine.DataProcessor2.I(Unknown Source)
	at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.fm(Unknown Source)
	at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.if(Unknown Source)
	at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(Unknown Source)
	at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.Y(Unknown Source)
	at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.moveToPageN(Unknown Source)
	at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(Unknown Source)
	at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.byte(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
	at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
	at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
	at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
	at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
	at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
	at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
	at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ds.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(Unknown Source)
	at com.businessobjects.report.web.event.s.a(Unknown Source)
	at com.businessobjects.report.web.event.s.a(Unknown Source)
	at com.businessobjects.report.web.event.bt.a(Unknown Source)
	at com.businessobjects.report.web.event.bw.broadcast(Unknown Source)
	at com.businessobjects.report.web.event.am.a(Unknown Source)
	at com.businessobjects.report.web.a.t.if(Unknown Source)
	at com.businessobjects.report.web.e.a(Unknown Source)
	at com.businessobjects.report.web.e.a(Unknown Source)
	at com.businessobjects.report.web.e.a(Unknown Source)
	at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
	at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)
	at org.apache.jsp.CrystalReportViewer2_jsp._jspService(CrystalReportViewer2_jsp.java:103)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
	at java.lang.Thread.run(Unknown Source)

Not sure what to do next, I guess I'll just keep digging...