JNDI Datasource / JDBC in OSGI Karaf

Showing results for 
Search instead for 
Did you mean: 
Active Member

JNDI Datasource / JDBC in OSGI Karaf

Hello Everybody! I try to change my code to use a nother database instead of h2, but i run in errors. 

I try to set my  datasource in the blueprint to:

<bean id="dataSource" class="org.mariadb.jdbc.Driver">
    <property name="url" value="jdbc:mariadb://" />
    <property name="username" value="root" />
    <property name="password" value="admin" />

when i try to pass it into the processengine configuaration as datasource i got the error that the driver did not know the url property.

My Processengine config:

<reference id="transactionManager" interface="javax.transaction.TransactionManager"/>

<bean id="configuration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration"
    <property name="databaseType" value="h2"/>
    <property name="dataSource" ref="dataSource"/>
    <property name="transactionManager" ref="transactionManager"/>
    <property name="databaseSchemaUpdate" value="true"/>
    <property name="transactionsExternallyManaged" value="true"/>
    <property name="defaultCamelContext" value="defaultContext"/>
    <property name="mailServerHost" value="$[cfg.mailServerHost]"/>
    <property name="mailServerUsername" value="$[cfg.mailServerUsername]"/>
    <property name="mailServerPassword" value="$[cfg.mailServerPassword]"/>
    <property name="mailServerPort" value="$[cfg.mailServerPort]"/>
    <property name="useSSL" value="$[cfg.useSSL]" />
    <property name="useTLS" value="$[cfg.useTLS]" />
    <property name="mailServerDefaultFrom" value="$[cfg.mailServerDefaultFrom]"/>

has anybody an idear how to configure it as datasource in osgi container karaf?

Cheers marcel

1 Reply

Re: JNDI Datasource / JDBC in OSGI Karaf

Please post the exact error you are getting.