cancel
Showing results for 
Search instead for 
Did you mean: 

Problem of generating Crystal Report XI under JBoss 7 with SQL Server 2012

Former Member
0 Kudos

Dear All Experts,

I am a newbies of Crystal Report. Since it is migrating the Crystal Report from exist platform to JBoss 7 with SQL Server 2012.

But the problem that after generating Crystal Report, it throws out the following Exception:

Exception:

15:07:31,130 INFO  [org.apache.struts.tiles.TilesRequestProcessor] (http--127.0.0.1-8080-1) Tiles definition factory found for request processor ''.

15:07:47,444 INFO  [td.etid.internal.report.Rp101Handler] (http--127.0.0.1-8080-1) reportName: C:\u04\tdetid\CrReports\RSrp101.rpt

15:07:47,444 INFO  [stdout] (http--127.0.0.1-8080-1) tableAlias: rp101

15:07:47,444 INFO  [stdout] (http--127.0.0.1-8080-1) OpenReportOptions._openAsReadOnly: 524288

15:07:50,287 ERROR [com.crystaldecisions.reports.reportdefinition.ReportDefinition] (http--127.0.0.1-8080-1) Report printer was not valid, switching to default printer.

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) java.lang.NullPointerException

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at com.businessobjects.samples.JRCHelperSample.addDiscreteParameterValue(Unknown Source)

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at td.etid.internal.report.Rp101Handler.build(Unknown Source)

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at td.etid.internal.servlet.Rp101.doGet(Unknown Source)

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at td.etid.internal.servlet.Rp101.doPost(Unknown Source)

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

15:07:51,599 ERROR [stderr] (http--127.0.0.1-8080-1) at td.etid.internal.servlet.GenericInternalServlet.service(Unknown Source)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

15:07:51,615 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

15:07:51,630 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

15:07:51,630 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

15:07:51,630 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

15:07:51,630 ERROR [stderr] (http--127.0.0.1-8080-1) at java.lang.Thread.run(Thread.java:745)

For my source code,

Hashtable<String, String> env = new Hashtable<String, String>();

env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.as.naming.InitialContextFactory");

env.put(Context.PROVIDER_URL, "");

env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

Context ctx = new InitialContext(env);

DataSource datasource = (DataSource) ctx.lookup(url);

Connection conn = datasource.getConnection();

  stmt = conn.prepareCall(query, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);

  stmt.setTimestamp(1, submissionStart);

  stmt.setTimestamp(2, submissionEnd);

  stmt.setInt(3, batchID);

  stmt.setString(4, insurerID);

  stmt.setInt(5, seqNo);

  rs = stmt.executeQuery();

  if (type.equalsIgnoreCase("preview")) {

  ReportClientDocument clientDoc = new ReportClientDocument();

  String reportName = "C:\\u04\\tdetid\\CrReports\\RSrp101.rpt";

  logger.logInfo("reportName: " + reportName);

  String tableAlias = "rp101";

  System.out.println("tableAlias: " + tableAlias);

  System.out.println("OpenReportOptions._openAsReadOnly: " + OpenReportOptions._openAsReadOnly);

  clientDoc.open(reportName, OpenReportOptions._openAsReadOnly); // throw exception here

  System.out.println("clientDoc.open()");

  //ResultSet

  JRCHelperSample.passResultSet(clientDoc, rs, tableAlias, "");

System.out.println("submissionStart: ");

  if(submissionStart != null) {

  System.out.println("submissionStart: " + df.format(submissionStart));

  JRCHelperSample.addDiscreteParameterValue(clientDoc,

  "@submissionStart", "", df.format(submissionStart));

  } else {

  JRCHelperSample.addDiscreteParameterValue(clientDoc,

  "@submissionStart", "", "");

  }

........

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

For more info,

I am setting the JNDI named as java:/INTERNAL_DS and set in the standalone.xml in JBoss7

and I am trying to use ODBC to connect from Crystal Report through JNDI in JBoss7 to SQL Server 2012.

Since I want to use ODBC, the CRConfig.xml without configuration.

The Crystal Report in Crystal Report Designer can successfully preview. So the Crystal Report is in valid.

Thanks all experts.

former_member183750
Active Contributor
0 Kudos

What version of CR are you using? CR XI is just not enough info... Please go to the Help menu, and quote the exact version you see in About...

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Dear Ludek,

Thanks your reply.

Since I am using Crystal Report XI API (jar files) to deploy with ear,

I am not sure must be installed the Crystal Report XI again to the server machine then running for the Crystal Report.

Why I say that because I cannot find the crdb_jdbc.dll in the Windows 2012 machine

(Not locate at C:\Windows\System32 or C:\Windows\SysWOW64 or any other place in the machine (by using Windows Search).

propertyBag = new PropertyBag();

  propertyBag.put("Trusted_Connection", "false");

  propertyBag.put("Server Type", "JDBC (JNDI)");

  propertyBag.put("Use JDBC", "true");

  propertyBag.put("Database DLL","crdb_jdbc.dll" );

  propertyBag.put("JNDIOptionalName", "INTERNAL_DS");

  propertyBag.put("Connection URL", "jdbc:sqlserver://localhost:1433;DatabaseName=TDIPDEV;SelectMethod=Cursor");

  propertyBag.put("Database Class Name", "com.microsoft.sqlserver.jdbc.SQLServerDriver");

Best Regards,

Bryan

Former Member
0 Kudos

Crystal Report XI - CR Developer

Product Version: 11.5.10.1263

*This Crystal Report Designer is only installed in old windows server.

The new one without installed.

former_member183750
Active Contributor
0 Kudos

The problem is that CR 11.5.x (CR XI R2) is not supported on WIN 2012. See this wiki for more details. The wiki is specific to .NET, but obviously the Supported OS would be the same irrespective. Now, you have a few options:

1) Your version of CR XI R2 is not updated with the last Service Pack (SP 6) - you are on SP 4. SP 6 will give you version 11.5.12.1838. This SP supported WIN 7 (SP 4 did not), so updating to SP 6 may - with luck get things working on WIN 2012. To update to SP 6, see this blog:

Also, see this blog re. issues and reported solutions for WIN 7:

Again, the above is for the retired COM RDC technology, but perhaps there is a nugget in there somewhere that will help you out.

2) Get the latest CR for Eclipse here:

SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download

3) If none of the above helps, consider creating a phone incident here:

http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100

Please note that CR XI R2 is out of support (has been for over two years) so the phone support would only be available for the latest CR for Eclipse (link above).

- Ludek

Former Member
0 Kudos

It is a very helpful information. Thanks a lot.

Former Member
0 Kudos

Since I have deployed the whole set of Windows 2012 with JBoss7 back to Windows 2003 with JBoss 7, the NullPointerException is still occurred, that means the problem should not relate to the Operating System.

Now I have no idea what the problem .

- Bryan

former_member183750
Active Contributor
0 Kudos

Hi Bryan

There is way too much "weird" info here:

I cannot find the crdb_jdbc.dll

Win 2012

SQL Server 2012

Now, I realize from your last post that you are back to WIN2003, but:

SQL Server 2012(?) - not with CR 11.5.x - not supported....

crdb_jdbc.dll missing? Try a custom install of CR, see if you can select ti from there.

- Ludek

Former Member
0 Kudos

Dear Ludek,

After retry and test,

the Program Logic firstly use java Callable Statement to retrieve out the ResultSet, then pass the ResultSet into Crystal Report.

So the JDBC and ODBC have not been used in my application.

After I remark some codes in application and crystal report, the NullPointerException has not raised out again. Actual the Crystal Report Template can generate out the Report, but the correct code in old template cannot full implement in new platform.

* Remind that, the ResultSet I have queried out the result in java code by System.out.println(). So the ResultSet it must have records inside.

Such that, the Formula in Crystal Report 11.5

------------------------------------------------------------------------

IF {rp001.OwnerIDType} = "P" THEN

"Passport"

ELSE IF {rp001.OwnerIDType} = "F" THEN

"Certificate of incorporation"

ELSE IF {rp001.OwnerIDType} = " " THEN

"HKID"

ELSE IF {rp001.OwnerIDType} = "T" THEN

"Transport Assign Number"

------------------------------------------------------------------------

is okay in old platform, but in new platform  {rp001.OwnerIDType} occur error. That means I change the code to

------------------------------------------------------------------------

"Passport"

------------------------------------------------------------------------

The report can generate out.

rp001 is the TableAlias

OwnerIDType (String[10]) is a definition of the .ttx file.

I have tried my best, but the problem cannot be fixed.

Very thanks for your assist.

Bryan

former_member183750
Active Contributor
0 Kudos

Well, you do have the option of creating a phone case here (as long as you are in a supported environment (e.g.; CR 2008 and higher):

Crystal Single Case Technical Support - SAP Business Objects US Online Store | SAP Online Store

If this is a bug, the case will be refunded.

- Ludek

Former Member
0 Kudos

I will ask my senior colleagues to create the case at Technical Support.

Thank very much.

- Bryan