Reputation: 171
I want to create BIRT Report which uses JNDI as it's Data Source. I use Tomcat 7 Server and PostgreSQL Database. I searched it at Google but couldn't find any exact instructions I need. I already add the following at the Tomcat's context.xml.
<Resource name="jdbc/myapp" auth="Container" type="javax.sql.DataSource"
driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/myapp"
username="postgres" password="postgres" maxActive="100" maxIdle="30" maxWait="-1" />
Then, I create the Data Source at BIRT Designer. Right Click > New Data Source > JDBC Data Source and enter " jdbc/myapp " at JNDI URL. When I click " Test Connection ", " The selected driver cannot parse the given JNDI Data Source URL. " I have no idea and any help is really appreciated. Thanks in advance!
Upvotes: 1
Views: 4634
Reputation: 1660
From what I understand there are two reasons for seeing that problem.
The report designer does not have the necessary drivers on the class path that match the selected driver on the Edit Data Source dialog. Add this by clicking Manage Drivers on that same dialog.
The jndi resource being referenced is not visible from the designer. The jndi resource is hosted by Tomcat and the designer is not reaching Tomcat by jdbc/myapp. I don't know if it is possible to reach it at all but it be reachable from inside the container once the report is deployed.
Upvotes: 2