Skip to Content
avatar image
Former Member

Crystal Reports Java - replaceConnection

Hi,

I'm trying to integrate a Pervasive SQL Database with Crystal in an Java application covered with Maven.

I have the the Psql driver as a Maven dependency in my Artfactory repository.

I have the scenary where user uploads a File.rpt to the server and I replace their connections by mine that are registered in a DB when him request a PDF exportation of report.

All works well when the PSQL server is in my computer, the problem occours when I have the server in another host. My DB has security enable and I have a user to login, when I try from my host and DB is also in same host, I got success but when it's in different hosts I'm getting a :

[LNA][PSQL][SQL Engine][Data Record Manager]Invalid user authorization specification.

URI is formed by:

URI = "!" + driver + "!jdbc:pervasive://server:port/database;user=%s;password=%s"

In property bag I'm settings

propertyBag.put("Server Name", SERVERNAME); //Optional property.
propertyBag.put("Database Name", DATABASE_NAME);
propertyBag.put("URI", URI);
//propertyBag.put("JDBC Connection String", URI);
//propertyBag.put("Server Type", "JDBC (JNDI)");
propertyBag.put("Use JDBC", "true");
propertyBag.put("Database DLL", DATABASE_DLL);


connectionInfo.setAttributes(propertyBag);

Authentication:

// Set database username and password.
connectionInfo.setUserName(DBUSERNAME);
connectionInfo.setPassword(DBPASSWORD);
connectionInfo.setKind(ConnectionInfoKind.SQL);

from PSQL.

Any ideias to try to solve the problem?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 04, 2017 at 10:40 AM

    Anyone?

    Add comment
    10|10000 characters needed characters exceeded