on 07-18-2009 8:50 PM
Hi
<br/>
I am having problems with getting SQL Server to work with the JRC (crystal4eclipse). The problem only occcurs when I used the sqljdbc4.jar with java 6. If I used the sqljdbc.jar with java 5 it works fine.
<br/>
<br/>
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType---- Error code:-2147467259 Error code name:failed
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.an.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.b0.if(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.b0.b(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.bb.int(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(Unknown Source)
at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(Unknown Source)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setSQLServerConnectionInfo(JRCReport.java:475)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setDatabaseConnectionInfo(JRCReport.java:358)
at com.ieseries.spc.report.crystal.jrc.JRCReport.openReport(JRCReport.java:148)
... 10 more
Caused by: java.lang.IllegalArgumentException: Unexpected ValueType
at com.crystaldecisions.reports.common.Utils.a(Unknown Source)
at com.crystaldecisions.reports.common.Utils.a(Unknown Source)
at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(Unknown Source)
at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(Unknown Source)
at com.businessobjects.reports.sdk.builder.EROMDatabaseBuilder.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
... 38 more
Ted
That makes sense, I was originally calling the verifyDatabase method prior to exporting the report and this resulted in the same error.
<br/>
I will give the workaround a go when I get chance. Its not a massive issue for me for an immediate fix as we do offer support for the RAS component as well. I am currently just implementing and testing the JRC functionality, in some scenarios the JRC is probably not the best option for our systems anyway.
<br/>
I just wanted to make sure it was not something I was doing. What type of timescales do you do releases on 6 monthly or longer?
regards
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ted,
<br/>
<br/>
I downloaded the latest JRC runtime components as the release notes states that this problem was fixed. Basically there is still a problem, there erorr message has changed slightly but its the same error as below
<br/>
<br/>
thanks
<br/>
Rick
<br/>
<br/>
Caused by: java.lang.RuntimeException: Unexpected ValueType: ValueType=[255]
at com.ieseries.spc.report.crystal.jrc.JRCReport.openReport(JRCReport.java:165)
at com.ieseries.spc.report.crystal.CrystalReport.processCrystalReport(CrystalReport.java:263)
... 9 more
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType: ValueType=[255]---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:739)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:165)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:527)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:525)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:523)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:422)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:350)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.an.a(SourceFile:108)
at com.crystaldecisions.sdk.occa.report.application.b0.if(SourceFile:148)
at com.crystaldecisions.sdk.occa.report.application.b0.b(SourceFile:95)
at com.crystaldecisions.sdk.occa.report.application.bb.int(SourceFile:96)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:543)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3898)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(SourceFile:2906)
at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(SourceFile:51)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setSQLServerConnectionInfo(JRCReport.java:484)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setDatabaseConnectionInfo(JRCReport.java:365)
at com.ieseries.spc.report.crystal.jrc.JRCReport.openReport(JRCReport.java:149)
... 10 more
Caused by: java.lang.IllegalArgumentException: Unexpected ValueType: ValueType=[255]
at com.crystaldecisions.reports.common.Utils.a(SourceFile:97)
at com.crystaldecisions.reports.common.Utils.a(SourceFile:151)
at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(SourceFile:275)
at com.businessobjects.reports.sdk.builder.ConnectionDatabaseBuilder.a(SourceFile:357)
at com.businessobjects.reports.sdk.builder.EROMDatabaseBuilder.a(SourceFile:185)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.byte(SourceFile:1112)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1165)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:659)
... 37 more
Hello Rick,
Due to latency of uploads, the readme file was uploaded before the runtime files.
I've gotten info from the Program Manager that the runtime files should be made available later this week or early next week.
Update 3 (the older update) slightly changed the logging message, to determine what data types were causing problems for a different issue. The value type number listed denotes CRJ internal type numbers, and 255 indicates the type is "Unknown".
Please do try again when Update 4 becomes available.
Sincerely,
Ted Ueda
I am getting the same problem described in this thread and cannot figure out how to fix. I am trying to change the datasource on the fly like mentioned about. The is the error I get:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType: ValueType=[255]---- Error code:-2147467259 Error code name:failed
I am using the eclipse plugin libraries with jre7 and crystal XI. Is there any other solutions to this problem that are possible? Thanks.
-Tyson
p.s. I tried using DBOptions._doNotVerifyDB and that didn't fix the problem either.
I tried to add method replaceConnection to com.businessobjects.samples.CRJavaHelper.java in Report1.rpt
It requires:
either
clientDoc.getDatabaseController().replaceConnection(IConnectionInfo, IConnectionInfo,fields, int);
or
clientDoc.getDatabaseController().replaceConnection(IConnection, IConnection, int);
What value for fields?
Assume DBOptions._doNotVerifyDB is for int.
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello David,
The fields are used when you need to specify stored procedure parameter field values when changing connection properties for stored procedures.
Since the schema returned by a stored procedure isn't specified in the meta information, the Crystal engine needs to call the stored procedure to determine the schema for proper verification and database field mapping.
So if you have a parametrized stored procedure, then you need to specify the field values, or one wouldn't be able to call the stored procedure correctly. There was an issue with older Crystal engines where stored procedures were being called with parameters all set to NULL, that was a bit problematic.
Sincerely,
Ted Ueda
This is taken from the log4j output from the JRC
<br/>
02/10/09 16:27:40 INFO SourceFile:1747 Connection logon:Database DLL=s(crdb_jdbc.dll);Trusted_Connection=s(false);PreQEServerType=s(JDBC (JNDI));Server Type=s(JDBC (JNDI));PreQEServerName=s(jdbc:sqlserver://ibs-rgartside;database=RETAIL;DatabaseName=;);Connection String=s(Use JDBC=b(true);Connection URL=s(jdbc:sqlserver://ibs-rgartside;database=RETAIL);Database Class Name=s(com.microsoft.sqlserver.jdbc.SQLServerDriver);Server=s();User ID=s(retail);Password=;Database=s(retail);Trusted_Connection=b(false);JDBC Connection String=s(!com.microsoft.sqlserver.jdbc.SQLServerDriver!jdbc:sqlserver://ibs-rgartside;database=RETAIL;DatabaseName=;user=;password=!));Use JDBC=s(true);database=s(RETAIL);Database Name=s(RETAIL);Server=s(ibs-rgartside);JDBC CONNECTION STRING=s(!com.microsoft.sqlserver.jdbc.SQLServerDriver!jdbc:sqlserver://ibs-rgartside;database=RETAIL;DatabaseName=;user=;password=!);URI=s(!com.microsoft.sqlserver.jdbc.SQLServerDriver!jdbc:sqlserver://ibs-rgartside;database=RETAIL;DatabaseName=;user=;password=!);User ID=s(RETAIL);Password=
<br/>
Is this enough?
<br/>
I can provide the entire log4j output if you want it?
<br/>
I reckon the original database is oracle
<br/>
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I think I have the issue duplicated and isolated. There may be a possible workaround for now (Update 3 code fix pipe has been closed for a while now, so any fixes won't be in the next upcoming service pack).
The issue happens when the Java Crystal Reports engine does a Verify Database on report creation or database table location change.
So trying to create a report in the CR4E designer using Java 1.6 and sqljdbc4.jar with tables containing the new JDBC 4.0 Types (including NCHAR and NVARCHAR) fails.
The workaround to the issue triggered by setTableLocation is to use DatabaseController.replaceConnection(IConnectionInfo, IConnectionInfo, int), where the third param include the DBOptions._doNotVerifyDB bitfield. This isn't a possibility with some reports, but will generally be applicable.
Thanks for identifying this issue!
Sincerely,
Ted Ueda
HI Ted
I don't use the JRC component from within Eclipse at all. The JRC component is used in a standlone java app and the datasource for the report is modified at runtime to use JDBC. Its not just a case of refreshing the report (if you mean keep the same DB information and refresh the data)<br/>
<br/>
The code is below but is heavily based on the examples provided on the website.
<br/>
<br/>
private final void setSQLServerConnectionInfo(DatabaseController databaseController) throws ReportSDKException {
Tables tables = (Tables) databaseController.getDatabase().getTables().clone(true);
//Set the datasource for all main report tables.
for (int i = 0; i < tables.size(); i++) {
ITable table = tables.getTable(i);
//Keep existing name and alias.
table.setName(table.getName());
table.setAlias(table.getAlias());
//Change properties that are different from the original datasource.
table.setQualifiedName(this.spcEnvironment.getEnvConnectionDetails().getUsername() + ".dbo." + table.getName());
PropertyBag propertyBag = new PropertyBag();
final String CONNECTION_STRING = "Use JDBC=b(true);Connection URL=s(" + this.spcEnvironment.getEnvConnectionDetails().getUrl() + ");" +
"Database Class Name=s(" + this.spcEnvironment.getEnvConnectionDetails().getDriver() + ");Server=s();" +
"User ID=s(retail);Password=;Database=s(retail);Trusted_Connection=b(false);" +
"JDBC Connection String=s(!" + this.spcEnvironment.getEnvConnectionDetails().getDriver() + "!" + this.spcEnvironment.getEnvConnectionDetails().getUrl() + ";" +
"DatabaseName={database};user={userid};password={password}!)";
propertyBag.put("Trusted_Connection", "false");
//propertyBag.put("Server Name", ""); //Optional property.
propertyBag.put("Connection String", CONNECTION_STRING);
propertyBag.put("Database Name", this.spcEnvironment.getEnvConnectionDetails().getUsername());
propertyBag.put("Server Type", "JDBC (JNDI)");
propertyBag.put("URI", "!" + this.spcEnvironment.getEnvConnectionDetails().getDriver() + "!" + this.spcEnvironment.getEnvConnectionDetails().getUrl() + ";DatabaseName={database};user={userid};password={password}!");
propertyBag.put("JDBC Connection String", "!" + this.spcEnvironment.getEnvConnectionDetails().getDriver() + "!" + this.spcEnvironment.getEnvConnectionDetails().getUrl() + ";DatabaseName={database};user={userid};password={password}!");
propertyBag.put("Use JDBC", "true");
propertyBag.put("Database DLL", "crdb_jdbc.dll");
propertyBag.put("PreQEServerName", this.spcEnvironment.getEnvConnectionDetails().getUrl() + ";DatabaseName={database};");
propertyBag.put("Server", SPCCore.getServerAddress().getHostName());
//Change connection information properties.
IConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.setAttributes(propertyBag);
//Set database username and password.
//NOTE: Even if these the username and password properties don't change when switching databases, the
//database password is *not* saved in the report and must be set at runtime if the database is secured.
connectionInfo.setUserName(this.spcEnvironment.getEnvConnectionDetails().getUsername());
connectionInfo.setPassword(this.spcEnvironment.getEnvConnectionDetails().getPassword());
connectionInfo.setKind(ConnectionInfoKind.SQL);
table.setConnectionInfo(connectionInfo);
//Update old table in the report with the new table.
databaseController.setTableLocation(table, tables.getTable(i));
}
databaseController.getDatabase().setTables(tables);
}
<br/>
regards
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops - there's a character length limitation enforced on the forums that munges code entry.
I'm just interested in the Connection strings you're setting in the PropertyBag - any way you can just embed that here?
Thanks for all the info you've provided so far.
By the way, what database connection type is the original report?
Sincerely,
Ted Ueda
cool, thanks Ted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This might not have anything what so ever to do with your problem, so I appoligise if wasting yout time.
But when I was doing sometesting withvarious DB drivers, I got the same problem when retrieving data in the wrong order.
In that the table had columns A, B, C and I tried to retrieve them in theorder B, C, A.
So as I said probably nothing to do with your problem but just caught my eye.
Slight delay in uptake of this issue - but have a bit of time to look at it today.
Currently using JVM 1.6 and sqljdbc4.jar to create a report in Eclipse, then refresh in a stand-alone CRJ app.
Can't duplicate the error so far - I see that the Eclipse Data Source Explorer itself cannot detect the column types for NCHAR, NVARCHAR, or NLONGVARCHAR. But the report itself is consuming the data.
So I'd like to ensure I'm not implicitly remapping out the N* types when refreshing directly in the report itself.
I see set data location in the stack trace - would you be able to code snippet paste the relevant bits?
I need to duplicate here before escalating further.
Sincerely,
Ted Ueda
Thanks for the response, a useful answer that certainly makes sense.
Unfortunately creating views is not really that desirable in my scenario but still a useful work around in some circumstances.
Can anyone from Business Objects confirm whether this issue will be accepted as a bug and maybe shed some light on when a fix will be available?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for the response.
Java version is
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
No its not a web application, its a standalone java application.
SQLServer 2008 is the database version.
Im sure it must be something strange, I just find it odd that it works with the sqljdbc.jar on java 5.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get the same issue.
I think the problem is
1. Microsoft requires you to use sqljdbc4.jar when you are using JRE 1.6 (see [http://msdn.microsoft.com/en-us/library/ms378422.aspx])
2. JRE 6 expands the java.sql.Types class (see [http://java.sun.com/javase/6/docs/api/java/sql/Types.html]; look for Since: 1.6, eg, NVARCHAR
3. Crystal Reports for Eclipse 2.0 is mostly only certified against 1.5, and probably doesn't handle these new Types values.
But according to [http://www.sdn.sap.com/irj/boc/crystalreports-java?rid=/library/uuid/20c69834-cfc4-2b10-da81-960222254295], Tomcat 6.0 is supported with both 1.5 and 1.6, and SQL Server 2008 is supported as well.
Workaround is to create a view in SQL Server 2008 that masks out or casts the new Types (ROWID, NCHAR, NVARCHAR, LONGNVARCHAR, NCLOB, SQLXML).
I downloaded the latest release of crystal4ecllipse and still have the same problem. Can anyone help!
Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected ValueType---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:737)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:163)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:525)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:523)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:521)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:420)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:348)
at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)
at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)
at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)
at com.crystaldecisions.sdk.occa.report.application.an.a(SourceFile:108)
at com.crystaldecisions.sdk.occa.report.application.b0.if(SourceFile:148)
at com.crystaldecisions.sdk.occa.report.application.b0.b(SourceFile:95)
at com.crystaldecisions.sdk.occa.report.application.bb.int(SourceFile:96)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(SourceFile:151)
at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(SourceFile:106)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:2159)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:543)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(SourceFile:3898)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setTableLocation(SourceFile:2906)
at com.crystaldecisions.reports.sdk.DatabaseController.setTableLocation(SourceFile:51)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setSQLServerConnectionInfo(JRCReport.java:479)
at com.ieseries.spc.report.crystal.jrc.JRCReport.setDatabaseConnectionInfo(JRCReport.java:360)
at com.ieseries.spc.report.crystal.jrc.JRCReport.openReport(JRCReport.java:149)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May I know the SQLServer version you are using?
sqljdbc4.jar is supported with sqlserver 2008 on JRE1.6
Also, Make sure that when you are using the sqljdbc4.jar the classpath points to correct JRE.
Is it a web application ? What is the application server version? Check if you meet the supported platform.
Thanks,
Neeraj
Hello,
Can anyone from Business Objects or anyone else confirm if they use the sqljdbc4.jar?
kind regards
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.