Thanks for the link. That's odd about the runtime as my generated feature
fine has the h2 bundle and it's installed when the feature file is installed
into karat.
--
View this message in context:
http://karaf.922171.n3.nabble.com/java-lang-ClassNotFoundException-org-h2-Driver-from-bundle-tp4050
That would be Karaf complaining that there is no H2 bundle installed into the
runtime. You will need to include it in a feature somewhere.
For reference you can configure a DBCP pool like this, passing in a DataSource:
https://stackoverflow.com/questions/10807902/configuring-apache-dbcp-poolingd
In my pom I have org.h2
And my pom dependency has:
com.h2database
h2
1.3.174
However, I'm getting the following:
org.osgi.service.resolver.ResolutionException: Unable to resolve root:
missing requirement [root] osgi.id
Hi,
The org.osgi.service.jdbc.DataSourceFactory service is an OSGi standard, not
part of Karaf (hence the org.osgi package name). You can find the specification
chapter in the OSGi compendium. If you look at the H2 bundle you'll also see
that H2 actually implements this standard directly.
Any
Hello Timothy,
Thanks for the quick reply.
The issue is that my manager is pushing me to be container agnostic and to
avoid tying myself to Karaf. Personally, I'd rather use pax-jdbc but I am
not permitted to do so and I agree about your comment regarding code smells
for tying to a specific jdbc
The correct way to obtain instances of JDBC reources is using a
org.osgi.service.jdbc.DataSourceFactory service. This decouples you from a
specific JDBC driver and allows you to pick an appropriate implementation at
runtime. You can inject instances of this service using DS, Blueprint, or get
h
As addendum,
I am not using any data sources in karaf using pax-jdbc. The reason being I
require SQL Server support and opted to do a direct connection via a bundle.
--
View this message in context:
http://karaf.922171.n3.nabble.com/java-lang-ClassNotFoundException-org-h2-Driver-from-bundle-t
Hello,
This is probably a very trivial thing to solve, but I've tried different
things to and to avail.
Basically, I have a bundle which provides a data source using h2 for
testing.
Another bundle uses that authentication bundle to login/logout etc. The
calling bundle is throwing an exception th
Hi all,
We deploy Eclipse RAP application on Apache Karaf 3.0.8 w/ Equinox
framework, so far so good on 1st deployment, but whenever I reinstall the
dependency feature it fails with the following exception:
2017-06-30 12:49:57,282 | ERROR | nsole user karaf | ShellUtil
| 4