Thread: Crystal Reports: Connection rejected: FATAL: no PostgreSQL user name specified in startup packet.
Crystal Reports: Connection rejected: FATAL: no PostgreSQL user name specified in startup packet.
With Crystal Reports XI report design application we create reports of a PostgreSQL database. To establish this connection we must use the JDBC driver version 8.0, older versions of JDBC drivers generates errors (This method is not yet implemented).
The Java web application connects to the database also using the 8.0 JDBC driver version. When starting to run an embedded report the following error occurs:
ERROR [datainterface] com.crystaldecisions.reports.reportdefinition.datainterface.h: Logon Error: Connection rejected: FATAL: no PostgreSQL user name specified in startup packet
When replacing (in the Java web application) the 8.0 JDBC driver with an older version 7.3 the logon to the database works fine. But an other problem occurs, because of the fact that the reports are designed against an 8.0 JDBC driver most of the queries are not compatible with the 7.3 JDBC driver version:
select "diagnose"."code", "diagnose"."omschrijving", "episode_diagnose"."diagnose", "episode_diagnose"."datum_diagnose", "kliniek"."code", "kliniek"."naam"
FROM ((("public"."kliniek" "kliniek" LEFT OUTER JOIN "public"."identificatie" "identificatie" ON "kliniek"."code"="identificatie"."kliniek_code") LEFT OUTER JOIN "public"."episode" "episode" ON "identificatie"."id"="episode"."identificatie_id") LEFT OUTER JOIN "public"."episode_diagnose" "episode_diagnose" ON "episode"."id"="episode_diagnose"."episode_id") RIGHT OUTER JOIN "public"."diagnose" "diagnose" ON "episode_diagnose"."diagnose"="diagnose"."code"
ERROR: parser: parse error at or near "{" at character 119
A simple report with no outer join works fine.
Can anyone help us with this issue.
What is the difference considering authentication between driver version 7.3 and 8.0? May be a JDBC driver with the authentication behavior of 7.3 and query handling of 8.0 would help?
Regards,
Mischa
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. |
Rover, Mischa de wrote: > ERROR [datainterface] > com.crystaldecisions.reports.reportdefinition.datainterface.h: Logon > Error: Connection rejected: FATAL: no PostgreSQL user name specified in > startup packet This means that you are passing no user information when trying to make a connection (JDBC does not default to any particular user). It's a bit weird that it works against 7.3, though. If you specify "?protocolVersion=2" in the connection URL against an 8.0 server, does it work? Is Crystal Reports the one that eats all the stack traces? It'd be useful to know the call path that generated this exception. You have a few of choices as to how to pass in the user info: - pass it to DriverManager.getConnection(url, user, password) - pass a "user" property when calling DriverManager.getConnection(url, properties) - pass it in the URL: jdbc:postgresql://host:port/database?user=username I'm not familiar with Crystal Reports so I don't know how you'd configure it to use one of these approaches. Does it let you tweak the connection URL directly? > This message contains information that may be privileged or confidential > and is the property of the Capgemini Group. It is intended only for the > person to whom it is addressed. If you are not the intended recipient, > you are not authorized to read, print, retain, copy, disseminate, > distribute, or use this message or any part thereof. If you receive this > message in error, please notify the sender immediately and delete all > copies of this message. You are sending this message to a public list, so the boilerplate is pointless. (and anyway, what does "RCPT TO" mean if not "intended recipient"?) -O
>- pass it to DriverManager.getConnection(url, user, password) >- pass a "user" property when calling DriverManager.getConnection(url, >properties) These two options can't be used as its done by Crystal Reports at runtime. >- pass it in the URL: jdbc:postgresql://host:port/database?user=username I tried this but getting the same error message Logon Failed. (I am not able to include the message in my server log as it seems to have broken. No messages since yesterday. Not sure why my logging has stopped) -Prasanth. -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Oliver Jowett Sent: Wednesday, March 09, 2005 3:23 PM To: Rover, Mischa de Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Crystal Reports: Connection rejected: FATAL: no PostgreSQL Rover, Mischa de wrote: > ERROR [datainterface] > com.crystaldecisions.reports.reportdefinition.datainterface.h: Logon > Error: Connection rejected: FATAL: no PostgreSQL user name specified in > startup packet This means that you are passing no user information when trying to make a connection (JDBC does not default to any particular user). It's a bit weird that it works against 7.3, though. If you specify "?protocolVersion=2" in the connection URL against an 8.0 server, does it work? Is Crystal Reports the one that eats all the stack traces? It'd be useful to know the call path that generated this exception. You have a few of choices as to how to pass in the user info: - pass it to DriverManager.getConnection(url, user, password) - pass a "user" property when calling DriverManager.getConnection(url, properties) - pass it in the URL: jdbc:postgresql://host:port/database?user=username I'm not familiar with Crystal Reports so I don't know how you'd configure it to use one of these approaches. Does it let you tweak the connection URL directly? > This message contains information that may be privileged or confidential > and is the property of the Capgemini Group. It is intended only for the > person to whom it is addressed. If you are not the intended recipient, > you are not authorized to read, print, retain, copy, disseminate, > distribute, or use this message or any part thereof. If you receive this > message in error, please notify the sender immediately and delete all > copies of this message. You are sending this message to a public list, so the boilerplate is pointless. (and anyway, what does "RCPT TO" mean if not "intended recipient"?) -O ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Prasanth wrote: >>- pass it to DriverManager.getConnection(url, user, password) >>- pass a "user" property when calling DriverManager.getConnection(url, >>properties) > > > These two options can't be used as its done by Crystal Reports at runtime. Right, but I'd assume that CR has some way to configure the user/password it uses if it's using the first form, at least.. >>- pass it in the URL: jdbc:postgresql://host:port/database?user=username > > > I tried this but getting the same error message Logon Failed. > (I am not able to include the message in my server log as it seems to have > broken. > No messages since yesterday. Not sure why my logging has stopped) Strange.. Can you try the protocolVersion=2 approach and see if that works? -O
>Right, but I'd assume that CR has some way to configure the >user/password it uses if it's using the first form, at least.. I do specify the username & password. CR is able to connect to the database at design time. I use JDBC connection even for designing the report. I works great at design time. It is during runtime that the report is not able to connect. It could well be CR bug, I even emailed their tech support but no response. >Can you try the protocolVersion=2 approach and see if that works? Same error message. P.S: I am using postgresql-8.0-310kh.jdbc3.jar driver -Prasanth. -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Oliver Jowett Sent: Wednesday, March 09, 2005 4:19 PM To: Prasanth Cc: Rover, Mischa de; pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Crystal Reports: Connection rejected: FATAL: no PostgreSQL Prasanth wrote: >>- pass it to DriverManager.getConnection(url, user, password) >>- pass a "user" property when calling DriverManager.getConnection(url, >>properties) > > > These two options can't be used as its done by Crystal Reports at runtime. Right, but I'd assume that CR has some way to configure the user/password it uses if it's using the first form, at least.. >>- pass it in the URL: jdbc:postgresql://host:port/database?user=username > > > I tried this but getting the same error message Logon Failed. > (I am not able to include the message in my server log as it seems to have > broken. > No messages since yesterday. Not sure why my logging has stopped) Strange.. Can you try the protocolVersion=2 approach and see if that works? -O ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings