Pax exam test failing with gave up waiting for service org.ops4j.pax.exam.ProbeInvoker

2020-06-06 Thread Christian Schneider
I have a pax exam test that fails consistently with "gave up waiting for
service org.ops4j.pax.exam.ProbeInvoker" see exception below.
The strange thing is that just before this exception the pax exam probe
bundle finds my test and registers the ProbeInvoker service.

Any idea what is going on there?

I am using pax exam 4.13.0 and the native container.

Christian

---

2020-06-06 12:26:29,372 DEBUG
org.ops4j.pax.exam.nat.internal.NativeTestContainer Installed bundle
PAXEXAM-PROBE-1964da24-e6fc-4516-b617-578e6e26e5b2 as Bundle ID 42

org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.swissbox.extender.BundleWatcher]
: Scanning bundle [PAXEXAM-PROBE-1964da24-e6fc-4516-b617-578e6e26e5b2]

org.ops4j.pax.logging.pax-logging-api[org.ops4j.pax.swissbox.extender.BundleWatcher]
: Found resources [ManifestEntry{ key=PaxExam-Executable,
value=PaxExam-8603a386-8755-430b-bd65-56d3da212f47, }, ManifestEntry{
key=PaxExam-8603a386-8755-430b-bd65-56d3da212f47,
value=com.adobe.granite.distribution.journal.pipeline.it.osgi.PipelineOSGiTest;test
}]

org.ops4j.pax.exam.extender.service[org.ops4j.pax.exam.raw.extender.intern.Probe]
: Test PaxExam-Executable to be in
PaxExam-8603a386-8755-430b-bd65-56d3da212f47,

org.ops4j.pax.exam.extender.service[org.ops4j.pax.exam.raw.extender.intern.Probe]
: Test PaxExam-8603a386-8755-430b-bd65-56d3da212f47 to be in
PaxExam-8603a386-8755-430b-bd65-56d3da212f47,

org.ops4j.pax.exam.extender.service[org.ops4j.pax.exam.raw.extender.intern.Probe]
: Registering Service: org.ops4j.pax.exam.ProbeInvoker with
Probe-Signature="PaxExam-8603a386-8755-430b-bd65-56d3da212f47" and
expression="com.adobe.granite.distribution.journal.pipeline.it.osgi.PipelineOSGiTest;test"


---

org.ops4j.pax.swissbox.tracker.ServiceLookupException: gave up waiting for
service org.ops4j.pax.exam.ProbeInvoker
at
org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:161)
at
org.ops4j.pax.swissbox.tracker.ServiceLookup.getService(ServiceLookup.java:104)
at
org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:110)
at
org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:84)
at
org.ops4j.pax.exam.junit.impl.ProbeRunner$2.evaluate(ProbeRunner.java:267)
at
org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:98)
at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/CAH6_LNmFDjcgQ48CgYoPg72mV4ifiruZ8nHsmnss9Si%2BfQjE%3Dg%40mail.gmail.com.


Re: Jira or github?

2020-04-28 Thread Christian Schneider
+1 to change to github. We need some rules though to be able to mark issues
as fixed in a certain release.
(I think it can be done with tags on the issues).

Christian

Am Mo., 27. Apr. 2020 um 09:15 Uhr schrieb 'Achim Nierbeck' via OPS4J <
ops4j@googlegroups.com>:

> Hi,
>
> in the past we needed to do a "lock-down" on self-registration for the
> Jira Instance due to tremendous amount of spam in Jira Issues and on the
> confluence pages.
> This increases the burden for people to file new Issues :(
>
> How about changing to github completely for issues and documentation?
>
> regards, Achim
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ops4j/CAD0r13feKZeAJor0EVdTFuqMgur-h2arxmrAjyT4ak8k%2B_WnXg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ops4j/CAD0r13feKZeAJor0EVdTFuqMgur-h2arxmrAjyT4ak8k%2B_WnXg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/CAH6_LNm0uU7Ag1gGHqWg4biN6%3Dgscxp3CnP3Odfce9oTHmOXnQ%40mail.gmail.com.


Re: bundle not resolved due to pax-jdbc while provisioning in karaf

2019-05-10 Thread Christian Schneider
Oh ..sorry .. I meant
serviceRequirements=disable

Christian

Am Do., 9. Mai 2019 um 22:45 Uhr schrieb Christian Schneider <
ch...@die-schneider.net>:

> I dont think this is a race condition.
>
> Is it possible that your bundle has a requirement for the service and that
> pax-jdbc does not provide a suitable capability.
> (As pax-jdbc creates the DataSources from config there is no way how it
> could provide the capability).
>
> The reason why it might work with optional is that then there is no
> mandatory requirement.
>
> Does it help when you set
> serviceRequirements=default
> in the file org.apache.karaf.features.cfg ?
>
> Christian
>
> Am Mi., 8. Mai 2019 um 23:00 Uhr schrieb Kushal Gautam <
> kushal.gau...@gmail.com>:
>
>> Hi:
>>
>> I have a bundle that depends on two different data sources; and broker as
>> well.
>>
>> The bundle starts properly if I copy the osgi bundle into deploy folder
>> or install it using bundle:install . Installing the bundle this
>> way works perfectly fine without any glitch.
>>
>> Instead, I tried to install it as a feature as:
>>
>> 
>> file:D:/temp/stats-mbean-1.0.0.jar
>> 
>>
>>
>> I have created the datasources from "etc/org.ops4j.datasource-*.cfg"
>> config files.
>>
>> I have included the feature, and when I try to install the feature, I get
>> the following error.
>>
>> [caused by: Unable to resolve stats-mbean/1.0.0: missing requirement [
>> stats-mbean/1.0.0] osgi.service; effective:=active; filter:=
>> "(&(objectClass=javax.sql.DataSource)(osgi.jndi.service.name
>> =dw-datasource))"]]
>>
>>
>>
>>
>> I have referenced the datasource in my bundle's blueprint as:
>>
>> 
>>
>>
>>
>> I have tried several stuffs, but I am unable to resolve this issue.
>> Strange thing is, I am able to start the same bundle if I install it
>> manually (copy to deploy folder or bundle:install)..
>>
>> I am not entirely sure if this is an issue of pax-jdbc. If so, do I need
>> to handle such cases specifically in the bundle pom or feature
>> configuration?
>>
>> Any insights on this would be very helpful.
>>
>> Regards,
>> Kushal.
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> 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 ops4j+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com
>> <https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/CAH6_LNmO6of4cJ87GcbeccJGWhf7wUCSnwCjxvo2AQ6xjN%3DHLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: bundle not resolved due to pax-jdbc while provisioning in karaf

2019-05-09 Thread Christian Schneider
I dont think this is a race condition.

Is it possible that your bundle has a requirement for the service and that
pax-jdbc does not provide a suitable capability.
(As pax-jdbc creates the DataSources from config there is no way how it
could provide the capability).

The reason why it might work with optional is that then there is no
mandatory requirement.

Does it help when you set
serviceRequirements=default
in the file org.apache.karaf.features.cfg ?

Christian

Am Mi., 8. Mai 2019 um 23:00 Uhr schrieb Kushal Gautam <
kushal.gau...@gmail.com>:

> Hi:
>
> I have a bundle that depends on two different data sources; and broker as
> well.
>
> The bundle starts properly if I copy the osgi bundle into deploy folder or
> install it using bundle:install . Installing the bundle this way
> works perfectly fine without any glitch.
>
> Instead, I tried to install it as a feature as:
>
> 
> file:D:/temp/stats-mbean-1.0.0.jar
> 
>
>
> I have created the datasources from "etc/org.ops4j.datasource-*.cfg"
> config files.
>
> I have included the feature, and when I try to install the feature, I get
> the following error.
>
> [caused by: Unable to resolve stats-mbean/1.0.0: missing requirement [
> stats-mbean/1.0.0] osgi.service; effective:=active; filter:=
> "(&(objectClass=javax.sql.DataSource)(osgi.jndi.service.name
> =dw-datasource))"]]
>
>
>
>
> I have referenced the datasource in my bundle's blueprint as:
>
> 
>
>
>
> I have tried several stuffs, but I am unable to resolve this issue.
> Strange thing is, I am able to start the same bundle if I install it
> manually (copy to deploy folder or bundle:install)..
>
> I am not entirely sure if this is an issue of pax-jdbc. If so, do I need
> to handle such cases specifically in the bundle pom or feature
> configuration?
>
> Any insights on this would be very helpful.
>
> Regards,
> Kushal.
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com
> <https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ops4j/CAH6_LNnsG4DM7Ux5gJE%3DA8cSu0XN%3DQS6wCSyK-fUi77hQi4%2BnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question to pax-jdbc devs: how do you handle DataSourceFactory bundle restart?

2019-04-30 Thread Christian Schneider
I see no calls to DriverManager in
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/osgi/PGBundleActivator.java

It only registers and unregisters the DataSourceFactory service which looks
correct.
Not sure about the call to Driver.deregister though.
This might cause the issue.

Christian


Am Mo., 29. Apr. 2019 um 18:58 Uhr schrieb Steinar Bang :

> I ran into a problem with the PostgreSQL JDBC driver running as an OSGi
> bundle in karaf:
>  https://github.com/pgjdbc/pgjdbc/issues/1476
>
> In short: the bundle works before restart, but after restart
> DataSouce.getConnection() is unable to find the JDBC driver.
>
> I've debugged through what happens, and the PGBundleActivator() seems to
> do the right thing:
>  1. Call DriverManager.registerDriver() on bundle start
>  2. Call DriverManagerderegisterDriver() on bundle stop
>  3. Call DriverManager.registerDriver() again when the bundle restarts
> (all of these in rt.jar)
>
> However, after the second DriverManager.registerDriver() the
> DriverManager.getConnection(String url, java.util.Properties info,
> Class caller)
> method fails because DriverManager.isDriverAllowed(Driver driver,
> ClassLoader classLoader)
> fails (all of these in rt.jar).
>
> And what fails in the isDriverAllowed() method is the comparison between
> driver.getClass() and Class.forName(driver.getClass().getName()) fails.
>
> Sounds like an OSGi classloader issue...?
>
> How does the pax-jdbc bundles providing a DataSourceFactory handle JDBC
> driver registration and unregistration?
>
> Thanks!
>
>
> - Steinar
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Does pax exam work with junit 5?

2019-02-11 Thread Christian Schneider
I would like to start migrating to junit 5. Does pax exam work with junit 5?
Are there any examples?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Further development of tinybundles

2018-08-19 Thread Christian Schneider
After the release of Tinybundles I wonder if we could remove the dependency
to base store.

The dependency seems innocuous at first but the problem is that base store
is provided as a full base bundle in OSGi. So when you currently deploy
tinybundles in OSGi you are quite tightly coupled to pax exam. I had to
learn this the hard way when I tried to fix the bug with the left over
directories and wondered why it did not seem to be fixed even when I
deployed the new tinybundles and store. I took me a while to realize that
pax exam brings the base bundle which makes it hard to change.

So the first thing to decide is if we need the flexibility of store. After
all the only thing tinybundles does with it is write a Inputstream to a
file and get its url. It never really uses it as a store.
So I think providing a directory for tinybundles where to store these files
would be good enough.

Unfortunately pax exam uses the bundle(Store) initialization. So we also
would need to do that change in pax exam. Do we want to do this?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Planning releases of base and tinybundles in about two weeks

2018-08-19 Thread Christian Schneider
I recently worked on base and tinybundles.
On base the main change is to make sure store does not leave files and
directories behind.
I also removed the dependency to base-io so store now does not have any
dependencies besides the slf4j-api.

For tinybundles I removed the file that was written when wrapping a bundle
with bnd.
I also did quite a few refactorings and also removed the dependency to
base-io. So tinybundles
now only needs base-store.

I would be happy for some people to review my changes before the release.

Christian
-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OpenJPA, Aries Transaction BluePrint, Can only perform operation while a transaction is active

2018-05-16 Thread Christian Schneider
Are you maybe calling this method from the same class? In this case the
interceptor that does the transaction management is not invoked.

Christian

2018-05-16 15:44 GMT+02:00 Alex Soto <alex.s...@envieta.com>:

> Hello,
>
> I am trying to get transaction support for my JPA project.  I get this
> error:
>
> Caused by: org.apache.openjpa.persistence.TransactionRequiredException:
> Can only perform operation while a transaction is active.
> at 
> org.apache.openjpa.kernel.BrokerImpl.assertActiveTransaction(BrokerImpl.java:4723)
> ~[?:?]
> at 
> org.apache.openjpa.kernel.DelegatingBroker.assertActiveTransaction(DelegatingBroker.java:1385)
> ~[?:?]
> at org.apache.openjpa.persistence.EntityManagerImpl.
> flush(EntityManagerImpl.java:663) ~[?:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62) ~[?:?]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43) ~[?:?]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
> at org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke(EmProxy.java:43)
> ~[?:?]
> at com.sun.proxy.$Proxy94.flush(Unknown Source) ~[?:?]
> at Proxy1e882fa8_f541_465e_9200_58ace778aff6.flush(Unknown Source)
> ~[?:?]
>
> My Blueprint XML is:
>
> http://www.osgi.org/xmlns/blueprint/v1.0.0;
> xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0;
> xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;>
>
> 
> 
>
> 
>
> 
>
> 
>
>
> My Service:
>
> import static javax.transaction.Transactional.TxType.REQUIRED;
> import static javax.transaction.Transactional.TxType.SUPPORTS;
> import javax.transaction.Transactional;
> ...
> @Override
> @Transactional(REQUIRED)
> public void updateUser(User user) {
> em.persist(user);
> em.flush();
> }
>
> Log file shows the interceptor:
>
> 48 - org.apache.aries.transaction.blueprint - 1.1.1 | Component
> userService.addUser is txType Supports.
> 48 - org.apache.aries.transaction.blueprint - 1.1.1 | PreCall for bean
> userService, method addUser with tx strategy SUPPORTS.
> 43 - org.apache.aries.jpa.blueprint - 2.6.1 | PreCall for bean
> userService, method addUser
> 45 - org.apache.aries.jpa.support - 2.6.1 | Creating EntityManager for
> persistence unit responderPersistenUnit, coordination
> txInterceptor.org.data.service.UserService.addUser
> 43 - org.apache.aries.jpa.blueprint - 2.6.1 | PostCallWithException for
> bean userService, method addUser
> org.apache.openjpa.persistence.TransactionRequiredException: Can only
> perform operation while a transaction is active.
> at 
> org.apache.openjpa.kernel.BrokerImpl.assertActiveTransaction(BrokerImpl.java:4723)
> ~[?:?]
> at 
> org.apache.openjpa.kernel.DelegatingBroker.assertActiveTransaction(DelegatingBroker.java:1385)
> ~[?:?]
> at org.apache.openjpa.persistence.EntityManagerImpl.
> flush(EntityManagerImpl.java:663) ~[?:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62) ~[?:?]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43) ~[?:?]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
> at org.apache.aries.jpa.support.osgi.impl.EmProxy.invoke(EmProxy.java:43)
> ~[?:?]
> at com.sun.proxy.$Proxy94.flush(Unknown Source) ~[?:?]
> at Proxy1e882fa8_f541_465e_9200_58ace778aff6.flush(Unknown Source)
> ~[?:?]
>
>
> Any idea how to make it work or troubleshoot this?
> Versions:
>
> org.apache.aries.transaction.blueprint: 1.1.1
> org.apache.aries.jpa.blueprint:  2.6.1
> OpenJPA:  2.4.2
>
>
> Thanks in advance
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[pax exam] Running code outside the OSGi container

2018-05-04 Thread Christian Schneider
I would like to have code executed outside of the OSGi container in the
process where junit runs.

This used to work with @BeforeClass in older versions of pax exam. Now
these methods are also run in OSGi.

Is there some way to run my code outside in a generic way?

What I did until now is to extend pax exam an override the run method. Is
there maybe a built in way that avoids this?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pax Web 7.0.0 / Karaf 4.2.0 / Jetty 9.4.6 / Vaadin 8.3.3 / Atmosphere 2.4.11 immidiate expire

2018-04-20 Thread Christian Schneider
Can you provide a sample project that shows the problem?

Christian

2018-04-20 17:17 GMT+02:00 Maurice Betzel <betzelb...@gmail.com>:

>
> <https://lh3.googleusercontent.com/-d1RCALCIILA/WtoEKFBVm-I/Bwc/DFs27_wAf-wKlRzI_RYYMnv2qlAqXCRhQCLcBGAs/s1600/Capture.JPG>
> Pax Web 7.0.0 / Karaf 4.2.0 / Vaadin 8.3.3 / Atmosphere 2.4.11
> Vaadin UI is expiring immediately running the above configuration.
> If i use Karaf 4.1.2 with Pax Web 6.0.9 and Jetty 4.3.x all works well,
> now for the strange part:
>
> I checked out Pax Web from github and atttached a debugger to Karaf. After
> attachment the expire error is gone.
> If a remove the debugger the webpage expires again immediately.
>
> Any ideas :)
>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Some tipps and tricks for writing pax exam OSGi tests

2018-04-17 Thread Christian Schneider
I have just finished an example and docs of some tips and tricks I learned
for writing OSGi tests using pax exam.

Some highlights:

- Mock tests for DS components using Mockito
- Debug pax exam based tests like plain java code (edit, save, debug)
- Full support for hamcrest matchers
- Use Awaitility for polling asynchronous external systems
- Create test bundles with bnd and DS components on the fly using
TinyBundles
- Use logback in pax exam

See
https://github.com/cschneider/osgi-testing-example

Cheers
Christian


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pax JDBC data sources are missing and never get resolved in a Karaf active/active configuration

2018-03-15 Thread Christian Schneider
To use ActiveMQ externally you still need to install the ActiveMQ client on
karaf.
Instead of the full activemq feature you only install activemq-client.

You then also need to setup a JMS ConnectionFactory to connect to the
external instance.
This can be done using the regular karaf jms commands.

Christian

2018-03-15 6:21 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:

> I don't have a multi-node environment available to attempt this (I can't
> disrupt the actual environments I have up and running), so I'd need to test
> this using multiple VMs. At the moment I can't spare the time (or system
> resources) to set that all up.  I will see what I can do about getting
> access to one of the actual multi-node environments, but it may take me a
> while.
>
> I do have a single-node test environment that I can use, though.  So would
> the following simulate the conditions well enough? (I think so)...
> (1) stop Karaf/ServiceMix
> (2) run standalone ActiveMQ process using same JDBC config as for
> Karaf/ServiceMix but with different ports (i.e. allow standalone ActiveMQ
> to acquire the lock to become the master)
> (3) start Karaf/ServiceMix
>
> I believe in step (4) this should cause the single Karaf/ServiceMix
> process to effectively act as the slave, and I would expect to see my
> problem replicated (data sources not initialized).
>
> If that works, then I could try removing ActiveMQ from that
> Karaf/ServiceMix to see if it allows the data sources to start.
>
> (I've never removed ActiveMQ from a Karaf/ServiceMix installation - never
> had the need. Is it as simple as feature:uninstall activemq, or is there
> more to it?)
>
>
> On Sun, Mar 11, 2018 at 12:57 PM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> Can you try to remove activemq from karaf and host it externally? Just to
>> see if it really is the reason.
>>
>> Christian
>>
>> 2018-03-11 5:28 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:
>>
>>> Yes, the Karaf instances are on different machines, and I have removed
>>> Cellar entirely from the system.
>>>
>>> If I simply start up both instances, then everything *except* the data
>>> sources comes up fine on both instances.  Because of this, I am temporarily
>>> running this system as active/failover (karaf.lock=true) until I can get to
>>> the bottom of this data source issue.
>>>
>>> As far as what I see in the logs... on the second node (the one where
>>> the data sources do not initialize), I do see that the cfg's are found, and
>>> there are logging entries stating that they will be initialized, but then
>>> nothing happens. No errors, nothing.
>>>
>>> Then if I then stop node 1, I almost immediately see the data sources
>>> initialize on node 2. (But, of course, if I then restart node 1, same issue
>>> - the data sources do not initialize on *that* node).
>>>
>>> Throughout all of the variations I have tested, there has been one
>>> constant: - ActiveMQ.  It is configured using JDBC master/slave. It doesn't
>>> seem like this should cause Pax JDBC data sources to not initialize
>>> (ActiveMQ is not sharing the data source - entirely separate
>>> configuration), but that's the only thing I can think of: when ActiveMQ
>>> master releases the lock and allows the slave to become the new master,
>>> that's when I see Pax JDBC initialize the data sources. Thoughts?
>>>
>>>
>>> On Fri, Mar 9, 2018 at 2:38 AM, Christian Schneider <
>>> ch...@die-schneider.net> wrote:
>>>
>>>> Are the karaf instances on different machines?
>>>> If they are on different machines and you do not use cellar or
>>>> specially configured locking then both should come up completely
>>>> independent from each other.
>>>>
>>>> Do you see anything in the log of the second instance when you stop the
>>>> first one? I wonder what could trigger the data source come up in this
>>>> moment.
>>>>
>>>> Christian
>>>>
>>>> 2018-03-08 17:30 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:
>>>>
>>>>> Thanks for the quick replies.  With respect to Cellar, I should
>>>>> clarify that the Pax JDBC issue persists whether or not Cellar is involved
>>>>> (Cellar was a recent addition to the system, specifically to see if its
>>>>> explicit support for active/active would resolve the Pax JDBC issue - it
>>>>> did not).
>>>>>
>>>>> I have tried two variations:
>>>

Re: Pax JDBC data sources are missing and never get resolved in a Karaf active/active configuration

2018-03-13 Thread Christian Schneider
Can you try to remove activemq from karaf and host it externally? Just to
see if it really is the reason.

Christian

2018-03-11 5:28 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:

> Yes, the Karaf instances are on different machines, and I have removed
> Cellar entirely from the system.
>
> If I simply start up both instances, then everything *except* the data
> sources comes up fine on both instances.  Because of this, I am temporarily
> running this system as active/failover (karaf.lock=true) until I can get to
> the bottom of this data source issue.
>
> As far as what I see in the logs... on the second node (the one where the
> data sources do not initialize), I do see that the cfg's are found, and
> there are logging entries stating that they will be initialized, but then
> nothing happens. No errors, nothing.
>
> Then if I then stop node 1, I almost immediately see the data sources
> initialize on node 2. (But, of course, if I then restart node 1, same issue
> - the data sources do not initialize on *that* node).
>
> Throughout all of the variations I have tested, there has been one
> constant: - ActiveMQ.  It is configured using JDBC master/slave. It doesn't
> seem like this should cause Pax JDBC data sources to not initialize
> (ActiveMQ is not sharing the data source - entirely separate
> configuration), but that's the only thing I can think of: when ActiveMQ
> master releases the lock and allows the slave to become the new master,
> that's when I see Pax JDBC initialize the data sources. Thoughts?
>
>
> On Fri, Mar 9, 2018 at 2:38 AM, Christian Schneider <
> ch...@die-schneider.net> wrote:
>
>> Are the karaf instances on different machines?
>> If they are on different machines and you do not use cellar or specially
>> configured locking then both should come up completely independent from
>> each other.
>>
>> Do you see anything in the log of the second instance when you stop the
>> first one? I wonder what could trigger the data source come up in this
>> moment.
>>
>> Christian
>>
>> 2018-03-08 17:30 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:
>>
>>> Thanks for the quick replies.  With respect to Cellar, I should clarify
>>> that the Pax JDBC issue persists whether or not Cellar is involved (Cellar
>>> was a recent addition to the system, specifically to see if its explicit
>>> support for active/active would resolve the Pax JDBC issue - it did not).
>>>
>>> I have tried two variations:
>>> (1) Without Cellar, bring up both Karaf nodes without Karaf locking
>>> (karaf.lock=false). (i.e. "unsupported" active/active)
>>> (2) With Cellar, bring up both Karaf nodes without Karaf locking
>>> (karaf.lock=false). (i.e. "supported" active/active)
>>>
>>> In either scenario, the data sources only initialize on the *first* node
>>> that comes up.
>>>
>>> In either scenario, I can confirm that Pax JDBC bundles are started on
>>> both nodes:
>>>
>>> Node 1:
>>> 228 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Generic Driver Extender
>>> 229 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Config
>>> 230 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Pooling Support Base
>>> 270 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC MSSQL Driver Adapter
>>> 271 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Oracle Driver Adapter
>>> 272 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Pooling DBCP2
>>>
>>> Node 2:
>>> 228 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Generic Driver Extender
>>> 229 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Config
>>> 230 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Pooling Support Base
>>> 270 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC MSSQL Driver Adapter
>>> 271 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Oracle Driver Adapter
>>> 272 | Active  |  80 | 1.0.1  | OPS4J Pax
>>> JDBC Pooling DBCP2
>>>
>>> However, jdbc:ds-list only shows the initialized data sources on node 1;
>>> on node 2 *no* data sources are initialized, and I have multiple bundles in
>>> GracePeriod waiti

Re: Pax JDBC data sources are missing and never get resolved in a Karaf active/active configuration

2018-03-09 Thread Christian Schneider
Are the karaf instances on different machines?
If they are on different machines and you do not use cellar or specially
configured locking then both should come up completely independent from
each other.

Do you see anything in the log of the second instance when you stop the
first one? I wonder what could trigger the data source come up in this
moment.

Christian

2018-03-08 17:30 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:

> Thanks for the quick replies.  With respect to Cellar, I should clarify
> that the Pax JDBC issue persists whether or not Cellar is involved (Cellar
> was a recent addition to the system, specifically to see if its explicit
> support for active/active would resolve the Pax JDBC issue - it did not).
>
> I have tried two variations:
> (1) Without Cellar, bring up both Karaf nodes without Karaf locking
> (karaf.lock=false). (i.e. "unsupported" active/active)
> (2) With Cellar, bring up both Karaf nodes without Karaf locking
> (karaf.lock=false). (i.e. "supported" active/active)
>
> In either scenario, the data sources only initialize on the *first* node
> that comes up.
>
> In either scenario, I can confirm that Pax JDBC bundles are started on
> both nodes:
>
> Node 1:
> 228 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Generic Driver Extender
> 229 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Config
> 230 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Pooling Support Base
> 270 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC MSSQL Driver Adapter
> 271 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Oracle Driver Adapter
> 272 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Pooling DBCP2
>
> Node 2:
> 228 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Generic Driver Extender
> 229 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Config
> 230 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Pooling Support Base
> 270 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC MSSQL Driver Adapter
> 271 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Oracle Driver Adapter
> 272 | Active  |  80 | 1.0.1  | OPS4J Pax
> JDBC Pooling DBCP2
>
> However, jdbc:ds-list only shows the initialized data sources on node 1;
> on node 2 *no* data sources are initialized, and I have multiple bundles in
> GracePeriod waiting for data sources that never show up. For example, on
> node 2:
>
> admin@root>diag 331
> SKU Resolution (331)
> ---
> Status: GracePeriod
> Blueprint
> 3/8/18 11:10 AM
> Missing dependencies:
> (&(dataSourceName=PRODUCTDS)(objectClass=javax.sql.DataSource))
>
>
> The "org.ops4j.datasource-PRODUCT.cfg" config file is present and
> identical on both nodes. I see the data source initialization occur in node
> 1's log, but nothing in node 2's log.  As soon as I bring down node 1, then
> I see the data sources on node 2 initialize.
>
> Could this have anything to do with ActiveMQ master/slave? That's the only
> constant here. It seems unlikely, but I'm out of ideas.
>
>
>
> On Thursday, March 8, 2018 at 2:32:39 AM UTC-5, Jean-Baptiste Onofré wrote:
>>
>> Hi,
>>
>> Cellar syncs the bundles and config on the cluster.
>>
>> By default, it doesn't sync "local" config (basically the etc/*.cfg
>> files). To do so, you have to enable the local listener in etc/
>> org.apache.karaf.cellar.groups.cfg.
>>
>> Else, you have to use cluster:config-property-set to create the config on
>> the cluster.
>>
>> Regards
>> JB
>>
>> On 03/08/2018 08:22 AM, Christian Schneider wrote:
>>
>> I am not experienced with cellar but generally I would expect that in an
>> active/active setup both machines start the same services.
>>
>> So first thing to check is if the pax-jdbc features and bundles are
>> active on the second node. If they are active you can check the log to see
>> if pax-jdbc reports that something is missing.
>>
>> When you describe that the datasources on the second machine come up when
>> the first machine goes down it sounds like you have setup something like a
>> master slave setup in cellar.
>>
>> Christian
>>
>> 2018-03-07 22:55 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:
>>
>>> I really like the approach that Pax JDBC introduced for managing data
>>

Re: Pax JDBC data sources are missing and never get resolved in a Karaf active/active configuration

2018-03-07 Thread Christian Schneider
I am not experienced with cellar but generally I would expect that in an
active/active setup both machines start the same services.

So first thing to check is if the pax-jdbc features and bundles are active
on the second node. If they are active you can check the log to see if
pax-jdbc reports that something is missing.

When you describe that the datasources on the second machine come up when
the first machine goes down it sounds like you have setup something like a
master slave setup in cellar.

Christian

2018-03-07 22:55 GMT+01:00 Matthew Zipay <mzi...@gmail.com>:

> I really like the approach that Pax JDBC introduced for managing data
> sources, but I am running into an issue that may require me to abandon it
> if I can't get it resolved.
>
> My setup is as follows:
> ServiceMix 7.0.1 (Karaf 4.0.9) running on two nodes, clustered with Cellar
> (active/active). ActiveMQ is JDBC master/slave. Using Pax JDBC 1.0.1
> (config, pool, and oracle and mssql adapters).
>
> I have five (5) data sources configured for the various databases in use
> by this system. What I see is that the data sources are only available on
> the *first* node in the cluster that comes up.  When the second node comes
> up, even though it also has the data source cfg's, the data sources never
> get initialized, and all of my bundles that use the data sources are stuck
> perpetually in GracePeriod waiting on the data sources (confirmed with
> bundle:diag).
>
> If I bring down the first node, *then* the data sources on the second node
> suddenly spring to life and all's well.  But this is not the behavior I
> would desire or expect, and it may be showstopper for me w/r/t Pax JDBC.  I
> need those data sources available on both nodes.
>
> Is this expected? If not, any ideas how I can work around it?
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PAX Exam OSGI Components

2018-02-22 Thread Christian Schneider
Check out the ServiceComponentRuntime service. It is implemented by felix
scr and allows you to introspect the status of any DS component.

http://javadox.com/org.osgi/osgi.cmpn/6.0.0/org/osgi/service/component/runtime/ServiceComponentRuntime.html

I am using this in my itests to list all components with unsatisfied
references.

Actually I think it would be a good option for pax exam to print out the
status of all DS components when a service can not be injected into a pax
exam OSGi test.

Christian

2018-02-22 12:18 GMT+01:00 nino martinez wael <nino.martinez.w...@gmail.com>
:

> its exactly checking for presence of components and seeing their state
> (activated / disabled etc)
>
> On Wed, Feb 21, 2018 at 12:59 PM, Oliver Lietz <i...@oliverlietz.de>
> wrote:
>
>> On Wednesday 21 February 2018 10:47:05 'Christoph Läubrich' via OPS4J
>> wrote:
>> > This depends on the DS-Provider you use e.g. the apache felix one has an
>> > API for this and if I rember right it is also standarized in OSGi-R7
>> >
>> > See
>> > http://felix.apache.org/documentation/subprojects/apache-
>> felix-service-compo
>> > nent-runtime.html#api-use
>> >
>> > This is nothing special in pax exam so you can simply use
>> >
>> > @Inject
>> > private ScrService service;
>>
>> Waiting for components to be present (activated) in tests is a useful
>> feature
>> indeed.
>>
>> One possible way: we could register proxy services for those components.
>>
>> Any other ideas?
>>
>> Regards,
>> O.
>>
>> > Am 20.02.2018 um 13:46 schrieb nino martinez wael:
>> > > Ok.. When using Pax exam I can write @inject MyOwnService service..
>> Then
>> > > pax exam will inject the service into the test once karaf are bootet
>> > > etc... Im wondering if there's a way to do that with components..
>> > >
>> > > Den tirsdag den 20. februar 2018 kl. 12.36.59 UTC+1 skrev
>> Jean-Baptiste
>> > >
>> > > Onofré:
>> > > Not sure I understand what you mean.
>> > >
>> > > If you use Karaf pax exam container it's as when you are a vanilla
>> > > Karaf.
>> > >
>> > > Regards
>> > > JB
>> > > Le 20 févr. 2018, à 12:00, nino martinez wael
>> > >
>> > > <nino.mart...@gmail.com > a écrit:
>> > > Hi
>> > >
>> > > Are there anyway to get declarative services components? Both
>> > > the component itself but also the reference where you can
>> start
>> > > and stop it?
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OPS4J" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/ops4j/Zyr8HNfrGPM/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Best regards / Med venlig hilsen
> Nino Martinez
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I set a specific name for the pax exam probe bundle?

2018-02-21 Thread Christian Schneider
I can create the mapping at runtime but then I have to somehow wait until
it is processed asynchronously before I can try the login.

Christian

2018-02-21 12:32 GMT+01:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> The name is derived from the Exam-System with createID but I think that
> can't be accessed from your test.
> You might be able to set it by providing an own ProbeBuilder. But can't
> you simply create the mapping at runtime? e.g. with a @Before you can fetch
> the current Bunlde name (via injected BundleContext) and then create the
> mapping?
>
> Am 21.02.2018 um 12:26 schrieb Christian Schneider:
>
>> Just for some background on what I try to do:
>> I am doing a test with sling (OSGi) in pax exam.
>> There I need to do a login into the jcr repository using a service user.
>> To be able to do that I need to create a so called usermapping.
>> There I configure that if a bundle with a specific symbolic name tries to
>> login, map it to a certain user.
>>
>> The problem now is that I can not predict the name of the probe bundle.
>> Is there a way to either set this name or to get it during the pax exam
>> configuration?
>>
>>
>> Christian
>>
>>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> --- 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can I set a specific name for the pax exam probe bundle?

2018-02-21 Thread Christian Schneider
Just for some background on what I try to do:
I am doing a test with sling (OSGi) in pax exam.
There I need to do a login into the jcr repository using a service user.
To be able to do that I need to create a so called usermapping.
There I configure that if a bundle with a specific symbolic name tries to
login, map it to a certain user.

The problem now is that I can not predict the name of the probe bundle. Is
there a way to either set this name or to get it during the pax exam
configuration?


Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Support for starting and stopping docker containers during tests

2018-02-16 Thread Christian Schneider
I did some research and found these projects:
- https://github.com/geowarin/docker-junit-rule
- https://github.com/palantir/docker-compose-rule

The first project is just a one man show but the second seems to have a
community behind it.
Both allow to start docker from the junit test.

There is also this article from codecentric:
-
https://blog.codecentric.de/en/2017/03/writing-integration-tests-docker-compose-junit/

Anyway it seems that maybe there are already good libraries out there.
Does any of you have tested any of these or used something else?

Christian


2018-02-16 12:39 GMT+01:00 Christian Schneider <ch...@die-schneider.net>:

> At Adobe we created a small project to start docker containers before a
> junit test and reliably stop them after the test. As this is of very
> general use I wonder if it would make sense to open source this. I am
> currently checking internally if we can do this.
>
> In parallel I also wanted to check if there are existing alternatives out
> there and if none are suitable as a replacement if the ops4j community
> would be interested to host such a project.
>
> I am pretty sure that there is already good support to manage docker
> instances as a maven plugin. One interesting property of our impl is that
> the start / stop of docker is controlled from java. So you can simply run
> the junit test from eclipse and it does the docker management transparently.
>
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Support for starting and stopping docker containers during tests

2018-02-16 Thread Christian Schneider
At Adobe we created a small project to start docker containers before a
junit test and reliably stop them after the test. As this is of very
general use I wonder if it would make sense to open source this. I am
currently checking internally if we can do this.

In parallel I also wanted to check if there are existing alternatives out
there and if none are suitable as a replacement if the ops4j community
would be interested to host such a project.

I am pretty sure that there is already good support to manage docker
instances as a maven plugin. One interesting property of our impl is that
the start / stop of docker is controlled from java. So you can simply run
the junit test from eclipse and it does the docker management transparently.

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to restrict access to sun.misc.Unsafe when using PaxExam ?

2017-11-23 Thread Christian Schneider
Do you maybe use boot delegation?

Christian

2017-11-23 11:06 GMT+01:00 'Norman Maurer' via OPS4J <ops4j@googlegroups.com
>:

> Hmm I do not export it... Can I somehow see "who" export it ?
> I only run the unit test and add my bundle to the config thats it.
>
>
> Am Donnerstag, 23. November 2017 11:00:02 UTC+1 schrieb Achim Nierbeck:
>>
>> Hi,
>>
>> first of all, if you don't have a bundle or system-fragment-bundle
>> exporting sun.misc* it won't be available at all.
>> As per default the framework itself only provides following packages
>> (defined per spec):
>> java.*
>> As you can see here[1]
>> some more are per default exported. But sun.misc isn't one of them.
>> So unless you don't have any special setup sun.misc shouldn't be
>> available to your setup :)
>>
>> regards, Achim
>>
>> [1] - https://github.com/apache/felix/blob/trunk/framework/src/
>> main/resources/default.properties#L711-L865
>>
>> 2017-11-23 10:54 GMT+01:00 'Norman Maurer' via OPS4J <
>> op...@googlegroups.com>:
>>
>>> Hi all,
>>>
>>> I am trying to use @RunWith(PaxExam.class) and restrict the access to
>>> sun.misc.Unsafe while doing this. I want to do this to write a unit that
>>> ensure we are still able to init a class when sun.misc.Unsafe is not
>>> present. Any idea how to do this ? So far I could not find any way to do so.
>>>
>>> This is the issue I want to write a unit test for:
>>>
>>> https://github.com/netty/netty/pull/7432
>>>
>>> Thanks
>>>
>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - op...@googlegroups.com
>>>
>>> ---
>>> 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 ops4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Fwd: [paxjdbc] Bugfix release 1.2.1

2017-10-31 Thread Christian Schneider
Hi Grzegorz,

there is no 1.3.0 version in jira for further issues. Could you create one?

Christian


2017-10-31 8:08 GMT+01:00 Grzegorz Grzybek <gr.grzy...@gmail.com>:

> Hello
>
> I've just released pax-jdbc 1.2.1 - should be available in Maven Central
> within 1-2 hours.
>
> best regards
> Grzegorz Grzybek
>
>
> 2017-10-30 17:26 GMT+01:00 Benjamin Graf <graben1...@gmail.com>:
>
>> Perfect! ;-)
>>
>> Thx Benjamin
>>
>>
>> Am 30.10.2017 um 17:09 schrieb Grzegorz Grzybek:
>>
>>
>>
>> 2017-10-30 17:04 GMT+01:00 Benjamin Graf <graben1...@gmail.com>:
>>
>>> Hi,
>>>
>>> I'm talking about PAXJDBC-127 which was fixed quite after 1.2.0 has been
>>> released. IMHO a version 1.2.1 should be released because pooling is
>>> unusable with 1.2.0.
>>>
>>
>> Thanks for info - I'll review unassigned issues, check which were already
>> resolved in 1.2.0 and prepare a release - I hope tomorrow, ok?
>>
>> regards
>> Grzegorz Grzybek
>>
>>
>>
>>>
>>> Regards,
>>> Benjamin
>>>
>>>
>>> Am 30.10.2017 um 16:21 schrieb Grzegorz Grzybek:
>>>
>>> Hello
>>>
>>> I don't see (yet) version 1.2.1 in PAXJDBC project. Which issue are you
>>> thinking about? I can perform a release if needed, but looks like I have to
>>> review recently fixed issues and create both version 1.2.0 and 1.2.1 (in
>>> JIRA).
>>>
>>> regards
>>> Grzegorz Grzybek
>>>
>>> 2017-10-28 9:02 GMT+02:00 Benjamin Graf <graben1...@gmail.com>:
>>>
>>>> Hi everybody,
>>>>
>>>> will there be an official bugfix release 1.2.1 that fixes the pooling
>>>> bug in 1.2.0?
>>>>
>>>> Regards,
>>>> Benjamin
>>>> --
>>>> --
>>>> --
>>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>>
>>>> ---
>>>> 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 ops4j+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "OPS4J" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/ops4j/PEg4yqiTGhY/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> ops4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>
>>> ---
>>> 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 ops4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OPS4J" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/ops4j/PEg4yqiTGhY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> 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 ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Missing licsense in pax project sources and releases

2017-10-22 Thread Christian Schneider
I am looking into this issue:
https://ops4j1.jira.com/browse/BASE-40

I fixed the license in the binary package by using the same resource plugin
as in tinybundles.

We still have a gap though I think.

1. The source packages do not include a license. Does anyone know how to
achieve this?
2. The source in github does not include a LICENSE file. Should I add it?
Do we need to add more than that?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Need new ops4j base version 1.6.0 in jira

2017-10-20 Thread Christian Schneider
I would like to set some issues to a new ops4j base version. Can someone
create it?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pax exam: Problem with unwanted import when using TinyBundles with a custom BuildStrategy

2017-10-20 Thread Christian Schneider
Hi Christoph,

2017-10-20 14:11 GMT+02:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> We might circumvent the problem in the future since I'm working on a
> feature that allows the seperation of Test-Class + Configure Method, this
> ill then also break the runtime dependencies between classes in the
> configure method and the test it self.
>

That sounds very good. I think that will also avoid some other cases where
I had problems.

>
> A similar problem arises if you use the pax-cm module, even though it is
> not required for the run of the test you have to include it because of the
> usage in the configure method.


I have not yet encountered this problem.  When I used the cm module I did
not have to install it at runtime.

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem with StreamFactory in base.store

2017-10-20 Thread Christian Schneider
I just tried to upgrade pax exam to the current snapshot of the base
modules to test a change I plan to do in the exec module.

Some of the tests fail with the exception below. This seems to be because
of the introduction of StreamStore in base.store. This happens if a bundle
like tinybundles 3.0.0 is compiled against base.store 1.5.0 but is then run
with base 1.5.1. I propose to revert this commit and go back to
Store.

In general we should also think of ways to make us more independent of such
changes in util modules. I have seen an approach in the brave project where
they always embed util packages
with a changes name to make it unique. I think this is a very good approach
to make the code modular by minimising runtime dependencies. Unfortunately
their approach does not work with the maven bundle plugin out of the box.
See
https://github.com/openzipkin/zipkin/blob/master/zipkin/pom.xml#L153-L154

Christian

---
java.lang.NoSuchMethodError:
org.ops4j.store.StoreFactory.anonymousStore()Lorg/ops4j/store/Store;
at
org.ops4j.pax.tinybundles.core.TinyBundles.getDefaultStore(TinyBundles.java:104)
at org.ops4j.pax.tinybundles.core.TinyBundles.bundle(TinyBundles.java:50)
at
org.ops4j.pax.exam.forked.ForkedFrameworkFactoryTest.generateBundle(ForkedFrameworkFactoryTest.java:154)
at
org.ops4j.pax.exam.forked.ForkedFrameworkFactoryTest.forkWithBootClasspath(ForkedFrameworkFactoryTest.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:539)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:761)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:461)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:207)


-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Comments with spam in wiki

2017-10-19 Thread Christian Schneider
We got lots of spam comments on this page. Unfortunately I can not delete
them:
https://ops4j1.jira.com/wiki/spaces/base/overview

Can someone give me the rights or remove the comments?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pax exam: Problem with unwanted import when using TinyBundles with a custom BuildStrategy

2017-10-18 Thread Christian Schneider
Hi Christoph,

I now experimented a bit more with the problem of .ClassNotFoundException:
org.ops4j.pax.tinybundles.core.BuildStrategy.
It seems the problem occurs when I use:
InputStream inp = bundle().add(DsService.class).build(withBnd());

It seems the problem is that build(strategey) has a reference to
BuildStrategy. So if we had .buildWithBnd() there would be no problem.
Does it make sense to add this? (Even if I know it pollutes the nice
abstraction a bit).

Another possible solution would be to switch the default builder to bnd ..
but this would create compatibility problems.

Christian

2017-10-05 9:58 GMT+02:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> > I only use this in the @Configuration so my test should not require
> > TinyBundles at runtime.
>
> Even though you does not require the code to run in @Configure you still
> have an (class-import) dependecy to that code.
>
> Is it a real problem to include tiny-bundles in your test?
> If yes you have to put your code into a Utilmethod in a seperate class
> (e.g. with static method returning just the Inputstream) and reference that
> class with FQN.
>
> Besides that, isn't there already a "withBND()" Option?
>
>
>
>
> Am 05.10.2017 um 09:14 schrieb Christian Schneider:
>
>> I am trying to tune TinyBundles to create DS xml for standard DS
>> annotations.
>> To achieve this I created my own BuildStrategy that adds the bnd plugin
>> for DS.
>>
>> I only use this in the @Configuration so my test should not require
>> TinyBundles at runtime.
>> Still I get a ClassNotFoundException when I run the test (see below).
>>
>> So my question is how can I use TinyBundles and a BuildStrategy in pax
>> exam without creating a runtime dependency to TinyBundles?
>>
>> Christian
>>
>> java.lang.ClassNotFoundException: 
>> org.ops4j.pax.tinybundles.core.BuildStrategy
>> not found by PAXEXAM-PROBE-800674a4-e6a6-456d-9eb4-0d184e5abb1e [18]
>> at org.apache.felix.framework.BundleWiringImpl.findClassOrResou
>> rceByDelegation(BundleWiringImpl.java:1574)
>> at org.apache.felix.framework.BundleWiringImpl.access$400(Bundl
>> eWiringImpl.java:79)
>> at org.apache.felix.framework.BundleWiringImpl$BundleClassLoade
>> r.loadClass(BundleWiringImpl.java:2018)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> at java.lang.Class.getDeclaredMethods0(Native Method)
>> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
>> at java.lang.Class.privateGetPublicMethods(Class.java:2902)
>> at java.lang.Class.getMethods(Class.java:1615)
>> at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.
>> findAndInvoke(JUnitProbeInvoker.java:94)
>> at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.
>> call(JUnitProbeInvoker.java:73)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de <https://owa.talend.com/owa/re
>> dir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%
>> 2fwww.liquid-reality.de>
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> 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 ops4j+unsubscr...@googlegroups.com > ops4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> --- 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


TinyBundles 3.0.0 released

2017-10-18 Thread Christian Schneider
I just released TinyBundles version 3.0.0

Notable new features:

- bnd builder now supports classes with DS annotations
- new builder methods activator and symbolicName

I adjusted the documentation to show the new features:

https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles

Best

Christian

Btw. I can not update the jira release. Can someone set the 3.0.0 version
as released?
We could also need a new 3.0.1 or 3.1.0 version.

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TinyBundles: release 3.0.0?

2017-10-18 Thread Christian Schneider
I am planning to do the TinyBundles 3.0.0 release today.

See the list of fixed issues:
https://ops4j1.jira.com/projects/PAXTB/versions/23801/tab/release-report-done

Christian


2017-10-12 14:18 GMT+02:00 Jean-Baptiste Onofré <
jeanbaptiste.ono...@gmail.com>:

> +1
>
> Regards
> JB
>
> On 10/12/2017 02:18 PM, Christian Schneider wrote:
>
> I found that TinyBundles on master already supports my main requirements:
> - Uses the new bndlib 3.4.0
> - Supports DS annotations
>
> Can we do a release of it?
> As I got a new laptop I am not yet prepared to do the release myself can
> someone else tackle this?
>
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
>
> Computer Scientist
> http://www.adobe.com
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


TinyBundles: release 3.0.0?

2017-10-12 Thread Christian Schneider
I found that TinyBundles on master already supports my main requirements:
- Uses the new bndlib 3.4.0
- Supports DS annotations

Can we do a release of it?
As I got a new laptop I am not yet prepared to do the release myself can
someone else tackle this?

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pax-Exam: Getting exit code for remote TestContainer

2017-10-11 Thread Christian Schneider
I found a hacky way to get the exit code. See
https://gist.github.com/cschneider/5bb61baa032e16c4492e5c6235648de7

It would be great if we the TestContainer could return the Process as this
then allows to wait for it to exit or get the exit code.

Christian

2017-10-11 13:21 GMT+02:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> Hi,
>
> currently the process of starting a "remote-container" is very
> implementation-specific and requires special code.
>
> For Pax Exam 5 I'm currently reworking the handling of (Test-)Containers
> and will then provide a way for more reliable and generic run and use
> remote containers so this should then be possible.
> Also managing multiple-containers in one test-run is then possible.
>
> Beside this, there might be a ways to archive this with the current
> code-base but it really depends on your needs and use-case.
>
> If you have control over these Java-Processes you can for example define a
> Systemproperty that points to a file where the process writes the exit-code
> to instead, or produce a wrapper that does that for you.
>
> To see how it might work in Exam 5, you can take a look at the new Eclipse
> Container that has a similar concept where you can specify an option like
> this (pseudo code!):
>
> application().mustReturnWith(exit code 3).within(5 seconds)
>
> For forked containers I plan to haven then an Option like this:
>
> fork().returnCode(8)
>
> or simmilar so PaxExam can check this in the stop() method of the
> container.
>
> Am 10.10.2017 um 15:30 schrieb Christian Schneider:
>
>> I looked thorugh the pax exam code and found that when the java process
>> is created we do not retrieve the Process object. So I do not think we can
>> evaluate the exit code. Is this observation correct?
>>
>> Christian
>>
>> 2017-10-10 11:25 GMT+02:00 Christian Schneider <ch...@die-schneider.net
>> <mailto:ch...@die-schneider.net>>:
>>
>> I would like to create and start one or more additional java
>> processes. Sometimes I need to evaluate the exit code these return
>> when exiting. How do I do this in exam?
>>
>> I start the external container like this:
>>
>> ExamSystem consumer = createTestSystem(myconfig());
>> TestContainer consumerContainer = createContainer(consumer).start();
>>
>> Christian
>>
>>
>> -- -- Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>> 2bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>>
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de <https://owa.talend.com/owa/re
>> dir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%
>> 2fwww.liquid-reality.de>
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> 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 ops4j+unsubscr...@googlegroups.com > ops4j+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> --- 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pax-Exam: Getting exit code for remote TestContainer

2017-10-10 Thread Christian Schneider
I looked thorugh the pax exam code and found that when the java process is
created we do not retrieve the Process object. So I do not think we can
evaluate the exit code. Is this observation correct?

Christian

2017-10-10 11:25 GMT+02:00 Christian Schneider <ch...@die-schneider.net>:

> I would like to create and start one or more additional java processes.
> Sometimes I need to evaluate the exit code these return when exiting. How
> do I do this in exam?
>
> I start the external container like this:
>
> ExamSystem consumer = createTestSystem(myconfig());
> TestContainer consumerContainer = createContainer(consumer).start();
>
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
>
> Computer Scientist
> http://www.adobe.com
>
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pax-Exam: Getting exit code for remote TestContainer

2017-10-10 Thread Christian Schneider
I would like to create and start one or more additional java processes.
Sometimes I need to evaluate the exit code these return when exiting. How
do I do this in exam?

I start the external container like this:

ExamSystem consumer = createTestSystem(myconfig());
TestContainer consumerContainer = createContainer(consumer).start();

Christian

-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pax exam: Problem with unwanted import when using TinyBundles with a custom BuildStrategy

2017-10-05 Thread Christian Schneider
I created an issue for this:
https://ops4j1.jira.com/browse/PAXTB-28

Christian

2017-10-05 10:09 GMT+02:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> That sounds good, the best would be to add a JIRA just now for this :-)
>
> Am 05.10.2017 um 10:07 schrieb Christian Schneider:
>
>> The static method in a separate class sounds good .. I will try this.
>>
>> There indeed is a withBnd method but it just calls plain bnd without the
>> DSAnnotations bnd plugin.
>>
>> If I succeed then I think we should add this functionality to
>> TinyBundles. I think it would also be great for users to be able to add bnd
>> plugins when using withBnd. This would allow to enhance the functionality
>> without adding too much to TinyBundles.
>>
>> Christian
>>
>> 2017-10-05 9:58 GMT+02:00 'Christoph Läubrich' via OPS4J <
>> ops4j@googlegroups.com <mailto:ops4j@googlegroups.com>>:
>>
>>
>> > I only use this in the @Configuration so my test should not require
>> > TinyBundles at runtime.
>>
>> Even though you does not require the code to run in @Configure you
>> still have an (class-import) dependecy to that code.
>>
>> Is it a real problem to include tiny-bundles in your test?
>> If yes you have to put your code into a Utilmethod in a seperate
>> class (e.g. with static method returning just the Inputstream) and
>> reference that class with FQN.
>>
>> Besides that, isn't there already a "withBND()" Option?
>>
>>
>>
>>
>> Am 05.10.2017 um 09:14 schrieb Christian Schneider:
>>
>> I am trying to tune TinyBundles to create DS xml for standard DS
>> annotations.
>> To achieve this I created my own BuildStrategy that adds the bnd
>> plugin for DS.
>>
>> I only use this in the @Configuration so my test should not
>> require TinyBundles at runtime.
>> Still I get a ClassNotFoundException when I run the test (see
>> below).
>>
>> So my question is how can I use TinyBundles and a BuildStrategy
>> in pax exam without creating a runtime dependency to TinyBundles?
>>
>> Christian
>>
>> java.lang.ClassNotFoundException:
>> org.ops4j.pax.tinybundles.core.BuildStrategy not found by
>> PAXEXAM-PROBE-800674a4-e6a6-456d-9eb4-0d184e5abb1e [18]
>> at
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResou
>> rceByDelegation(BundleWiringImpl.java:1574)
>> at
>> org.apache.felix.framework.BundleWiringImpl.access$400(Bundl
>> eWiringImpl.java:79)
>> at
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoade
>> r.loadClass(BundleWiringImpl.java:2018)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> at java.lang.Class.getDeclaredMethods0(Native Method)
>> at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
>> at java.lang.Class.privateGetPublicMethods(Class.java:2902)
>> at java.lang.Class.getMethods(Class.java:1615)
>> at
>> org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.
>> findAndInvoke(JUnitProbeInvoker.java:94)
>> at
>> org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.
>> call(JUnitProbeInvoker.java:73)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
>> ssorImpl.java:62)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
>> thodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:498)
>>
>>
>> -- -- Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>> 2bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba5
>> 2bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>>
>>
>> Computer Scientist
>> http://www.adobe.com
>>
>> -- -- --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>> <mailto:ops4j@googlegroups.com>
>>
>> ---
>> You received this message because you are subscribed to the
>> Google Groups "OPS4J" g

pax exam: Problem with unwanted import when using TinyBundles with a custom BuildStrategy

2017-10-05 Thread Christian Schneider
I am trying to tune TinyBundles to create DS xml for standard DS
annotations.
To achieve this I created my own BuildStrategy that adds the bnd plugin for
DS.

I only use this in the @Configuration so my test should not require
TinyBundles at runtime.
Still I get a ClassNotFoundException when I run the test (see below).

So my question is how can I use TinyBundles and a BuildStrategy in pax exam
without creating a runtime dependency to TinyBundles?

Christian

java.lang.ClassNotFoundException:
org.ops4j.pax.tinybundles.core.BuildStrategy not found by
PAXEXAM-PROBE-800674a4-e6a6-456d-9eb4-0d184e5abb1e [18]
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:94)
at
org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)


-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Computer Scientist
http://www.adobe.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Setup database structure before bundle under test is started with pax exam + karaf

2017-09-11 Thread Christian Schneider

You can use the new PreHook of pax-jdbc.
It allows to run an OSGi service before the datasource is published.

This can be used in production and test for db migration as well as for 
setup of a temp db before each test.


This is an example for a migration hook:
https://github.com/cschneider/Karaf-Tutorial/blob/master/liquibase/service/src/main/java/net/lr/tutorial/db/service/Migrator.java

and this is how to use it in the config:
https://github.com/cschneider/Karaf-Tutorial/blob/master/liquibase/org.ops4j.datasource-person.cfg

Christian


On 24.08.2017 09:36, karsten.bl...@hermes-ottoint.com wrote:

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 - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pax exam. Proposal to allow catch Exception in checkstyle rules

2017-08-23 Thread Christian Schneider

Currently the checkstyle rules forbid to catch Exception.

I propose to change this as catching Exception is sometimes very useful 
when for example a called method throws Exception or we simply want to 
map to RuntimeException to avoid having throws Exception in every caller.


Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CDI?

2017-08-16 Thread Christian Schneider
 On 15.08.2017 16:06, r...@enjekt.org wrote:

Christian,

I've also seen a lot of people using Processors/Exchanges which
unnecessarily couples their cod to the Camel framework. Unfortunately the
Camel in Action book doesn't get around to advising against that practice
until your well over 100 pages into the books. And when it does it is in a
bulleted list at the end of a chapter. When I'm at client sites it's one of
the first things I teach them when mentoring developers. Use POJOs and unit
tests just like any other code. Unfortunately neither the Camel website nor
the Camel in Action book stress this and too many code examples use
Processor/Exchanges unnecessarily. Honestly, in the past six years, I don't
recall the last time I used Camel Processor/Exchange directly.

I think you are on a very good track with this approach and it would be
good to spread the word about it. As you wrote it is not emphasized enough
in the camel book. So if you have a blog that would be a great theme.

But services aren't more loosely coupled than messaging. If I have bundle A
with all its classes unexported in ".internal" package and bundle B in the
same situation but they communicate via Camel routes, that's decoupled at
compile time and at runtime. Injecting a service interface whether it is
through a proxy or not couples the two bundles at compile time and
temporally couples them at runtime. If one puts the service interface into
a separate bundle one now has a different dependency.

Communicating externally is of course very loosely coupled. On the other
hand remote communication is typically a lot more expensive than local
communication using an OSGi service. Another problem with remote
communication is also that it tends to make your domain model anemic. For
the remote communication you need simple DTO like classes. So the logic is
typically separated from the data. If this really is a problem typically
depends on how complex your domain is.
Your approach sounds a lot like a typical microservice approach.

What I currently look into is combining domain driven design and
microservices. I found that making each service in a bounded context a
microservice is creating a lot of overhead. Instead I think it makes sense
to use OSGi services to talk between bundles of the same bounded context.
The border services that form the outside view of the bounded context are a
good match for the camel endpoints you are using.
Btw. What type of communication do you use? REST or more message based?

One other thing I am looking into is how to separate the user code from the
transport protocol.  For this case jax-rs-whiteboard or Aries RSA with CXF
might be interesting for you if you use REST or SOAP. It allows to offer
and consume services without a direct dependency to camel or CXF.
Unfortunately we do not yet have a good solution for one way messaging
based communication / eventing.

best regards
Christian

-- 
Christian Schneiderhttp://www.liquid-reality.de

Open Source Architecthttp://www.talend.com

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CDI?

2017-08-11 Thread Christian Schneider
I agree. Not using services in OSGi is a bad idea. Services allow you to
keep your bundles loosely coupled.
You should also try to only use standard java types in your service
interfaces.

I have seen some cases where people share camel routes between bundles or
use camel classes in service interfaces. In the start this seems fun but as
your system grows you realize that the coupling badly hurts your ability to
evolve parts of your system.

Also when using services try to avoid retrieving a service and blocking
until it is there. Instead let DS or another DI framework inject the
service. Especially using DS this will make your system highly reactive to
changes and even work when things are replaced at runtime like in
development. It also copes well with refreshes like they happen a lot in
apache karaf when you install features.

Christian

2017-08-11 9:51 GMT+02:00 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com>:

> Well in fact here is no framework that solves all your problems... I'm
> using OSGi and DS for year now and it works without a problem, even though
> there where sometimes bugs in the code or flaws in my concepts or
> architectural decsions I had to solve. But I never exspected that DS, OSGi
> or anything else "solves" this for me in a magical way.
>
> If you want to use OSGi DS is IMO the best choice (as mentioned before)
> because it provides what we have with bundles and import/exports to the
> service level, but must be used with OSGi in mind. The problem is that ppl
> exspect the can just throw things togeter and it would then work in some
> magical way.
>
>
> You can add Blueprint, CDI, Camel and whatever to the mix try to keep away
> OSGi but will be hurt by "flaky" things then. Thats not the fault of the
> framework/lib but a restriction of the programming model. I can't find "use
> of services ends up being complex" but the other way round: Using services
> with DS is incredible easy and powerfull. So if you have a problem, provide
> an example and I'm sure you will get help to solve the problem.
>
> Also DS can of course be used to wire up "things" inside your bundle, what
> should keep you away of doing so?
>
> Am 10.08.2017 22:37, schrieb r...@enjekt.org:
>
>> I did use it not too long ago but had to get back to a paying gig. But
>> the technology is certainly what we need, I think.
>>
>> SCR is fine until you then realize that you have wire things up in your
>> bundle and don't have too many good choices about the matter. Blueprint is
>> a little long tooth and clunky to work with. From what I've heard from
>> Christian and others it sounds as though the proxies have naughty habits. I
>> can say that with time I've drifted away from using OSGi services when I
>> have a reasonable choice between using a service and something like a Camel
>> route. A lot of that has to do with the path of least resistance. I'm
>> putting in a system right now that has a data source bootstrapped via PAX
>> JDBC which is then consumed by a "connector" bundle (essentially a DTO).
>> Initially I'd exported that connector as a service for other bundles to
>> pick up and make service calls. But the services seemed to have flaky
>> problems when I uninstalled/installed. Since I had other issues to solve I
>> just fell back to using Camel routes for data access from other bundles.
>>
>> That doesn't seem to be a unique situation for me with Blueprint. Maybe
>> it isn't Blueprint. But the use of services ends up being complex and
>> that's a shame. If there's a technology like CDI that lets me easily export
>> and reference service that will be spectacular. I was stunned about how
>> easy is to test with the CDI anotations.
>>
>> Of course, for bread and butter I'm still consulting on Fuse and that's
>> not exactly cutting edge
>>
>>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> --- 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CDI?

2017-08-10 Thread Christian Schneider
It is certainly worth to try. I would be very interested in your experience
with the current state of CDI support.

Christian

2017-08-09 17:20 GMT+02:00 <r...@enjekt.org>:

> Matt,
>
> This is an exchange between Christian and Guillaume from  couple of months
> back when I was asking about this. I've put Guillaume's comments in bold.
>
> DI would be great but it is is less well supported on OSGi than blueprint
> and the current implementations also have the same bad proxy behaviour. So
> while I would like to see a really good CDI implementation on OSGi with
> dynamic behaviour like DS we are not there yet.
>
> *No, the work I've done on CDI is free from those drawbacks. It has the
> same semantics as DS, so anything you can do in DS, you can do in CDI. You
> can even do more than DS because you can wire services "internally", i.e.
> you don't have to expose your services to the OSGi registry to wire them
> together.*
>
>
>
> On Monday, August 7, 2017 at 8:34:57 PM UTC-5, Matt Sicker wrote:
>>
>> I'm not so sure about deprecated, but DS is the only dependency injection
>> standard in OSGi that respects the dynamic nature of services. CDI,
>> blueprint, etc., all have to rely on hacky proxies to emulate support while
>> adding nonstandard extensions at times.
>>
>> On 7 August 2017 at 17:02, <ra...@enjekt.org> wrote:
>>
>>> I posted this to the Karaf forum but it may more appropriately belong
>>> here. It's going to be one or the other.
>>>
>>> Has CDI been deprecated from the OSGi specification. I was hoping to use
>>> it in the future instead of Blueprint or DS or in addition to them. I re
>>> all last year a new OSGi service export and reference annotations were
>>> added. So this surprised me a bit.
>>>
>>> https://issues.apache.org/jira/browse/CAMEL-11029
>>>
>>> According to that issue, Camel's CDI support for OSGi doesn't work
>>> because CDI on OSGi is deprecated.
>>>
>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - op...@googlegroups.com
>>>
>>> ---
>>> 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 ops4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Matt Sicker <boa...@gmail.com>
>>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Bndtools Integration

2017-07-14 Thread Christian Schneider
Hi Toni,

I am willing to help.

Christian

2017-07-14 17:51 GMT+02:00 Toni Menzel <toni.men...@rebaze.com>:

> Hey guys,
>
> quick heads-up. I just started an initiative to make Pax Exam and Bndtools
> work properly together [1].
> This is not because I fell in love with Eclipse (no..) but Bndtools folks
> think their Integration Test support is good enough. Which is not true.
> They won't integrate, so lets see what we can do.
>
> If there is anyone on this list using Bndtools currently but wants to help
> out making Pax Exam a good Bndtools-citizen, let me know.
>
> Happy Weekend,
> Toni
>
> [1] https://ops4j1.jira.com/browse/PAXEXAM-842
>
>
>
>
> *www.rebaze.de <http://www.rebaze.de/> | www.rebaze.com
> <http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Possible bug in pax exam karaf: test probe installation fails

2017-05-19 Thread Christian Schneider

I found an issue with pax exam.
I have a ProbeBuilder that needs to import a service package.

So this probe obviously can only be installed for the single test that 
also installs the bundle that provides the package.


The issue now is that it seems pax exam tries to install all test probes 
for each test (at least for forkMode=once).


See

https://ops4j1.jira.com/browse/PAXEXAM-818

So my question is: Is this normal or a bug that needs to be fixed?

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [PaxJDBC] Upgrade HikariCP Dependency to 2.4.11

2017-04-14 Thread Christian Schneider
Sounds good

2017-04-14 20:01 GMT+02:00 Yogesh Rao <yog...@gmail.com>:

> Hi
>
> I think it would be good if we can get the HikariCP version 2.4.1 upgraded
> to the latest 2.4.11, this should maintain java 7 compatibility... Let me
> know if okay..
>
> Regards,
> -Yogesh
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-jdbc] xa=false not supported

2017-04-07 Thread Christian Schneider
I agree .. makes sense to b able to also set xa=false.

Christian

2017-04-07 19:15 GMT+02:00 Yogesh Rao <yog...@gmail.com>:

> Hi,
>
> We are using PAX-JDBC 1.0.1 with Karaf 4.0.8, I noticed that pax-jdbc does
> not work with xa=false set in the datasource config file. xa=false ends up
> throwing a exception
>
> 2017-03-30 20:24:02,902 | ERROR | bc-86c31b8718c3) | configadmin | 7 -
> org.apache.felix.configadmin - 1.8.12 | 
> [org.osgi.service.cm.ManagedServiceFactory,
> id=239, bundle=153/mvn:org.ops4j.pax.jdbc/pax-jdbc-config/1.0.1]:
> Updating configuration 
> org.ops4j.datasource.557b49aa-4050-442d-85bc-86c31b8718c3
> caused a problem: XA can only be set to true
> org.osgi.service.cm.ConfigurationException: null : XA can only be set to
> true
> at org.ops4j.pax.jdbc.config.impl.DataSourceConfigManager.
> isXa(DataSourceConfigManager.java:126)[153:org.ops4j.pax.
> jdbc.config:1.0.1]
> at
>
> This seems to be a little odd on configuration side to only set xa=true if
> needed otherwise not have it as part of configuration at all... I would
> suggest to support xa=false as well unless there is some issue which creeps
> up (with xa=false) which i am not aware of ...
>
> I have the fix ready, let me know if i can create a JIRA and send a pull
> request.
>
> Regards,
> -Yogesh
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-exam] gave up waiting for service

2017-04-06 Thread Christian Schneider

On 06.04.2017 17:26, Massimo Bono wrote:

It totally worked!

Your method it seems interesting: you use <_include>bnd.bnd 
tag to decouple the pom.xml (maven information) with the information 
regarding OSGi.
Since you're here can I ask you a couple of questions regarding your 
method:


1) What if I need to add a variable inside the bnd.bnd file? In maven 
I can use properties or I can override plugin behaviour. If I move my 
OSGi settings to the bnd.bnd file what kind of variable support do I have?

2) are you using bndtools with it (just curious)?

You can use maven properties inside the bnd files.
I am using bndtools but just as an editor for the bnd file.

I also have an example where I use bndtools for packaging using bndrun 
files see https://github.com/cschneider/osgi-chat but I did not yet use 
this in production. So it is still a bit experimental.


Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-exam] gave up waiting for service

2017-04-06 Thread Christian Schneider
I think the problem might be the maven-bundle-plugin version. I updated 
the version to 3.2.0 and it worked for me.


I also change the config to just this:




org.apache.felix
maven-bundle-plugin
${maven.bundle.plugin.version}
true




I think that the old plugin maybe does not fully work with the most 
current DS annotations.


Btw. This is what I use most often now to create bundles:
https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-ds/pom.xml#L107-L118

I then define the OSGi settings in bnd.bnd files if necessary. Like here
https://github.com/cschneider/Karaf-Tutorial/blob/master/tasklist-ds/model/bnd.bnd

Christian

On 06.04.2017 17:01, Massimo Bono wrote:
Just to be sure, I totally remove the whole "bundle-example" project, 
leaving only the "bundle-example-impl" (I also removed the artifact 
from my maven repository just to be sure).

Pax exam still gives the same error though. :(

On Thursday, April 6, 2017 at 3:52:28 PM UTC+2, Massimo Bono wrote:

Ehm... that one is totallly my fault. In my first test I separated
interface from module implementation. Since I couldn't test it, I
thought simplifying the project might solve the issue.
As you can see in /microsi-root/pom.xml/ that project is *not used
 at all*:




examples/bundle-example-impl
examples/itest-bundle-example



Clearly, even removing the interface bundle and moving the
BundleExample.java into bundle-example-impl project didn't solve
the issue. :(
Do you have another idea of what I might be missing?


On Thursday, April 6, 2017 at 3:25:36 PM UTC+2, Christian
Schneider wrote:

No .. that looks fine .. I guess I was just blind :-)

I think the the problem is about where the service interface
comes from. The BundleExample interface is present in the
bundle-example bundle as well as in the bundle-example-impl
bundle.
The service is created based on the interface from
bundle-example-impl but the itest depends on the
bundle-example bundle. So I guess they see different interfaces.


Christian

On 06.04.2017 15:00, Massimo Bono wrote:

I thought by installing SCR bundle I was be able to exploit
DS service.

Are you telling me that:


CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.scr").version("2.0.8"),

is not sufficient to exploit DS?
    On Thursday, April 6, 2017 at 2:25:44 PM UTC+2, Christian
Schneider wrote:

In your BundleExample impl you use declarative services
but you do not install the scr bundle in your test
config. So your bundle is installed but the @Component
will not do anything. So TestBundleExayou can not inject
the service because there is no such service published in
the runtime. Christian On 06.04.2017 14:14, Massimo Bono
wrote:

Hello to all!
I'm learning OSGi technology and I discover pax exam 4.
I've tried to follow the guide lines at Getting Started
with OSGi Tests

<https://ops4j1.jira.com/wiki/display/PAXEXAM4/Getting+Started+with+OSGi+Tests> 
and
OSGi Containers
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>.
However, it seems I can't start the testing.
The error is the following one:


simpleGreetingImplCheck(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample

test(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample

It seems that pax exam starts correctly, but fails to
inject bundle-example (a "hello world" bundle I'm testing).
I'm putting all the source code here
<https://github.com/Koldar/pax-exam-test>.
Furthermore, here some additional information:

 1. I'm using Java 1.8.0_121;
 2. The OSGi implementation chosen is 5.6.2;
 3. I'm using maven and I'm using the one available via
m2e Eclipse plugin (m2e version 1.7);
 4. Eclipse version is 4.6.0 (Neon);
 5. Pax exam version is 4;

If you look at the POM of the test
(itest-bundle-example), you'll notice I've added other
dependencies aside those cite in Osgi Containers
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>.
I've

Re: [pax-exam] gave up waiting for service

2017-04-06 Thread Christian Schneider

No .. that looks fine .. I guess I was just blind :-)

I think the the problem is about where the service interface comes from. 
The BundleExample interface is present in the bundle-example bundle as 
well as in the bundle-example-impl bundle.
The service is created based on the interface from bundle-example-impl 
but the itest depends on the bundle-example bundle. So I guess they see 
different interfaces.



Christian

On 06.04.2017 15:00, Massimo Bono wrote:

I thought by installing SCR bundle I was be able to exploit DS service.

Are you telling me that:


CoreOptions.mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.scr").version("2.0.8"),


is not sufficient to exploit DS?

On Thursday, April 6, 2017 at 2:25:44 PM UTC+2, Christian Schneider 
wrote:


In your BundleExample impl you use declarative services but you do
not install the scr bundle in your test config. So your bundle is
installed but the @Component will not do anything.
So TestBundleExayou can not inject the service because there is no
such service published in the runtime.

Christian

On 06.04.2017 14:14, Massimo Bono wrote:

Hello to all!

I'm learning OSGi technology and I discover pax exam 4.

I've tried to follow the guide lines at Getting Started with OSGi
Tests

<https://ops4j1.jira.com/wiki/display/PAXEXAM4/Getting+Started+with+OSGi+Tests> 
and
OSGi Containers
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>.
However, it seems I can't start the testing.
The error is the following one:


simpleGreetingImplCheck(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample

test(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample


It seems that pax exam starts correctly, but fails to inject
bundle-example (a "hello world" bundle I'm testing).

I'm putting all the source code here
<https://github.com/Koldar/pax-exam-test>.
Furthermore, here some additional information:

 1. I'm using Java 1.8.0_121;
 2. The OSGi implementation chosen is 5.6.2;
 3. I'm using maven and I'm using the one available via m2e
Eclipse plugin (m2e version 1.7);
 4. Eclipse version is 4.6.0 (Neon);
 5. Pax exam version is 4;

If you look at the POM of the test (itest-bundle-example), you'll
notice I've added other dependencies aside those cite in Osgi
Containers
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>.
I've added them because I got other errors before getting stuck
on the "gave up waiting" one.

  * *org.ops4j.pax.exam:pax-exam-container-native:4.10.0*: I've
added it because otherwise Pax complained with "No
TestContainer implementation in Classpath";
 *

  * *org.ops4j.pax.exam:pax-exam-link-assembly:4.10.0*: I've
added it because otherwise Pax complained with "Problem
starting test container";


If you look at the log maven generates (see attachment maven.log)
you'll see that the platform correctly *resolve and install* my
bundle:

14:05:05.895 [main] DEBUG
org.ops4j.pax.url.mvn.internal.Connection - *Resolving
*[mvn:com.massimobono.microsi.examples/bundle-example-impl/0.0.1-SNAPSHOT]
14:05:05.897 [main] DEBUG
shaded.org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider
- Using manager PaxLocalRepositoryManager with priority 0.0 for
E:\Users\massi\.m2\repository
14:05:05.919 [main] DEBUG
org.ops4j.pax.url.mvn.internal.AetherBasedResolver - *Resolved
*(com.massimobono.microsi.examples:bundle-example-impl:jar:0.0.1-SNAPSHOT)
as

E:\Users\massi\.m2\repository\com\massimobono\microsi\examples\bundle-example-impl\0.0.1-SNAPSHOT\bundle-example-impl-0.0.1-SNAPSHOT.jar
14:05:05.922 [main] DEBUG
org.ops4j.pax.exam.nat.internal.NativeTestContainer - + *Install
*(start@3)
MavenArtifactUrlReference{groupId='com.massimobono.microsi.examples',
artifactId='bundle-example-impl', version='0.0.1-SNAPSHOT',
type='null'}

If I comment out the "@Inject" annotation, everything works, so I
think I configured wrongly pax exam.

Waiting for any kind reply!

-- 
-- 
--

OPS4J - http://www.ops4j.org - op...@googlegroups.com 

---
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 ops4j+un...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
<https://groups.google.co

Re: [pax-exam] gave up waiting for service

2017-04-06 Thread Christian Schneider
In your BundleExample impl you use declarative services but you do not 
install the scr bundle in your test config. So your bundle is installed 
but the @Component will not do anything.
So you can not inject the service because there is no such service 
published in the runtime.


Christian

On 06.04.2017 14:14, Massimo Bono wrote:

Hello to all!

I'm learning OSGi technology and I discover pax exam 4.

I've tried to follow the guide lines at Getting Started with OSGi 
Tests 
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/Getting+Started+with+OSGi+Tests> and 
OSGi Containers 
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>. 
However, it seems I can't start the testing.

The error is the following one:


simpleGreetingImplCheck(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample
test(com.massimobono.microsi.examples.bundleexample.TestBundleExampleImpl):
gave up waiting for service
com.massimobono.microsi.examples.bundleexample.BundleExample


It seems that pax exam starts correctly, but fails to inject 
bundle-example (a "hello world" bundle I'm testing).


I'm putting all the source code here 
<https://github.com/Koldar/pax-exam-test>.

Furthermore, here some additional information:

 1. I'm using Java 1.8.0_121;
 2. The OSGi implementation chosen is 5.6.2;
 3. I'm using maven and I'm using the one available via m2e Eclipse
plugin (m2e version 1.7);
 4. Eclipse version is 4.6.0 (Neon);
 5. Pax exam version is 4;

If you look at the POM of the test (itest-bundle-example), you'll 
notice I've added other dependencies aside those cite in Osgi 
Containers 
<https://ops4j1.jira.com/wiki/display/PAXEXAM4/OSGi+Containers>. I've 
added them because I got other errors before getting stuck on the 
"gave up waiting" one.


  * *org.ops4j.pax.exam:pax-exam-container-native:4.10.0*: I've added
it because otherwise Pax complained with "No TestContainer
implementation in Classpath";
 *

  * *org.ops4j.pax.exam:pax-exam-link-assembly:4.10.0*: I've added it
because otherwise Pax complained with "Problem starting test
container";


If you look at the log maven generates (see attachment maven.log) 
you'll see that the platform correctly *resolve and install* my bundle:


14:05:05.895 [main] DEBUG org.ops4j.pax.url.mvn.internal.Connection - 
*Resolving 
*[mvn:com.massimobono.microsi.examples/bundle-example-impl/0.0.1-SNAPSHOT]
14:05:05.897 [main] DEBUG 
shaded.org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider 
- Using manager PaxLocalRepositoryManager with priority 0.0 for 
E:\Users\massi\.m2\repository
14:05:05.919 [main] DEBUG 
org.ops4j.pax.url.mvn.internal.AetherBasedResolver - *Resolved 
*(com.massimobono.microsi.examples:bundle-example-impl:jar:0.0.1-SNAPSHOT) 
as 
E:\Users\massi\.m2\repository\com\massimobono\microsi\examples\bundle-example-impl\0.0.1-SNAPSHOT\bundle-example-impl-0.0.1-SNAPSHOT.jar
14:05:05.922 [main] DEBUG 
org.ops4j.pax.exam.nat.internal.NativeTestContainer - + *Install 
*(start@3) 
MavenArtifactUrlReference{groupId='com.massimobono.microsi.examples', 
artifactId='bundle-example-impl', version='0.0.1-SNAPSHOT', type='null'}


If I comment out the "@Inject" annotation, everything works, so I 
think I configured wrongly pax exam.


Waiting for any kind reply!

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] Release of pax-jdbc 1.1.0

2017-03-30 Thread Christian Schneider

Pax-jdbc 1.1.0 is released which fixes these issues:

https://ops4j1.jira.com/browse/PAXJDBC-123?jql=project%20%3D%20PAXJDBC%20AND%20fixVersion%20%3D%201.1.0

Highlights:

- Update of some database versions

- Support for database migration or setup hook (PreHook). The user can 
publish such a service and


refer to it in the config. This service is then called before the 
DataSource is published as a service.



Christian


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-jdbc] Updating driver dependencies (since it's 2017)

2017-03-23 Thread Christian Schneider
Great to have you on the ops4j team Holger. Let me know if I can help 
with anything.


Christian

On 23.03.2017 11:28, Holger Hoffstätte wrote:

Hello everyone!

Achim just hijacked^h^h^h^h^hinvited me to ops4j and as first
task I just filed https://ops4j1.jira.com/browse/PAXJDBC-123
which is about updating driver dependencies.

We've been hit by some really bad bugs in the MariaDB driver,
which is seriously out of date. This is a problem since our
customized Karaf packaging installs boot features, and (so I
have been told) boot features can't be overridden.

In any case it seems to me that many of the dependencies in
pax-jdb could use a refresh since it's 2017. So please add
your suggestions to the bug if you can vouch that a certain
version works reliably. I'll collect responses and bump
the dependencies for the next release.

thanks,
Holger




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pax-jdbc release 1.0.1

2017-02-27 Thread Christian Schneider
Many thanks. I also saw you fixed the wrong password setting code.

Christian

2017-02-28 7:32 GMT+01:00 Benjamin Graf <graben1...@gmail.com>:

> Hi Christian,
>
> I fixed it already
>
> Benjamim
>
> Am 27.02.2017 22:20 schrieb "Christian Schneider" <ch...@die-schneider.net
> >:
>
>> Hi Benjamin,
>>
>> unfortunately I already released the artifacts. Can you describe the
>> problem in some more detail in an issue?
>> Do you mean the pax-jdbc-pool-aries bundle? I was not aware it uses
>> tranql.
>>
>> Christian
>>
>> 2017-02-27 21:01 GMT+01:00 Benjamin Graf <graben1...@gmail.com>:
>>
>>> Well the embedded aries artefact is missing the whole tranql magic in
>>> 1.0.1
>>>
>>> Regards,
>>> Benjamin
>>>
>>>
>>> Am Donnerstag, 16. Februar 2017 14:37:00 UTC+1 schrieb Christian
>>> Schneider:
>>>>
>>>> I have staged a new pax-jdbc release on nexus:
>>>>
>>>> https://oss.sonatype.org/content/repositories/orgops4j-1253
>>>>
>>>> It contains these fixes:
>>>>
>>>> https://ops4j1.jira.com/secure/ReleaseNote.jspa?projectId=10
>>>> 442=22601
>>>>
>>>> I will wait at least one day before releasing the artifact to give you
>>>> some time to review.
>>>>
>>>> Christian
>>>>
>>>> --
>>>> Christian Schneider
>>>> http://www.liquid-reality.de
>>>>
>>>> Open Source Architect
>>>> http://www.talend.com
>>>>
>>>> --
>>> --
>>> --
>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>
>>> ---
>>> 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 ops4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>
>>
>> Open Source Architect
>> http://www.talend.com
>> <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OPS4J" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/ops4j/BCwz2r37nJw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: pax-jdbc release 1.0.1

2017-02-27 Thread Christian Schneider
Hi Benjamin,

unfortunately I already released the artifacts. Can you describe the
problem in some more detail in an issue?
Do you mean the pax-jdbc-pool-aries bundle? I was not aware it uses tranql.

Christian

2017-02-27 21:01 GMT+01:00 Benjamin Graf <graben1...@gmail.com>:

> Well the embedded aries artefact is missing the whole tranql magic in 1.0.1
>
> Regards,
> Benjamin
>
>
> Am Donnerstag, 16. Februar 2017 14:37:00 UTC+1 schrieb Christian Schneider:
>>
>> I have staged a new pax-jdbc release on nexus:
>>
>> https://oss.sonatype.org/content/repositories/orgops4j-1253
>>
>> It contains these fixes:
>>
>> https://ops4j1.jira.com/secure/ReleaseNote.jspa?projectId=
>> 10442=22601
>>
>> I will wait at least one day before releasing the artifact to give you
>> some time to review.
>>
>> Christian
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> http://www.talend.com
>>
>> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Heads up: pax-jdbc-release 1.0.1 and redesign of trackers in pax-jdbc-config

2017-02-10 Thread Christian Schneider
Can you explain this in more detail? I would not expect any problems 
with multiple connections using the same credentials.


Christian

On 10.02.2017 14:04, Charlie Mordant wrote:
Not sure that we want the same xa credential as the datasource one 
every time.

In order to fix it on the user side, we've got to specify in the config
user=
password=
AND
pool.username=
pool.password=

Using the same credential could be problematic with multiple XA 
resource (or maybe I don't understand every aspect of XA management).


Regards,

2017-02-10 13:31 GMT+01:00 Christian Schneider 
<ch...@die-schneider.net <mailto:ch...@die-schneider.net>>:


Thanks Achim.



I went through the other issues in pax-jdbc and found this one:
https://ops4j1.jira.com/browse/PAXJDBC-106
<https://ops4j1.jira.com/browse/PAXJDBC-106>

It sounds like a serious issue with the aries pooling. So I think
we need to fix it before the release.

Christian


On 10.02.2017 11:37, 'Achim Nierbeck' via OPS4J wrote:

version 1.1.0 ... done

2017-02-10 10:59 GMT+01:00 Christian Schneider
<ch...@die-schneider.net <mailto:ch...@die-schneider.net>>:


  pax-jdbc 1.0.1 release

I would like to do a pax-jdbc 1.0.1 release today or
tomorrow. We fixed a bug in the hikari pooling and a user
asked for the fixed version.
There is also an open issue with the aries pooling.  If
possible we should fix this for 1.0.1 but there is a workaround.

Can someone create a new pax-jdbc 1.1.0 release so I can move
issues to it?

See:


https://ops4j1.jira.com/projects/PAXJDBC/versions/22601/tab/release-report-all-issues

<https://ops4j1.jira.com/projects/PAXJDBC/versions/22601/tab/release-report-all-issues>


  Avoid stacking trackers

For 1.1.0 I plan to redesign the trackers for pax-jdbc-config:
https://ops4j1.jira.com/browse/PAXJDBC-119
<https://ops4j1.jira.com/browse/PAXJDBC-119>

The problem we face at the moment is that pax-jdbc-config
depends on several other services and some of these are even
only needed depending on some of the config settings.
As we currently have to stack individual trackers to
implement these dependencies this is quite tedious and will
be more difficult with every new service we need to track.

So I designed a new generic MultiServiceTracker. This can be
configured with the services to track and will fire a
callback when all services are present. So it is a bit like
DS behaves but more configureable for services that are only
needed in certain cases.
I have committed the implementation into a new branch and
would be happy about feedback:

https://github.com/ops4j/org.ops4j.pax.jdbc/commit/fe1ad1a0a5dff12a5f0f3a287a260086d392251d

<https://github.com/ops4j/org.ops4j.pax.jdbc/commit/fe1ad1a0a5dff12a5f0f3a287a260086d392251d>

I plan to merge this after the 1.0.1 release.

    Christian

-- 
Christian Schneider

http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

-- 
-- 
--

OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
<mailto:ops4j@googlegroups.com>

---
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 ops4j+unsubscr...@googlegroups.com
<mailto:ops4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.




-- 


Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/
<http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
--

OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
<mailto:ops4j@googlegroups.com>

---
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 ops4j+unsubscr...@googlegroups.com
<mailto:ops4j+unsubscr...@googlegroups.com>.
    For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.



-- 
Christian Schneider

http://www.liquid-reality.de

Open Source Architect
http://www.ta

Heads up: pax-jdbc-release 1.0.1 and redesign of trackers in pax-jdbc-config

2017-02-10 Thread Christian Schneider


 pax-jdbc 1.0.1 release

I would like to do a pax-jdbc 1.0.1 release today or tomorrow. We fixed 
a bug in the hikari pooling and a user asked for the fixed version.
There is also an open issue with the aries pooling.  If possible we 
should fix this for 1.0.1 but there is a workaround.


Can someone create a new pax-jdbc 1.1.0 release so I can move issues to it?

See:

https://ops4j1.jira.com/projects/PAXJDBC/versions/22601/tab/release-report-all-issues


 Avoid stacking trackers

For 1.1.0 I plan to redesign the trackers for pax-jdbc-config:
https://ops4j1.jira.com/browse/PAXJDBC-119

The problem we face at the moment is that pax-jdbc-config depends on 
several other services and some of these are even only needed depending 
on some of the config settings.
As we currently have to stack individual trackers to implement these 
dependencies this is quite tedious and will be more difficult with every 
new service we need to track.


So I designed a new generic MultiServiceTracker. This can be configured 
with the services to track and will fire a callback when all services 
are present. So it is a bit like DS behaves but more configureable for 
services that are only needed in certain cases.
I have committed the implementation into a new branch and would be happy 
about feedback:

https://github.com/ops4j/org.ops4j.pax.jdbc/commit/fe1ad1a0a5dff12a5f0f3a287a260086d392251d

I plan to merge this after the 1.0.1 release.

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jdbc commands in BndTools?

2017-02-09 Thread Christian Schneider
To use any karaf commands you need to install the karaf shell instead of 
the felix gogo shell. Unfortunately the commands are not compatible.
The good news is that I already tested this and the karaf shell works 
fine in bndtools.


I do not have a complete example ready at the moment. Basically you need 
to create and index from a pom. Start with the karaf shell.core bundle. 
It provides support for the new karaf 4 style commands.


Then create a bndrun from this index and require the bundle. You might 
need to add additional bundles to the index. The resolver should help 
you to find which.


Then the more difficult part is to get the shell to work. Luckily I 
figured this out already:


-runproperties: \
felix.cm.loglevel=4,\
felix.fileinstall.log.level=4,\
karaf.systemBundlesStartLevel=0,\
org.ops4j.pax.logging.DefaultServiceLog.level=INFO,\
karaf.startLocalConsole=true,\
felix.fileinstall.dir=./etc,\
karaf.local.roles='admin,manager,viewer,systembundles',\
felix.fileinstall.noInitialDelay=true

The core is karaf.startLocalConsole and karaf.local.roles. Without these 
the karaf shell will not start up.


Christian

On 09.02.2017 03:09, G. Y. wrote:


Hi,

I am trying to follow the karaf tutorial, Database Access 
<http://liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access> 
part. Things are working fine from Karaf. However, I am doing my 
development in Maven/Eclipse and using BndTools with Felix 5.6.1 
framework for my execution and bnd-maven-plugin to build my bundles. 
In my BndTools, I want to be able to see whether my datasources are 
available using the command 'jdbc:ds-list', the same way I 
successfully did in karaf. So, I determined the list of bundles 
installed with the karaf 'jdbc' feature and added all those bundles to 
my execution requirement in my bndrun (from a local index I built with 
the bnd index plugin). However, I am not able to get the 'jdbc' 
commands (jdbc:ds-list does not work and 'help' does not show the 
'jdbc' commands). Am I missing something? Aren't the commands built in 
standard way in OSGi and therefore usable seamlessly inside any framework?


Thank you!
--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PAX JDBC HikariCP broken in 1.0.0

2017-02-08 Thread Christian Schneider

The build seems to work again ... at least for the most part.
Currently it fails during deployment to the snapshot repo but I think 
this is more a problem on the jenkins server.


See http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/172/console

Christian

On 07.02.2017 23:21, 'Achim Nierbeck' via OPS4J wrote:

Looks a lot like, starting with this build, the builds are flaky.

http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/154/

As I have no idea what exactly has been changed at that time, or if 
it's just a test, someone with knowledge of the things should try to 
get the

nightly stable again. Otherwise we'll never have good snapshots ready.

regards, Achim


2017-02-07 23:05 GMT+01:00 Matt Bellinger <matthew.bellin...@gmail.com 
<mailto:matthew.bellin...@gmail.com>>:


I cloned pax-jdbc and was able to run a mvn test fine.

Do you guys have a way to check the karaf logs on the Jenkins server?

~Matt


On Tuesday, February 7, 2017 at 5:02:13 PM UTC-5, Christian
    Schneider wrote:

Just checked with a running karaf. There are different
warnings and the local build works .. so it must be something
different.
Does this build work for you locally?

Christian

On 07.02.2017 21:43, 'Achim Nierbeck' via OPS4J wrote:

ok ... that last build didn't quite work out as expected.
Would be great if one of the main maintainers of the pax-jdbc
project could take a look at those failing tests:

http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/testReport/
<http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/testReport/>

regards, Achim


2017-02-07 20:11 GMT+01:00 Achim Nierbeck
<bcan...@googlemail.com>:

hmm ...
I just triggered a new snapshot build [1].
Hopefully it'll pass all tests, in that case
a new snapshot version should be available soon.

regards, Achim

[1] -
http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/console
<http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/console>


2017-02-07 19:59 GMT+01:00 Matt Bellinger
<matthew@gmail.com>:

I considered using the next snapshot, unfortunately
it looks like the last was a couple months ago at
version 0.10.0-SNAPSHOT.


https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/jdbc/pax-jdbc-pool-hikaricp/

<https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/jdbc/pax-jdbc-pool-hikaricp/>



On Tuesday, February 7, 2017 at 1:42:39 PM UTC-5,
Achim Nierbeck wrote:

Or move to the next SNAPSHOT version.
With that you don't need your own Band-Aid Version.
OTH, if it is really needed, I don't see a reason
to wait another 2 to 3 weeks, why not just push a
bugfix version now.
If you find more bugfixes which aren't needed as
critical, it's ok to release a 1.0.2 in 2 to 3
weeks.

regards, Achim


2017-02-07 18:48 GMT+01:00 Matt Bellinger
<matthew@gmail.com>:

Ok, thank you for the prompt response. I'll
look in to creating a band-aid fix locally
until then.  Do you have any suggestions?
Right now I'm attempting to register my own
PooledDataSourceFactory with the fix in
master, but I am running across hibernate
issues that I am currently looking in to.

Thanks,
~Matt



On Tuesday, February 7, 2017 at 12:44:57 PM
    UTC-5, Christian Schneider wrote:

I found this issue shortly after the
commit. We can theoretically release
1.0.1 at any time. I propose we wait 2 or
three more weeks to see if other issues
are found.

Christian

On 07.02.2017 17:18, Matt Bellinger wrote:

When updating from a 0.10.0-SNAPSHOT
version of pax-jdbc-config to the 1.0.0
release version, I noticed we were no
longer able to get a connection to our
database. Upon investigating, I noticed
that the PooledDataSourceFactory service
provided by pax-jdbc-pool-hikaricp did
   

Re: PAX JDBC HikariCP broken in 1.0.0

2017-02-07 Thread Christian Schneider
Just checked with a running karaf. There are different warnings and the 
local build works .. so it must be something different.

Does this build work for you locally?

Christian

On 07.02.2017 21:43, 'Achim Nierbeck' via OPS4J wrote:

ok ... that last build didn't quite work out as expected.
Would be great if one of the main maintainers of the pax-jdbc project 
could take a look at those failing tests:


http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/testReport/

regards, Achim


2017-02-07 20:11 GMT+01:00 Achim Nierbeck <bcanh...@googlemail.com 
<mailto:bcanh...@googlemail.com>>:


hmm ...
I just triggered a new snapshot build [1].
Hopefully it'll pass all tests, in that case
a new snapshot version should be available soon.

regards, Achim

[1] -
http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/console
<http://ci.ops4j.org/jenkins/job/org.ops4j.pax.jdbc/168/console>


2017-02-07 19:59 GMT+01:00 Matt Bellinger
<matthew.bellin...@gmail.com <mailto:matthew.bellin...@gmail.com>>:

I considered using the next snapshot, unfortunately it looks
like the last was a couple months ago at version 0.10.0-SNAPSHOT.


https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/jdbc/pax-jdbc-pool-hikaricp/

<https://oss.sonatype.org/content/repositories/ops4j-snapshots/org/ops4j/pax/jdbc/pax-jdbc-pool-hikaricp/>



On Tuesday, February 7, 2017 at 1:42:39 PM UTC-5, Achim
Nierbeck wrote:

Or move to the next SNAPSHOT version.
With that you don't need your own Band-Aid Version.
OTH, if it is really needed, I don't see a reason to wait
another 2 to 3 weeks, why not just push a bugfix version now.
If you find more bugfixes which aren't needed as critical,
it's ok to release a 1.0.2 in 2 to 3 weeks.

regards, Achim


2017-02-07 18:48 GMT+01:00 Matt Bellinger
<matthew@gmail.com>:

Ok, thank you for the prompt response.  I'll look in
to creating a band-aid fix locally until then.  Do you
have any suggestions?  Right now I'm attempting to
register my own PooledDataSourceFactory with the fix
in master, but I am running across hibernate issues
that I am currently looking in to.

Thanks,
~Matt



On Tuesday, February 7, 2017 at 12:44:57 PM UTC-5,
Christian Schneider wrote:

I found this issue shortly after the commit. We
can theoretically release 1.0.1 at any time. I
propose we wait 2 or three more weeks to see if
other issues are found.

Christian

On 07.02.2017 17:18, Matt Bellinger wrote:

When updating from a 0.10.0-SNAPSHOT version of
pax-jdbc-config to the 1.0.0 release version, I
noticed we were no longer able to get a
connection to our database.  Upon investigating,
I noticed that the PooledDataSourceFactory
service provided by pax-jdbc-pool-hikaricp did
not set the xa property.  The
pax-jdbc-config DataSourceConfigManager
specifically looks for xa=true or xa=false in the
service filter. This means that the
ServiceTracker 'misses' the service, and is
unable to continue with the configuration of the
database.

I see that this was fixed in the commit below,
but I believe that commit missed 1.0.0.


https://github.com/ops4j/org.ops4j.pax.jdbc/commit/40372375f579d2c45d09e35d1549b39a60ebc553

<https://github.com/ops4j/org.ops4j.pax.jdbc/commit/40372375f579d2c45d09e35d1549b39a60ebc553>

Is there a time frame for when this commit would
make it to a released version?

Thanks,
~Matt
-- 
-- 
--

OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
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
ops4j+un...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.



-- 
  

Re: Pax-jdbc 1.0.0 release take 2

2017-01-24 Thread Christian Schneider
Yes .. I am not sure if this is still open. We need to either close it 
if it is done or move to the next version once it is created.


Christian

On 24.01.2017 23:25, 'Achim Nierbeck' via OPS4J wrote:

Hi,

according to this list[1], there is still one issue open for this 
version.

Is it also done, or does it need to be pushed to another version?

regards, Achim

[1] - 
https://ops4j1.jira.com/projects/PAXJDBC/versions/20680/tab/release-report-all-issues



2017-01-24 23:18 GMT+01:00 Christian Schneider 
<ch...@die-schneider.net <mailto:ch...@die-schneider.net>>:


I fixed the issue
https://ops4j1.jira.com/browse/PAXJDBC-115
<https://ops4j1.jira.com/browse/PAXJDBC-115>
and redid the pax jdbc 1.0.0 release. The artifacts are already
pushed to central.

The issue in jira is still named 0.10.0 though. Can someone with
the apropriate rights change the release name to 1.0.0 and mark it
as released?
I can then take care of the announcement on the wiki and the ops4j
list.

Christian

On 24.01.2017 11:38, Christian Schneider wrote:

I have staged a release of pax jdbc 1.0.0 on the sonatype nexus:

https://oss.sonatype.org/content/repositories/orgops4j-1249
<https://oss.sonatype.org/content/repositories/orgops4j-1249>

It would be great if you could test it and give feedback. I
will take care of the update in Apache karaf.
https://issues.apache.org/jira/browse/KARAF-4956
<https://issues.apache.org/jira/browse/KARAF-4956>

As JB wants to do a karaf release 4.1.0 soon with pax jdbc
1.0.0 I will push the pax jdbc bundles to central later today
if there is no biggger problem reported.

    Christian



    -- 
Christian Schneider

http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

-- 
-- 
--

OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
<mailto:ops4j@googlegroups.com>

--- 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 ops4j+unsubscr...@googlegroups.com
<mailto:ops4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.




--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> 
Committer & Project Lead

blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Release of pax jdbc 1.0.0 is staged now

2017-01-24 Thread Christian Schneider

Yes .. will recut. If any of you find more issues please let me know.

Christian

On 24.01.2017 18:09, 'Achim Nierbeck' via OPS4J wrote:

Hi Christian,

in case of such uncertainties and with the possibilities to fix, yes 
just do it :)


regards, Achim


2017-01-24 17:28 GMT+01:00 Jean-Baptiste Onofré 
<jeanbaptiste.ono...@gmail.com <mailto:jeanbaptiste.ono...@gmail.com>>:


Hi Christian

I would re-cut the release yes.

Up to you.

Regards
JB
On Jan 24, 2017, at 17:05, Christian Schneider
<ch...@die-schneider.net <mailto:ch...@die-schneider.net>> wrote:

I found another issue.

If you configure a DataSource with pooling but no XA like this:
osgi.jdbc.driver.name <http://osgi.jdbc.driver.name>=H2
url=jdbc:h2:mem:test
dataSourceName=person
pool=dbcp2

and then add the pooling support as well as transaction support:
feature:repo-add pax-jdbc 1.0.0
feature:install transaction pax-jdbc-config pax-jdbc-pool-dbcp2 
pax-jdbc-h2

Then you get two DataSources. The reason is that the dbcp2 pooling
creates two PoolingDataSourceFactory services. One with xa=true and one
without the
xa attribute. For just pooling we search for (pool=dbcp2) so we get two
services and install two DataSources.

What do you think? Should I redo the release? The artifacts are not yet
pushed.

Christian

On 24.01.2017 11:38, Christian Schneider wrote:

I have staged a release of pax jdbc 1.0.0 on the sonatype
nexus:
https://oss.sonatype.org/content/repositories/orgops4j-1249
<https://oss.sonatype.org/content/repositories/orgops4j-1249>
It would be great if you could test it and give feedback.
I will take care of the update in Apache karaf.
https://issues.apache.org/jira/browse/KARAF-4956
<https://issues.apache.org/jira/browse/KARAF-4956> As JB
wants to do a karaf release 4.1.0 soon with pax jdbc 1.0.0
I will push the pax jdbc bundles to central later today if
there is no biggger problem reported. Christian



-- 
-- -- OPS4J - http://www.ops4j.org -

ops4j@googlegroups.com <mailto:ops4j@googlegroups.com> --- 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
ops4j+unsubscr...@googlegroups.com
<mailto:ops4j+unsubscr...@googlegroups.com>. For more options,
visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>. 


--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web 
<http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project 
Lead blog <http://notizblog.nierbeck.de/>

Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master
-- -- -- OPS4J - http://www.ops4j.org - 
ops4j@googlegroups.com --- 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 
ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>. For more options, visit 
https://groups.google.com/d/optout. 


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Release of pax jdbc 1.0.0 is staged now

2017-01-24 Thread Christian Schneider

I found another issue.

If you configure a DataSource with pooling but no XA like this:
osgi.jdbc.driver.name=H2
url=jdbc:h2:mem:test
dataSourceName=person
pool=dbcp2

and then add the pooling support as well as transaction support:
feature:repo-add pax-jdbc 1.0.0
feature:install transaction pax-jdbc-config pax-jdbc-pool-dbcp2 pax-jdbc-h2

Then you get two DataSources. The reason is that the dbcp2 pooling 
creates two PoolingDataSourceFactory services. One with xa=true and one 
without the
xa attribute. For just pooling we search for (pool=dbcp2) so we get two 
services and install two DataSources.


What do you think? Should I redo the release? The artifacts are not yet 
pushed.


Christian

On 24.01.2017 11:38, Christian Schneider wrote:

I have staged a release of pax jdbc 1.0.0 on the sonatype nexus:

https://oss.sonatype.org/content/repositories/orgops4j-1249

It would be great if you could test it and give feedback. I will take 
care of the update in Apache karaf.

https://issues.apache.org/jira/browse/KARAF-4956

As JB wants to do a karaf release 4.1.0 soon with pax jdbc 1.0.0 I 
will push the pax jdbc bundles to central later today if there is no 
biggger problem reported.


Christian




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Release of pax jdbc 1.0.0 is staged now

2017-01-24 Thread Christian Schneider
I have done some tests on karaf 4.1.0-SNAPSHOT creating a H2 DataSource 
from config with dbcp2 pooling and optionally xa support.


It works fine but I spotted some small issues:

1. If the TransactionManager or pax-jdbc-pool-dbcp2 is missing then the 
log shows:
Tracking pooling support with filter 
(&(objectClass=org.ops4j.pax.jdbc.pool.common.PooledDataSourceFactory)(pool=dbcp2)(xa=true))
It is a little bit hard to interpret that this means either the 
pax-jdbc-pool-dbcp2 feature or the transaction feature is missing. I 
have added this to the Documentation.

It would be great if we can improve the logging.

2. If the DataSource is created correctly then there are 3 identical 
lines in the log:

Found DataSourceFactory. Creating DataSource my

It seems that we hit the logging 3 times for some reason. There is only 
one DSF service and only one PooledDataSourceFactory service. So I have 
no idea why this happens.
In any case there is only one DataSource registered. So it does not seem 
to be a severe error.


Christian


On 24.01.2017 11:38, Christian Schneider wrote:

I have staged a release of pax jdbc 1.0.0 on the sonatype nexus:

https://oss.sonatype.org/content/repositories/orgops4j-1249

It would be great if you could test it and give feedback. I will take 
care of the update in Apache karaf.

https://issues.apache.org/jira/browse/KARAF-4956

As JB wants to do a karaf release 4.1.0 soon with pax jdbc 1.0.0 I 
will push the pax jdbc bundles to central later today if there is no 
biggger problem reported.


Christian




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JDBC pooling not working with pax-jdbc 0.10.0.SNAPSHOT

2017-01-10 Thread Christian Schneider
I just checked the mysql driver. It does not support a DataSourceFactory 
itself. So you will need the adapter from pax jdbc.


You can simply check how pax-jdbc-config does it.
See
https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-config/src/main/java/org/ops4j/pax/jdbc/config/impl/DataSourceFactoryTracker.java
https://github.com/ops4j/org.ops4j.pax.jdbc/blob/master/pax-jdbc-config/src/main/java/org/ops4j/pax/jdbc/config/impl/DataSourceRegistration.java

The most complicated part in pax-jdbc-config is tracking the 
TransactionManager, PooledDataSourceFactory and DataSourceFactory.
As you do not have to make your code universal you can make this easier 
by using DS and just injecting the named services you need.


If you need it universal then the fastest way is to just copy and change 
pax-jdbc-config.


Christian

On 08.01.2017 18:49, GOGLE YOTUBE wrote:

Thank you, Christian! This was very helpful...
If I could ask something else: are you aware of any example 
programmatic creation of the data source you can point me to? We have 
our own library of credential resolution, and I'd like, instead of 
providing  the 'user' and 'password' properties, to provide a 'key' 
property from which I first can resolve a user name a password using 
our credential library. Then, with the resolved user and password, I 
can create the data source programatically.


Thanks again!

On Friday, 6 January 2017 02:06:55 UTC-5, Christian Schneider wrote:

Pax-jdbc 0.10 changes the way the pooling is implemented. It is
documented here:
https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0

<https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0>

The idea was to release this as 1.0.0. This is why the doc already
references this version.

Christian

2017-01-05 20:54 GMT+01:00 GOGLE YOTUBE <medal...@gmail.com
>:

Hi,

In Karaf 4.0.8, I did the following feature install:

/*feature:install transaction jndi
pax-jdbc-h2/0.10.0.SNAPSHOTpax-jdbc-config/0.10.0.SNAPSHOT 
pax-jdbc-pool-dbcp2/0.10.0.SNAPSHOT*/

A 'service:list DataSourceFactory' shows the H2 service but
not the pooled/XA version of it. I have the same problem when
I also install 'pax-jdbc-pool-aries' feature.

The reason I want 0.10.0.SNAPSHOT is that I need to use the
JTDS drivers for some of my SQL Server connections.

What I tried next is to uninstall version 0.10.0.SNAPSHOT of
the pax-jdbc features and install version 0.9.0 instead. The
pooled/AX services now show up for H2. Next, I installed
 pax-jdbc-jtds version 0.10.0.SNAPSHOT (version 0.9.0 does not
exist). I also got the pooled/XA services for jtds this way.
However, I have these 2 features started:
pax-jdbc-spec 0.10.0.SNAPSHO
pax-jdbc-spec 0.9.0

I am not sure whether my solution is ok and whether there
would be a problem having different version of pax-jdbc-spec
running.

Any suggestions?

Thanks!!
-- 
-- 
--

OPS4J - http://www.ops4j.org - op...@googlegroups.com


---
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 ops4j+un...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.




    -- 
    -- 
Christian Schneider

http://www.liquid-reality.de

<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com

<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JDBC pooling not working with pax-jdbc 0.10.0.SNAPSHOT

2017-01-05 Thread Christian Schneider
Pax-jdbc 0.10 changes the way the pooling is implemented. It is documented
here:
https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0
The idea was to release this as 1.0.0. This is why the doc already
references this version.

Christian

2017-01-05 20:54 GMT+01:00 GOGLE YOTUBE <medali.k...@gmail.com>:

> Hi,
>
> In Karaf 4.0.8, I did the following feature install:
>
> *feature:install transaction jndi
> pax-jdbc-h2/0.10.0.SNAPSHOT pax-jdbc-config/0.10.0.SNAPSHOT 
> pax-jdbc-pool-dbcp2/0.10.0.SNAPSHOT*
>
> A 'service:list DataSourceFactory' shows the H2 service but not the
> pooled/XA version of it. I have the same problem when I also install 
> 'pax-jdbc-pool-aries'
> feature.
>
> The reason I want 0.10.0.SNAPSHOT is that I need to use the JTDS drivers
> for some of my SQL Server connections.
>
> What I tried next is to uninstall version 0.10.0.SNAPSHOT of the pax-jdbc
> features and install version 0.9.0 instead. The pooled/AX services now show
> up for H2. Next, I installed  pax-jdbc-jtds version 0.10.0.SNAPSHOT
> (version 0.9.0 does not exist). I also got the pooled/XA services for
> jtds this way. However, I have these 2 features started:
> pax-jdbc-spec 0.10.0.SNAPSHO
> pax-jdbc-spec 0.9.0
>
> I am not sure whether my solution is ok and whether there would be a
> problem having different version of pax-jdbc-spec running.
>
> Any suggestions?
>
> Thanks!!
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> 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 ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-- 
Christian Schneider
http://www.liquid-reality.de
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.liquid-reality.de>

Open Source Architect
http://www.talend.com
<https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46=http%3a%2f%2fwww.talend.com>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Documentation for the new pooling and XA support in pax-jdbc on master

2016-11-03 Thread Christian Schneider
I fully agree.. The even bigger problem is that people do not really 
understand what recoverable means at all.
Until recently my understanding was that without recovery all running 
transactions would simply be rolled back in case of a crash .. but this 
does not seem to be the case.


Luckily I met Tim Ward at eclipsecon last week and he explained to me 
what happens with and without recovery but we need to spread the word 
more about this.


So if I understood correctly the problem without recovery is that if the 
server crashes while one resource in an XA transaction is already 
committed and the other is not then

it will remain in this way.

So I think some people can live with it as it is a rare case but it is 
really important to make people aware of the risk so they can make an 
informed decision.


Christian

On 03.11.2016 11:47, Guillaume Nodet wrote:
I think we should clearly document the level of safety using those 
pooling mechanism.
Afaik, hikari and dbcp2 do not support automatic transaction recovery, 
the only combinations I'm aware of are:

 *  aries transaction manager + pax-jdbc-pooling-aries
 * narayana transaction manager + pax-jdbc-pooling-narayana

I think this is really important to document, as people may wrongly 
think they are using something safe (because of XA) while it's not 
really in case of a crash.




2016-11-03 11:32 GMT+01:00 Christian Schneider 
<ch...@die-schneider.net <mailto:ch...@die-schneider.net>>:


I have documented how the new pooling and XA support works.

I think the new support is much more straightforward to use and
gives better error reporting.

For example in the old pooling support if you use the pooling and
xa enabled DSF "H2-pool-xa" and forget to install a
TransactionManager or the pooling module the
DataSource is simply not created. There is no error in the log as
the config module can not know if the enhanced DSF is just not yet
there or will never come up.

In the new pooling and XA support there will be a good error in
the log if either the pooling or the TransactionManager are missing.

See

https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0

<https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0>

Christian

    -- 
Christian Schneider

http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

-- 
-- 
--

OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
<mailto:ops4j@googlegroups.com>

--- 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 ops4j+unsubscr...@googlegroups.com
<mailto:ops4j%2bunsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.




--

Guillaume Nodet

Red Hat, Open Source Integration

Email: gno...@redhat.com <mailto:gno...@redhat.com>
Web: http://fusesource.com <http://fusesource.com/>
Blog: http://gnodet.blogspot.com/

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Documentation for the new pooling and XA support in pax-jdbc on master

2016-11-03 Thread Christian Schneider

I have documented how the new pooling and XA support works.

I think the new support is much more straightforward to use and gives 
better error reporting.


For example in the old pooling support if you use the pooling and xa 
enabled DSF "H2-pool-xa" and forget to install a TransactionManager or 
the pooling module the
DataSource is simply not created. There is no error in the log as the 
config module can not know if the enhanced DSF is just not yet there or 
will never come up.


In the new pooling and XA support there will be a good error in the log 
if either the pooling or the TransactionManager are missing.


See

https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0

Christian

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introduction and release of pax-jdbc

2016-11-03 Thread Christian Schneider
The changes are already present in master since quite some time. So it 
would be difficult to release a 0.10.0 without it.


I was already tempted to create the new docs in the wiki but did not 
want to confuse users with it before there is also released code to 
support it.
I will do the documentation in a separate wiki article that is not 
linked from top level.


Christian

On 03.11.2016 10:57, Toni Menzel wrote:

Welcome to OPS4J, Sascha!

first of all, great move (from jboss to karaf)!

Thank you for already for your contribution to pax-jdbc. The new 
adapter alone would be good for a 0.10 release.


About Christians changes, can you point out where you outline a 
migration scenario in a release article/wiki? If so, i think it would 
make sense to cut a 0.10.0 release and make that the starting point of 
a potential 1.0.0 later.


wdyt?

Toni

*Toni Menzel*

*
*

*www.rebaze.de <http://www.rebaze.de/> |www.rebaze.com 
<http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*






--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adapt PAX-Exam as an OSGI runner?

2016-10-18 Thread Christian Schneider
I am using something like this in an Aries RSA test where  I need a 
second container.

https://github.com/apache/aries-rsa/blob/master/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/TwoContainerPaxExam.java

ExamSystem testSystem = PaxExamRuntime.createTestSystem(remoteConfig());
container = PaxExamRuntime.createContainer(testSystem);
container.start();

I am not sure how good pax exam actually would be to define a running 
system.
An alternative you could look into is bndtools with the recent maven 
integration.

See http://bndtools.org/

It allows to define a running system using a backing index and requirements.

I used this in CXF DOSGi to create a small example:
https://github.com/apache/cxf-dosgi/blob/master/samples/soap/soap.bndrun

The runbundles are automatically computed from the index and 
requirements. Using the Eclipse IDE extension it is quite easy to define 
and change such running configs.


The CXF example above also has a maven plugin that does the build 
completely automated. The result is a runnable jar that you can start 
with java -jar.


So as was discussed before on this list it would also be quite 
interesting to go the other way round and use bndtools bndrun files to 
define a pax exam test run. This is not done yet though.


Christian

On 18.10.2016 15:06, Nick Baker wrote:

Hey All,

I've come to enjoy writing integration tests with PAX-Exam! Thanks so 
much! Recently I had need to standup a lightweight embedded OSGI 
container. I've done this with bare OSGI Framework APIs in the past 
and started to do so again. It struck me that it would be so nice to 
provision this container using the PAX-Exam configuration options.


Has there been any work done on adapting Exam as a Runner?

-Nick
--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tinybundle versus probe bundle with Declarative Services

2016-09-15 Thread Christian Schneider
Bnd can generate the DS xml from annotations but it will need a bnd 
plugin for DS. I think I tried this at some point and got it working but 
considered it too complicated for my case.


It could be a good improvement for Tinybundles though. Tinybundles could 
add the DS plugin for bnd by default. Then

it would be easy to create bundles with DS annotations on the fly.

Christian


On 15.09.2016 16:49, Toni Menzel wrote:
Tinybundles only has a raw builder (which adds nothing "magically", 
thats why its raw) and a bndBuilder, which lets bnd do its magic to 
generate a manifest.
Yes, now we'd need a DS builder additionally to process the 
annotations and generate the xml. You can also add it explicitly 
(include the hand rolled xml). But thats really the worst option. 
Better make a DS generator for tinybundles.. ?



*Toni Menzel*

*
*

*Developer Advocates - The Rebaze Way *

*www.rebaze.de <http://www.rebaze.de/> |www.rebaze.com 
<http://www.rebaze.com/> | @rebazeio <https://twitter.com/rebazeio>*



On Thu, Sep 15, 2016 at 4:28 PM, Benson Margulies 
<ben...@basistech.com <mailto:ben...@basistech.com>> wrote:


I've always been a bit unclear about which classes get
incorporated into the test bundle with pax-exam. If I just have a
class in the src/test/java, and that class has DS annotations,
will pax-exam use bnd to build out the DS metadata? Or do I need
to make an explicit tinybundle?

-- 
-- 
--

OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
<mailto:ops4j@googlegroups.com>

---
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 ops4j+unsubscr...@googlegroups.com
<mailto:ops4j+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.


--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

---
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 ops4j+unsubscr...@googlegroups.com 
<mailto:ops4j+unsubscr...@googlegroups.com>.

For more options, visit https://groups.google.com/d/optout.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Pax exam config module for bndtools

2016-08-19 Thread Christian Schneider

It would be great to work together on this.

I just talked to Peter Kriens to get some hints about using bndrun 
files. Simply reading the file is probably not a good idea as even the 
resolved bundles do not directly give us the jar locations and we do not 
want to reimplement their indexes.


He recommended to create a run and work with the bundle objects it 
provides. I have done a similar thing in a maven plugin to resolve and 
export using bndrun files:

https://github.com/bndtools/bnd/blob/master/maven/bnd-export-maven-plugin/src/main/java/aQute/bnd/maven/export/plugin/ExportMojo.java

So I think it should be possible to get all the informations we need 
from there.


For the other way round I am not sure if it makes much sense. The main 
advantage of bndrun files for me is that they can be edited with the 
bndtools editor. The editor has a nice UI for accessing the backing 
index to simply drag bundles over. The resolve button also provides some 
nice feedback if something is missing.


In pax exam configs the main issue for me is to specify the bundles to 
install. You first have to add them to the pom and then a second time in 
the pax exam config. The bndtools UI for bndrun files together with the 
resolver should eliminate most of this manual work.


In the current version of bndtools it is already possible to work with 
indexes created by maven.
See 
https://github.com/cschneider/osgi-chat/blob/master/packaging/service/service.bndrun

The upcoming version will even allow to specify a pom directly as an index.
In parallel I am working on providing such pom based indexes for apache 
projects. This should make it a lot easier to create OSGi assemblies in 
the future.
For example Aries RSA and CXF DOSGi already have these repository poms 
and so they are really easy to add to your index pom. See

https://github.com/cschneider/osgi-chat/blob/master/packaging/index/pom.xml#L111-L122

Christian

On 19.08.2016 14:46, Toni Menzel wrote:
Totally agree! That's on my todo and wish list for a long time. I am 
off until next week but would like to work on a joint effort to make 
bndtools work more seemlessly with pax exam.
My ideas work really similar to what you suggested, basically first 
letting pax exam read bndrun definitions.
However I would also like to see a way to consume pax exams internal 
dsl based configuration api (full Java power for configs) for bndrun 
definitions. Wdyt?

Toni




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


New design for pax-jdbc-config and pool for better user experience

2016-08-03 Thread Christian Schneider


 Current design of pax-jdbc-config and pool

The DB driver or a pax-jdbc adapter provide a DataSourceFactory service. 
This service does not necessarily provide pooling or XA support.


There are several pax-jdbc-pool modules. Each of these tracks the 
original DataSourceFactory service and installs a pooling as well as XA 
enabled DataSourceFactory serice on top. These delegate to the original 
DSF to create the DS and then wrap it with pooling and XA support. the 
new DSFs are create with the names -pool and -pool-XA attached.


The config support expects the user to install a config for a 
ManagedServiceFactory that refers to the DSF by name or class with the 
suffixes attached if pooling and or XA support is desired.


See

https://ops4j1.jira.com/wiki/display/PAXJDBC/Create+DataSource+from+config

https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+for+DataSourceFactory


 Problems

A lot of users struggle with the current design as it is a bit unnatural 
when learning it and there are lot of things that can go wrong without 
good error reporting.


So for example when the original DSF is missing then the enhanced DSF 
will just not be created. If the TransactionManager is missing then the 
XA enhanced DSF wrapper service is not created.


It is also confusing to have many DSF services if for example the 
pax-jdbc native adapter as well as the original driver both install a DSF.


If anything is wrong then the DS service is simply not created. As this 
all uses the whiteboard pattern there is no easy way to give direct 
feedback as when something is missing it can mean that the setup is 
wrong but also that maybe the needed services simply have not yet come up.



 Goals

So the goals of a new design are to provide a more natural solution and 
also provide good error/warning messages if anything is wrong in the system.



 New Design

For the new desgin the main idea is to only have the orignal DSF service 
and not create additional ones. The pooling and XA support is provided 
by a new service interface that is only used internally in pax-jdbc and 
does not have to be visible to the user.


For the configs the idea is to have properties that mark the need for a 
pool or XA:


If the property pool is present in the config then it means the user 
wants pooling support. If it is not present then the orignal DSF is used.


pool=[dbcp2,aries,narayana]

If the property xa=true is present then the user wants XA support on top 
of pooling. XA support without pooling is invalid.


xa=true


The pooling and XA support it implemented in a plugable way by 
implementing this interface:


package org.ops4j.pax.jdbc.pool.common;

public interface PooledDataSourceFactory {
DataSource create(DataSourceFactory dsf, Properties config);
}

The impl is published as a service with e.g. pool=aries and xa=true.


 Error reporting

The pax-jdbc-config module will detect any DS config and immediately 
report that it has detected the config and what it is searching for now.


For example if you give it the config below then it will report that it 
searches a DSF with the property |osgi.jdbc.driver.name=H2, |aries 
pooling support and a TransactionManager service.


|osgi.jdbc.driver.name=H2|
|databaseName=||test|
|user=sa|
|password=|
|dataSourceName=test2
pool=aries
xa=true
|
|pool.maxTotal=8|

After a timeout it will warn about which of the above is still missing.

||To further improve the experience we could also hint for ways to fix 
the problem. Like when you give osgi.jdbc.driver.name=H2 it could report 
that you should install the pax-jdbc-h2 feature in karaf, 
pax-jdbc-pool-aries if the aries pooling is missing or the transaction 
feature if the TransactionManager service is missing. Not sure if we 
want to be karaf specific here though.


Christian


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
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 ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.