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
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"/>
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"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.