Crowd Plugin deployment

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

 

1 comment

Lukasz Pater Atlassian Team Sep 14, 2017

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"/>

Comment

Log in or Sign up to comment
Community showcase
Published Feb 27, 2018 in Crowd

The Crowd team is looking for feedback on Server & Data Center customers' identity strategies!

Do you own more than one Server or Data Center product? Do you have challenges provisioning users across your Atlassian products? Are you spending a lot of time integrating each Atlassian product wit...

1,507 views 6 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you