Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Invalid connection string format, a valid format is: "host:port:sid"
Invalid connection string format, a valid format is: "host:port:sid" [message #193582] Mon, 02 October 2006 11:03 Go to next message
Eclipse User
Originally posted by: ratz._NOSPAM_drugphish.ch

Hello,

I'm trying to develop what should eventually become a OpenReports plugin
for BIRT reports. Currently I'm facing DB-connection issues ... This is
the error trace thrown back at me:

Oct 2, 2006 4:43:06 PM
org.eclipse.birt.report.model.metadata.StructRefPropertyType validateValue
INFO: The value of the structure property is a string
Oct 2, 2006 4:43:10 PM org.eclipse.birt.data.engine.impl.DataEngineImpl
<init>
INFO: Data Engine starts up
Oct 2, 2006 4:43:11 PM org.eclipse.birt.data.engine.odaconsumer.Driver
setLogConfiguration
INFO: ODA driver does not have valid trace logging defined in the
plug-in .options or plugin.xml file.
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension:
driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension:
driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver ,
connectionFactory=org.eclipse.birt.report.data.oda.sampledb. SampleDBJDBCConnectionFactory
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager
loadAndRegisterDriver
INFO: Loading JDBC driver class: oracle.jdbc.driver.OracleDriver
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/db2jcc.jar.
URL=bundleentry://19/drivers/db2jcc.jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/db2jcc_license_cu.jar.
URL=bundleentry://19/drivers/db2jcc_license_cu.jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/ifxjdbc.jar.
URL=bundleentry://19/drivers/ifxjdbc.jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/jtds-0.9.jar.
URL=bundleentry://19/drivers/jtds-0.9.jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file
drivers/mysql-connector-java-3.0.16-ga-bin.jar.
URL= bundleentry://19/drivers/mysql-connector-java-3.0.16-ga-bin. jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/ojdbc14.jar.
URL=bundleentry://19/drivers/ojdbc14.jar
Oct 2, 2006 4:43:11 PM
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Driv erClassLoader
refreshURLs
INFO: JDBCDriverManager: found JAR file
drivers/postgresql-8.0-310.jdbc3.jar.
URL=bundleentry://19/drivers/postgresql-8.0-310.jdbc3.jar
Oct 2, 2006 4:43:12 PM
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager openConnection
SEVERE: Cannot open connection.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Failed to get
connection.
SQL error #1: Io exception: Invalid connection string format, a valid
format is: "host:port:sid"
;
java.sql.SQLException: Io exception: Invalid connection string
format, a valid format is: "host:port:sid"
at
org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUr l(Connection.java:154)
at
org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connec tion.java:111)
at
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaCo nnection.open(OdaConnection.java:235)
at
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.o penConnection(ConnectionManager.java:140)
at
org.eclipse.birt.data.engine.executor.DataSource.newConnecti on(DataSource.java:129)
at
org.eclipse.birt.data.engine.executor.DataSource.open(DataSo urce.java:117)
at
org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiD ataSource(DataSourceRuntime.java:206)
at
org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSour ce(QueryExecutor.java:247)
at
org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion(QueryExecutor.java:201)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:397)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:147)
at
org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute (PreparedOdaDSQuery.java:135)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:127)
at
org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExec uteQuery(DteDataEngine.java:114)
at
org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.e xecute(AbstractDataEngine.java:208)
at
org.eclipse.birt.report.engine.executor.ExecutionContext.exe cuteQuery(ExecutionContext.java:1640)
at
org.eclipse.birt.report.engine.executor.QueryItemExecutor.ex ecuteQuery(QueryItemExecutor.java:62)
at
org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:79)
at
org.eclipse.birt.report.engine.internal.executor.l18n.Locali zedReportItemExecutor.execute(LocalizedReportItemExecutor.ja va:35)
at
org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout Children(HTMLPageLM.java:123)
at
org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:81)
at
org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:80)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:194)
at org.misc.tool.REtest.createReport(REtest.java:74)
at org.misc.tool.REtest.main(REtest.java:17)
Caused by: java.sql.SQLException: Io exception: Invalid connection
string format, a valid format is: "host:port:sid"
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java: 134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java: 179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java: 333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(Oracle Driver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:31 4)
at
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$Wrap pedDriver.connect(JDBCDriverManager.java:787)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doCo nnect(JDBCDriverManager.java:185)
at
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getC onnection(JDBCDriverManager.java:146)
at
org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUr l(Connection.java:149)
... 24 more

I clearly get the correct DB driver, however the parameter passing of
the connection string format is broken. Does anyone have a clue where I
should be digging into?

HTML and PDF creation work perfectly with simple (non-DMBS access)
reports with this source and also using the BIRT designer inside
Eclipse. The relevant part of the DB connection string from the failing
report looks like follows:

[...]
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="F-B" id="37">
<property
name="odaDriverClass">oracle.jdbc.driver.OracleDriver</property >
<property
name="odaURL">jdbc:oracle:thin:@192.168.1.1:49155/FOOBAR</property >
<property name="odaUser">READER</property>
<encrypted-property
name="odaPassword">Z3dpdHB3</encrypted-property>
</oda-data-source>
</data-sources>
[...]

Regards,
Roberto Nibali, ratz
--
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb313507179010176854228757843 9snlbxq' | dc
Re: Invalid connection string format, a valid format is: "host:port:sid" [message #193603 is a reply to message #193582] Mon, 02 October 2006 11:18 Go to previous message
Eclipse User
Originally posted by: ratz._NOSPAM_drugphish.ch

Replying to myself:

> I clearly get the correct DB driver, however the parameter passing of
> the connection string format is broken. Does anyone have a clue where I
> should be digging into?

I've found the culprit. The ojdbc14.jar JDBC driver bundled in the
birt-runtime-2_1_1 package seems to be broken. I've replaced the
ojdbc14.jar file in
.../birt-runtime-2_1_1/ReportEngine/plugins/org.eclipse.birt .report.data.oda.jdbc_2.1.1.v20060922-1058/drivers
with the oracle client 10.2.0.1 ojdbc14.jar which I found lying on my
platter. Now it works almost perfectly:

INFO: Data Engine starts up
Oct 2, 2006 5:09:29 PM
org.eclipse.birt.data.engine.odaconsumer.Connection close
SEVERE: Cannot
close connection.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Failed to close the
connection.
SQL error #1: Io exception: Socket closed
;
java.sql.SQLException: Io exception: Socket closed
at
org.eclipse.birt.report.data.oda.jdbc.Connection.close(Conne ction.java:286)

at
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaCo nnection.close(OdaConnection.java:325)
at
org.eclipse.birt.data.engine.odaconsumer.Connection.close(Co nnection.java:177)

at
org.eclipse.birt.data.engine.executor.DataSource.close(DataS ource.java:281)

at
org.eclipse.birt.data.engine.executor.DataSource.finalize(Da taSource.java:300)

at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:1 60)
Caused by: java.sql.SQLException: Io exception: Socket closed
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE rror.java:112)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE rror.java:146)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseE rror.java:255)
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:4 80)
at
oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnecti on.java:1175)
at
org.eclipse.birt.report.data.oda.jdbc.Connection.close(Conne ction.java:282)
... 8 more

However, the PDF and HTML output files are successfully created.
Nevertheless, I reckon you BIRT developers would like to fix the above
socket closing issue. At least consider bundling a ojdbc14.jar driver
(for Oracle) that works, into your next BIRT runtime download package.

Best regards,
Roberto Nibali, ratz
--
echo
'[q]sa[ln0=aln256%Pln256/snlbx]sb313507179010176854228757843 9snlbxq' | dc
Previous Topic:Conditional statements in Dynamic Text
Next Topic:how to retrieve db connection metadata
Goto Forum:
  


Current Time: Wed Jul 30 05:25:31 EDT 2014

Powered by FUDForum. Page generated in 0.01969 seconds