JDBC Data Source – How to set parameters in URL

0

Hello all,

I am running an installation of JasperServer 3.0 and using Oracle 10g as a JDBC Datasource target.

I need to set up one parameter in connection URL but it seems there is no input field nor possible to write it directly into JDBC URL – connection fails then.

Is there any way to do such setup?

Thanky you in advance for any suggestion. 



Post Edited by padacek at 11/10/2009 16:46
padacek's picture
Joined: Nov 10 2009 - 7:35am
Last seen: 4 years 10 months ago

1 Answer:

0

you might want to try to configure ur datasource first in ur server.

1. copy ojdbc14.jar \\jasperserver-3.5.0\\apache-tomcat\\common\\lib

2. edit context.xml in \\jasperserver-3.5.0\\apache-tomcat\\webapps\\jasperserver\\META-INF and add oracle config with the additional parameter on the <url>

    <Resource name="jdbc/oracleDS" auth="Container"               type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"               url="jdbc:oracle:thin:@127.0.0.1:1521:xe"               username="wtf" password="wtf" maxActive="20" maxIdle="10"               maxWait="-1"/>

3. edit web.xml in \\jasperserver-3.5.0\\apache-tomcat\\webapps\\jasperserver\\WEB-INF and add config below

<resource-ref>      <description>Oracle Datasource example</description>      <res-ref-name>jdbc/oracleDS</res-ref-name>      <res-type>javax.sql.DataSource</res-type>      <res-auth>Container</res-auth>     </resource-ref>

4. configure a new jndi in the jasper server data source page.

select "jndi"

specify the name....

specify "jdbc/oracleDS"

5. now you can reference this datasource in ur reports.

hth

 

 

aalmero's picture
Joined: Sep 6 2007 - 4:09am
Last seen: 7 years 2 weeks ago
Feedback
randomness