It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

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

lpater 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
TAGS
Community showcase
Published in Next-gen

Keyboard shortcuts have arrived for next-gen projects!

...ollected feedback from users around the lack of shortcuts, and we’re here to address that: In next-gen projects, I miss the keyboard shortcuts badly. This is particularly true on the Board, but also i...

102 views 0 1
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you