JNDI Datasource / JDBC in OSGI Karaf

cancel
Showing results for 
Search instead for 
Did you mean: 
mwolf
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://172.22.90.182:3306/jbpmn" />
    <property name="username" value="root" />
    <property name="password" value="admin" />
</bean>

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"
      ext:field-injection="true">
    <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]"/>
</bean>

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

Cheers marcel

1 Reply
gdharley
Intermediate

Re: JNDI Datasource / JDBC in OSGI Karaf

Please post the exact error you are getting.

Thanks,

Greg