Hi Steinar,

thanks for the update.

Just for the record, how do you define the PostgreSQL datasource ?

Regards
JB

On 11/04/2016 04:15 PM, Steinar Bang wrote:
Steinar Bang <s...@dod.no>:

Platform: Windows 7, Intel i7
          Java SDK 1.8 update 112
          Karaf 4.0.7
          PostgreSQL JDBC driver 9.4.1211.jre7
[snip!]
 karaf@root()> feature:install ukelonn-db-postgresql
 Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=ukelonn-db-postgresql; 
type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; 
filter:="(&(osgi.identity=ukelonn-db-postgresql)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
 [causedby: Unable to resolve ukelonn-db-postgresql/1.0.0.SNAPSHOT: missing requirement [ukelonn-db-postgresql/1.0.0.SNAPSHOT] 
osgi.identity; osgi.identity=org.postgresql.jdbc41; type=osgi.bundle; version="[9.4.1211.jre7,9.4.1211.jre7]"; 
resolution:=mandatory [caused by: Unable to resolve org.postgresql.jdbc41/9.4.1211.jre7: missing requirement 
[org.postgresql.jdbc41/9.4.1211.jre7] osgi.wiring.package; filter:="(osgi.wiring.package=javax.transaction.xa)"]]

The weird part here, is that this started suddenly.  Ie. first it was
working, and then it suddely didn't work anymore.

As far as I can tell javax.transaction.xa is part of the Java runtime,
so there shouldn't be a missing bundle involved.

So far I have tried the following things:

Ie try to fix the things that could have gone wrong.

 - Stopping karaf, delete the data directory of karaf, and restart karaf

I thought all of the karaf state was in the data directory, so that
should be enough... but deleting the data directory didn't help...:-(

 - Stopping karaf, delete the entire karaf directory, unzip a new karaf
   and start it

Ie. removing the entire karaf installation and creating a new one.
Unfortunately didn't help either...:-(

 - Installing a new Java 1.8 update 112 JDK, instead of the JRE 1.8
   update 111 that was found by "java -version"

I initially started with an 1.8 JDK, and then java keeps updating the
JRE when it feels like it, and karaf was running on the newest java RE
at the time it was started.

So I figured maybe it was that karaf now was running on a JRE that was
the problem, and installed the newest Java 1.8 SDK, but that didn't help
either...:-(

[snip!]
I tried running karaf on an i5 with debian jessie, and Java SDK 1.8
(OpenJava), on that setup the ukelonn-db-postgresql feature installed
without complaint.

This proved to me that I wasn't insane when I thought the code had been
starting a little bit earlier.

However, I'm fresh out of things to try.

Has anyone seen something similar?

The only interesting hit I found when searching for "unable to resolve
javax.transaction.xa" was:
 
http://stackoverflow.com/questions/30363304/how-can-i-install-postgresqljdbc-to-work-in-karaf-osgi

But this stackoverflow thread is too old to be relevant:
 - it uses "jdbc" as the feature name, instead of "pax-jdbc"
 - it suggests using "wrap" on an older version of the posgresql JDBC
   driver (the current version is an OSGi bundle and does also register
   an OSGi DataSourceFactory service)


--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to