You should provide a little more info about your setup, e.g. "working" vs 
"not working" configs, how you run the camel bundle (bluprint? spring? 
Routebuilders?)

I assume you want to test the route itself not the pax-jdbc setup, then you 
should configure your datasource that way that it can either run from JNDI 
or or a local jdbc-url to make testing easier.
You can the provide a config for test and one for deployment that contains 
either jndi or plain jdbc with e.g. inmemory db of h2 (which can be 
configured to init the db from a file).

Am Donnerstag, 24. August 2017 09:36:05 UTC+2 schrieb 
[email protected]:
>
> Hello everybody,
> i am running pax exam 4 with a karaf 3 container.
> The bundle under test is a camel 2.16.3 bundle.
> The bundle uses a time triggered camel jpa component and pax-jdbc with (XA 
> and pooling) to instantiate the datasource.
> For the test i need some table and some test data in a schema.
> If i run the test with an existing postgres database everything is fine. 
> If i try to instantiate and setup the database first (H2 or Derby) the 
> bundle under test does not 
> find the database with the jndi name:
> javax.naming.NameNotFoundException: osgi:service/javax.sql.DataSource/"(
> osgi.jndi.service.name=jdbc/scv_xa)"
>
> How can i startup and setup the temporary db before the bundle under test 
> is started?
>
> Thanks and best regards
> Karsten
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to