Created the crowd plugin, connecting to Oracla DB using JNDI.
Deployed the plug in code on \atlassian-crowd-3.0.1\atlassian-crowd-3.0.1\shared\plugins & setup the JNDI in \atlassian-crowd-3.0.1\apache-tomcat using this link : https://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html
Error
Cannot create JDBC driver of class '' for connect URL 'null'
Can you please advice the approach to deploy plug-in & data source location to configure ?
Thanks,
Umesh Kanaujia
Hi Umesh,
Looks like you might be missing the driverClassName attribute on your JNDI resource definition in your context.xml? Please double-check that all the required attributes are set there. The Tomcat documentation has an example in the "Context configuration" section:
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/javatest"/>
Thanks Lukasz.
To fix the issue, we performed the following steps:-
Java Code
Context initContext = new InitialContext();Context envContext = (Context)initContext.lookup("java:/comp/env");DataSource ds = (DataSource)envContext.lookup("jdbc/TestDS");conn = ds.getConnection();
Configuration
Need to made following changes at this location (${atlassian-crowd-3.0.1}\apache-tomcat\conf) :-
web.xml
<resource-ref><description>Oracle Datasource example</description><res-ref-name>jdbc/TestDS</res-ref-name><res-type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></resource-ref>
context.xml
<Resource name="jdbc/TestDS"auth="Container"type="javax.sql.DataSource"username="testuser"password="testuser"driverClassName="oracle.jdbc.OracleDriver"url="jdbc:oracle:thin:@xxx.amazonaws.com:1521:TestDB"maxActive="10"maxIdle="2"removeAbandoned="true"removeAbandonedTimeout="30"maxWait="5000"logAbandoned="true"accessToUnderlyingConnectionAllowed="true"/>
It looks like you're new here. Sign in or register to get started.