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 Join to comment
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

46 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot