Exception when executing a BIRT report

106 views Asked by At

When trying to run a BIRT report from a PHP page :

new runReport("rptPrixParDaty.rptdesign", array(), "prixpardaty");

then I got this exception inside the generated pdf file :

[[o:Exception]:"java.lang.Exception: Invoke failed: [[c:connectDb]]->getConnection((o:String)[o:String], (o:String)[o:String], (o:String)[o:String], (o:String)[o:String], (o:String)[o:String]). Cause: org.postgresql.util.PSQLException: Erreur de protocole. Ouverture de la session en échec. VM: 1.7.0_45@http://java.oracle.com/" at:
#-21 org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:520)
#-20 org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:181)
#-19 org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
#-18 org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:144)
#-17 org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
#-16 org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
#-15 org.postgresql.jdbc3g.Jdbc3gConnection.<init>(Jdbc3gConnection.java:24)
#-14 org.postgresql.Driver.makeConnection(Driver.java:410)
#-13 org.postgresql.Driver.connect(Driver.java:280)
#-12 java.sql.DriverManager.getConnection(DriverManager.java:571)
#-11 java.sql.DriverManager.getConnection(DriverManager.java:215)
#-10 connectDb.getConnection(connectDb.java:23)
#-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
#-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
#-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
#-6 java.lang.reflect.Method.invoke(Method.java:606)
#-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1044)
#-4 php.java.bridge.Request.handleRequest(Request.java:417)
#-3 php.java.bridge.Request.handleRequests(Request.java:500)
#-2 php.java.bridge.http.ContextRunner.run(ContextRunner.java:145)
#-1 php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)
#0 D:\wamp\www\bazarmada\birt\java\Java.inc(232): java_ThrowExceptionProxyFactory->getProxy(12, 'java.util.HashM...', 'T', true)
#1 D:\wamp\www\bazarmada\birt\java\Java.inc(360): java_Arg->getResult(true)
#2 D:\wamp\www\bazarmada\birt\java\Java.inc(366): java_Client->getWrappedResult(true)
#3 D:\wamp\www\bazarmada\birt\java\Java.inc(560): java_Client->getResult()
#4 D:\wamp\www\bazarmada\birt\java\Java.inc(1752): java_Client->invokeMethod(6, 'getConnection', Array)
#5 D:\wamp\www\bazarmada\birt\java\Java.inc(1851): java_JavaProxy->__call('getConnection', Array)
#6 D:\wamp\www\bazarmada\birt\java\Java.inc(1999): java_AbstractJava->__call('getConnection', Array)
#7 D:\wamp\www\bazarmada\birt\runReport.php(37): Java->__call('getConnection', Array)
#8 D:\wamp\www\bazarmada\birt\runReport.php(37): Java->getConnection('localhost', '3306', 'bazarmada', 'root', '')
#9 D:\wamp\www\bazarmada\ajax\service\ServiceGererProduitGrapheAjax.php(70): runReport->runReport('rptPrixParDaty....', Array, 'prixpardaty')
#10 {main}]

There are 2 databases within my computer : 1 postgresql and 1 MySQL database. The web app is already configured to target the MySQL database. So what is wrong ?

1

There are 1 answers

0
user3660637 On BEST ANSWER

Check that you have correctly configured your URL in your connection string to the PostgreSQL server. Also check the version of the PostgreSQL server and that of the JDBC driver you are using.