Is it possible to use servlet 3.0 api annotations with pax web whiteboard?

2018-10-28 Thread Steinar Bang
Is it possible to use servlet 3.0 api annotations with pax web whiteboard? Is it possible to define the whiteboard context in a simple manner? I'm currently using pax web whiteboard in apache karaf 4.1.5 (pax web 6.0.3, I think). But the current annotations are a bit cumbersome and clumsy, and ex

Re: Is it possible to use servlet 3.0 api annotations with pax web whiteboard?

2018-10-29 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > you have to decide if you want to do the Whiteboard approach, or > Servlet 3 annotations. Ok. > If you want to use Whiteboard do as you alsready did. > If you want to use Servlet 3.0 annotations, make shure to define your > application to be a WebApplicatio

Re: Is it possible to use servlet 3.0 api annotations with pax web whiteboard?

2018-10-29 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > OSGi 7? Not yet. Ok. Any idea when? 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

Re: Is it possible to use servlet 3.0 api annotations with pax web whiteboard?

2018-10-29 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > depends on who will pickup the task :) Ok. What's in OSGi 7 is just a spec, and is an extension to OSGi core (that's what "compendium" means?), so it will never be in the OSGi core of e.g. equinox or Apache Felix? It will need to be implemented by somethin

Adding provided dependencies makes pax exam tests fail

2018-12-28 Thread Steinar Bang
Platform: debian 9.6 "stretch", openjdk-8 8u181-b13-2~deb9u1, maven 3.3.9, pax exam 4.10.0 When I add some maven dependencies with provided, without changing anything else, my karaf-based pax exam test starts failing. Is this expected? My initial feeling was that adding "provided" depende

Re: Adding provided dependencies makes pax exam tests fail

2018-12-29 Thread Steinar Bang
>>>>> Steinar Bang : > Platform: > debian 9.6 "stretch", > openjdk-8 8u181-b13-2~deb9u1, > maven 3.3.9, > pax exam 4.10.0 > When I add some maven dependencies with provided, without > changing anything else, my karaf-based pax exam test starts fa

Re: Adding provided dependencies makes pax exam tests fail

2019-01-04 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Steinar Bang : >> Platform: >> debian 9.6 "stretch", >> openjdk-8 8u181-b13-2~deb9u1, >> maven 3.3.9, >> pax exam 4.10.0 >> When I add some maven dependencies with provided, without >>

web whiteboard construction order?

2019-01-07 Thread Steinar Bang
When using pax web whiteboard, is it necessary for a ServletContextHelper creating a webcontext to be created before any servlets or filters using it? If so: is there a way of enforcing construction order when the ServletContextHelper, a shiro filter using the context, and a jersey servlet both us

Re: web whiteboard construction order?

2019-01-07 Thread Steinar Bang
>>>>> Steinar Bang : > When using pax web whiteboard, is it necessary for a > ServletContextHelper creating a webcontext to be created before any > servlets or filters using it? > If so: is there a way of enforcing construction order when the > ServletContextHe

Re: web whiteboard construction order?

2019-01-07 Thread Steinar Bang
> Nhut Thai Le : > I had this question a few months ago. You don't need to control the > registration order of ServletContextHelper and ServletFilter. Just use > osgi.http.whiteboard.context.select propery to wire the servlet, filter to > the context. Ok. Thanks! My problem is probably som

Re: web whiteboard construction order?

2019-01-08 Thread Steinar Bang
> Nhut Thai Le : > I had some REST api hosted by jersey running on a stand alone version of > jetty but when we moved to paxweb, i was not able to make it work anymore, > so i end up switching to aries-jax-rs-whiteboard. I have Jersey in Karaf working in two different places: https://github.

Re: web whiteboard construction order?

2019-01-09 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > Hi Steinar, > yes please open an issue for it ;) Will do! It looks like self service is switched off again. Could you create a user for me. This email address is fine. Thanks! -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.co

Re: web whiteboard construction order?

2019-01-09 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" > : > Hi Steinar, > yes please open an issue for it ;) Will do! It looks like self service is switched off again. Could you create a user for me. This email address is fine. Thanks! -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegr

Need ops4j JIRA user to report a bug

2019-01-11 Thread Steinar Bang
Hi, I need an ops4j JIRA user to report a bug. 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 em

Re: Need ops4j JIRA user to report a bug

2019-01-13 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" > : > Done, > welcome aboard ;) 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

Re: web whiteboard construction order?

2019-01-13 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" > : > yes please open an issue for it ;) Here is the issue: https://ops4j1.jira.com/browse/PAXEXAM-925 -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Googl

Web whiteboard: is the order of filter and servlet registration signifikant?

2019-02-12 Thread Steinar Bang
(Here's another registration order question from me) The question this time is about filters and servlets: must filters be registered before the servlets they are filtering? Or doesn't the order of registration matter? -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.

Re: Web whiteboard: is the order of filter and servlet registration signifikant?

2019-02-18 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" > : > afaik, at least I think I or someone else tried to implement it, the rank > of a service is taken into account when > registering a filter for a servlet. Servlets itself don't have a "Ordering" > so the rank of the servlet filter can be used for oderin

[Announce] Shiro-based "poor man's SSO" for Apache Karaf applications

2019-04-14 Thread Steinar Bang
https://github.com/steinarb/authservice I wrote this to cover my own usecase, which was to have the same login for nginx itself, as well as a couple of web whiteboard webapps running in the same apache karaf, behind the nginx server through a reverse proxy setup. Cross-webapp SSO works by provid

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

2019-04-29 Thread 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

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

2019-04-30 Thread Steinar Bang
> 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 The DriverManager isn't called directly from the PGBundleActivator. 1. DriverManager.registerDriver() is called

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

2019-05-01 Thread Steinar Bang
> 'Christoph Läubrich' via OPS4J > : > DriverManger.register/unregister can't work reliable in OSGi > (especially with static insitilizer), thus always the > DataSourceFactory should be used instead! PGDataSourceFactory is currently implemented using the regular PG JDBC driver, ie. the D

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

2019-06-01 Thread Steinar Bang
> Grzegorz Grzybek : > Hello > I added a comment to > https://github.com/pgjdbc/pgjdbc/issues/1476#issuecomment-497635922 Thanks for working on this! (I've worked around this by using a karaf feature to load the PostgreSQL JDBC driver, because then I can avoid reloading the PostgreSQL JDBC b

Problems running pax exam with openjdk-8

2019-06-01 Thread Steinar Bang
This pax exam test, using the karaf runner, with karaf 4.2.5, runs with openjdk-8 but fails with openjdk-11: https://github.com/steinarb/scratch/blob/authservice/use-java-11/authservice.tests/src/test/java/no/priv/bang/authservice/tests/AuthserviceIntegrationTest.java#L25 Will pax exam work wit

Problems running pax exam with openjdk-11 (Was: Problems running pax exam with openjdk-8)

2019-06-01 Thread Steinar Bang
(hm... my mind crosswired and wrote the wrong subject, but it looks like the meaning got though anyway... subject corrected) > Freeman Fang : > You need to add some VMOption by yourself, something like [snip!] > You can take a look at [1] to get more details about how we do it in Karaf. > [1

Re: Problems running pax exam with openjdk-11

2019-06-02 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Freeman Fang >>>>> : >> You need to add some VMOption by yourself, something like > [snip!] >> You can take a look at [1] to get more details about how we do it in Karaf. >> [1]https://github.com/apa

Re: Problems running pax exam with openjdk-11

2019-06-02 Thread Steinar Bang
>>>>> Steinar Bang : > I've added the VMOptions to the startup but I still get the same stack > trace, ie. a NullPointerException thrown from here: > public class FrameworkExtensionInstaller { > ... > void addExtensionContent0(Collection revisi

Re: Problems running pax exam with openjdk-11

2019-06-02 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Steinar Bang : >> I've added the VMOptions to the startup but I still get the same stack >> trace, ie. a NullPointerException thrown from here: >> public class FrameworkExtensionInstaller { >> ..

Re: Problems running pax exam with openjdk-11

2019-06-02 Thread Steinar Bang
>>>>> Steinar Bang : > And the reason it tries to throw an exception tin the first place, is > that ADD_FWK_URL_METHOD is because the "addUrl" method is missing from > the URL class. >From the google searches I've made addUrl() hasn't app

Re: Problems running pax exam with openjdk-11

2019-06-02 Thread Steinar Bang
>>>>> Steinar Bang : >> And the reason it tries to throw an exception tin the first place, is >> that ADD_FWK_URL_METHOD is because the "addUrl" method is missing from >> the URL class. > From the google searches I've made addUrl() hasn

Re: Problems running pax exam with openjdk-11

2019-06-06 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Steinar Bang : >>> And the reason it tries to throw an exception tin the first place, is >>> that ADD_FWK_URL_METHOD is because the "addUrl" method is missing from >>> the URL class. >> From

Re: Problems running pax exam with openjdk-11

2019-06-07 Thread Steinar Bang
> Freeman Fang : > Hi Steinar, > Good catch, and this is a known issue in > https://bugs.eclipse.org/bugs/show_bug.cgi?id=515286 > > And this issue has already been fixed. Thanks for the info! Good to hear! :-) > To run your test wit

Re: Problems running pax exam with openjdk-11

2019-06-07 Thread Steinar Bang
> Freeman Fang : > Hi, > If you can send a reproducer project which I can build and run to reproduce > this problem, I will take a close look. git clone https://github.com/steinarb/authservice.git cd authservice git checkout work/use-java-11 mvn clean install If your Java is java-11, then t

Re: Problems running pax exam with openjdk-11

2019-06-07 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Freeman Fang >>>>> : >> Hi, >> If you can send a reproducer project which I can build and run to reproduce >> this problem, I will take a close look. > git clone https://github.com/steinarb/authservic

Re: Problems running pax exam with openjdk-11

2019-06-08 Thread Steinar Bang
>>>>> Steinar Bang : > Side note: I did not intentionally use the eclipse OSGi framework for > the pax exam test. > I pulled in the pax-exam-container-karaf which does not pull in an OSGi > framework, and then needed to make a reference to the pax jdbc karaf >

Re: Problems running pax exam with openjdk-11

2019-06-08 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Steinar Bang : >> Side note: I did not intentionally use the eclipse OSGi framework for >> the pax exam test. >> I pulled in the pax-exam-container-karaf which does not pull in an OSGi >> framework, and then neede

Re: Problems running pax exam with openjdk-11

2019-06-08 Thread Steinar Bang
>>>>> Steinar Bang : > I noticed that the osgi.core version 6.0.0 artifact I have been using, was > pretty old (July 2014): > https://mvnrepository.com/artifact/org.osgi/org.osgi.core > So I looked for OSGi 7 and found this: > https://mvnrepository.com/arti

Re: Problems running pax exam with openjdk-11

2019-06-14 Thread Steinar Bang
> Freeman Fang : > Hi, > Please see the attached patch file, with it, that test can pass with jdk11. Thanks! No luck on my side, unfortunately...:-( It still fails with the error messages below (However, I had to apply everything except the top pom manually, and I may have done something wr

Re: Problems running pax exam with openjdk-11

2019-06-15 Thread Steinar Bang
I've pushed my current jdk11/pax exam experiments to this branch https://github.com/steinarb/scratch/tree/authservice/use-java-11 Freeman Fang's changes are in https://github.com/steinarb/scratch/tree/authservice/fix-jdk-11-pax-exam One thing I noticed with "mvn dependency:tree" was that the JD

Re: Problems running pax exam with openjdk-11

2019-06-15 Thread Steinar Bang
> Jean-Baptiste Onofré > : > You can't use Felix framework 6 as it's OSGi R7. I switched to 5.6.12 which is the one that karaf master currently uses, but got the same failure as with 6.0.3 ("Error installing bundle listed in startup.properties..."). Stack trace included below. > I wil

Re: Problems running pax exam with openjdk-11

2019-06-16 Thread Steinar Bang
> Jean-Baptiste Onofré > : > Did you try with a clean maven repo ? Yes. rm -rf ~/.m2/repository cd ~/workspaces/karaf/karaf git checkout master mvn clean install Fails in this integration test: ... [INFO] Running org.apache.karaf.itests.EquinoxTest 2019-06-16 19:20:40,563 | INFO

Re: Problems running pax exam with openjdk-11

2019-06-17 Thread Steinar Bang
> Freeman Fang : > FYI, I’m using OpenJDK11, Karaf tests work for me with OpenJDK11 > Btw, my env is > Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; > 2018-10-24T14:41:47-04:00) > Maven home: /Users/ffang/kit/apache-maven-3.6.0 > Java version: 11, vendor: Oracle Corporation,

Re: Problems running pax exam with openjdk-11

2019-06-17 Thread Steinar Bang
>>>>> Steinar Bang : >> FYI, I’m using OpenJDK11, Karaf tests work for me with OpenJDK11 >> Btw, my env is >> Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; >> 2018-10-24T14:41:47-04:00) >> Maven home: /Users/ffang/kit/apache-ma

Re: Problems running pax exam with openjdk-11

2019-06-18 Thread Steinar Bang
> Freeman Fang : > You run into this error when building latest karaf master branch with JDK11? Yes. -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe

Re: Derby is looking for assistance with OSGi compatibility

2019-10-19 Thread Steinar Bang
> "'Mark Raynsford' via OPS4J" > : > Yes, I'm going to get the OSGi headers into the published Derby > artifacts (at a minimum) this weekend. Implementing the OSGi JDBC > service also looks pretty easy, so I'll be attempting that too. Another nice thing to have for us karaf users, is if

Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-02-11 Thread Steinar Bang
I'm currently using shiro 1.5.0 with web whiteboard in karaf 4.2.8. I'm using some deprecated Shiro classes to set up shiro, and I want to get rid of using the deprecated classes. The first snag I've encountered when replacing the deprecated classes is that the IniWebEnvironment class needs a Ser

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-22 Thread Steinar Bang
> Grzegorz Grzybek : >> Will it be possible to get a ServletContext OSGi service injected into a >> @Reference, when using the web whiteboard of OSGi 7? >> > Sure - it's described in 128.3.4 Publishing the Servlet Context chapter of > CMPN specification and I think it should already be a cas

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
> Grzegorz Grzybek : > As you can see, the properties you're looking for are there. Please > check `bundle-services -p` command (or Karaf 4 equivalent) to check > what can you filter by. Thanks, Grzegorz! Yep, the properties are present: karaf@root()> bundle:services -p 63 Authentication w

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
>>>>> Steinar Bang : [snip!] > objectClass = [javax.servlet.ServletContext] > osgi.web.contextname = authservice > osgi.web.contextpath = /authservice > osgi.web.symbolicname = no.priv.bang.authservice.web.security > Hm... so why don't I get service inje

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
>>>>> Steinar Bang : > [snip!] >> objectClass = [javax.servlet.ServletContext] >> osgi.web.contextname = authservice >> osgi.web.contextpath = /authservice >> osgi.web.symbolicname = no.priv.bang.authservice.web.security >> Hm... so why don't

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-03-23 Thread Steinar Bang
>>>>> Steinar Bang : >> [snip!] >>> objectClass = [javax.servlet.ServletContext] >>> osgi.web.contextname = authservice >>> osgi.web.contextpath = /authservice >>> osgi.web.symbolicname = no.priv.bang.authservice.web.security >>>

Re: Will ServletContext OSGi service injections be available in the OSGi 7 compatible web whiteboard

2020-04-02 Thread Steinar Bang
Injection of ServletContext worked (as can be seen earlier in this thread). But it turns out it wasn't needed because the Shiro AbstractFilter class[1] extends ServletContextSupport[2], and saves the ServletContext when receiving the FilterConfig[3]. So shiro filters already have the ServletConte

How to fix ClassNotFoundExceptions for exceptions thrown in pax exam test?

2023-06-03 Thread Steinar Bang
Platform: debian 11.7 "bullseye", amd64 openjdk-17-jdk:amd64 17.0.6+10-1~deb11u1 (ie. java 17) karaf 4.4.3 pax-exam 4.13.5 eclipse 2023-03 (4.27.0) I am trying to run a pax exam test that runs a liquibase changelist to set up a schema and then add a row to

Wrong assert displayed as failing when having a failing assert

2023-06-04 Thread Steinar Bang
Platform: debian 11.7 "bullseye", amd64 openjdk-17-jdk:amd64 17.0.6+10-1~deb11u1 (ie. java 17) karaf 4.4.3 pax-exam 4.13.5 eclipse 2023-03 (4.27.0) What I usually do when creating JUnit tests is to run in a red-green-red-green... rythm, the way Martin Fowle

Re: Wrong assert displayed as failing when having a failing assert

2023-06-07 Thread Steinar Bang
> Grzegorz Grzybek : > Hello > I'd like to help, but seeing this in your shared test: > final MavenArtifactUrlReference sampleappFeatureRepo = maven() >> .groupId("no.priv.bang.karaf") >> .artifactId("karaf.liquibase.sample.datasource.receiver") >> > doesn't help - this is your priv

Re: How to fix ClassNotFoundExceptions for exceptions thrown in pax exam test?

2023-06-07 Thread Steinar Bang
> Grzegorz Grzybek : > `RemoteBundleContextClientImpl` in the stack trace means that it (the stack > trace) comes from client side of the test. > Pax Exam is not difficult if it comes about writing @Test-annotated > methods, but it is very difficult when trying to set everything up > correctl

Re: Wrong assert displayed as failing when having a failing assert

2023-06-11 Thread Steinar Bang
>>>>> Steinar Bang : >> You seem to be testing everything including verification of database >> content. Getting assertion exceptions in your tests code _may_ lead to >> transaction rollback (I have no idea if this is true - I'd have to see >> your enti

Re: Wrong assert displayed as failing when having a failing assert

2023-06-24 Thread Steinar Bang
> Grzegorz Grzybek : > Hello > Sorry, but I didn't have time to check/run your integration tests. > You've mentioned that the test may be run twice - that's possible depending > on the configuration of maven-surefire/failsafe-plugin. I don't know. > Usually in such cases I turn on quite detail

Re: Wrong assert displayed as failing when having a failing assert

2023-06-27 Thread Steinar Bang
> Grzegorz Grzybek : >> Where does the log affected by this config end up? > It should be a test log from Pax Exam itself in target directory of Maven > module: target/logs/pax-exam-test.log I wasn't able to make it work, unfortunately. I did the following: 1. Added the log4j2-test.properti

Searching for bean gives classNotFoundException

2023-12-11 Thread Steinar Bang
I need some pax exam help. I get a ClassNotFoundException I don't know how to fix. I can access the bean Account for use in asserts without errors. But once I use stream, filter and findFirst to find a particular account I get ClassNotFoundException on the account. I have the following pax exam

Re: Searching for bean gives classNotFoundException

2023-12-11 Thread Steinar Bang
So I tried a simple for loop instead: @Test public void testLoadFeature() throws Exception { // NOSONAR this test has an assert, just not an assert sonar recognizes installAndAssertFeature("karaf-liquibase-sample-datasource-receiver"); var service = getOsgiService(SampleLi

Re: Searching for bean gives classNotFoundException

2023-12-11 Thread Steinar Bang
This is clumsy, but it worked: @Test public void testLoadFeature() throws Exception { // NOSONAR this test has an assert, just not an assert sonar recognizes installAndAssertFeature("karaf-liquibase-sample-datasource-receiver"); var service = getOsgiService(SampleLiquibas

Is a failing Pax Exam test run twice?

2023-12-11 Thread Steinar Bang
(I have a feeling I've asked this before but google doesn't find it) Is a failing pax exam test run twice? The reason I'm asking is that I saw this earlier today: https://gist.github.com/steinarb/640801f57b4bbec3cfa6d2aaefa37b16 First I get an assertion error in line 67 of the test: https://g

Re: Searching for bean gives classNotFoundException

2023-12-11 Thread Steinar Bang
>>>>> Steinar Bang : > So I guess it has something to do with function scopes? I am thinking the clue is in one word in the error message: > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.93

The pax exam lifecycle explained?

2023-12-12 Thread Steinar Bang
Does an explanation of the pax exam lifecycle exist somewhere? Both the life cycle of the OSGi process under test and the life cycle of the test itself. I've been using pax exam tests since 2015 but the behaviour of the tests have often been a mystery for me... -- -- -- OPS4J -

Re: The pax exam lifecycle explained?

2023-12-12 Thread Steinar Bang
> Grzegorz Grzybek : > I see your messages about Pax Exam problems and frustrations and while I > don't have answers for your questions about liquibase OSGi problems Well... heh! I worked my way around the liquibase problems yesterday by swapping derby in the pax exam test of the feature wit

Re: The pax exam lifecycle explained?

2024-01-02 Thread Steinar Bang
> 'Christoph Läubrich' via OPS4J > : > Just in case you don not need all the fancy magic of pax exam what is > really only rarely needed in most cases you can use osgi-test > framework as a lightweight alternative: > https://github.com/osgi/osgi-test/ Interesting! What I want, except f

Possible to use newer derby for pax jdbc-config?

2024-04-07 Thread Steinar Bang
Ref.: https://github.com/ops4j/org.ops4j.pax.jdbc/issues/364 Is it possible to use pax jdbc-config for derby with a newer version of derby than the one provided by pax-jdbc 1.5.7? Thanks! - Steinar -- -- -- OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You recei

Re: Possible to use newer derby for pax jdbc-config?

2024-04-07 Thread Steinar Bang
>>>>> Steinar Bang : > Ref.: https://github.com/ops4j/org.ops4j.pax.jdbc/issues/364 > Is it possible to use pax jdbc-config for derby with a newer version of > derby than the one provided by pax-jdbc 1.5.7? Not loading the pax-jdbc-derby feature and loading something el

How to get a WebContainer service registered in Pax Exam 4.7.1?

2016-08-07 Thread Steinar Bang
I am trying to get a pax exam test for a bundle that expects to find an OSGi service of the type org.ops4j.pax.web.service.WebContainer Does anyone know the easiest way to get such a service registered? I have tried firing up "org.apache.felix":"org.apache.felix.http.jetty":"2.3.2" but that didn

Re: How to get a WebContainer service registered in Pax Exam 4.7.1?

2016-08-07 Thread Steinar Bang
>>>>> Steinar Bang : > I am trying to get a pax exam test for a bundle that expects to find an > OSGi service of the type > org.ops4j.pax.web.service.WebContainer > Does anyone know the easiest way to get such a service registered? > I have tried

Re: How to get a WebContainer service registered in Pax Exam 4.7.1?

2016-08-07 Thread Steinar Bang
>>>>> Steinar Bang : > As an experiment I changed the service looked for to > org.osgi.service.http.HttpService that is the base interface of > WebContainer, and then it worked with > "org.apache.felix":"org.apache.felix.http.jetty":"2.3.2&qu

Re: How to get a WebContainer service registered in Pax Exam 4.7.1?

2016-08-07 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > I'm on vacation right now so it's only a small mail with some hints. > First take a look at the PAX Web integration tests which itself use PAX > exam for testing. That should already fix all your questions. > https://github.com/ops4j/org.ops4j.pax.web/tree/m

Re: Pax-Web JSF+Primefaces on Wildfly 9

2016-08-09 Thread Steinar Bang
> Phong Pham : > In the mean time, you mentioned that "you can use Pax-Web" web framework. > What would I need to do to use this? I read this to mean: "pull the appropriate Pax Web bundles into the JBOSGi runtime, and start them". (as to figuring out what "the appropriate Pax Web bundles"

Re: How to get a WebContainer service registered in Pax Exam 4.7.1?

2016-08-09 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> "'Achim Nierbeck' via OPS4J" : >> I'm on vacation right now so it's only a small mail with some hints. >> First take a look at the PAX Web integration tests which itself use >> PAX exam f

Documentation for the maven-pax-plugin?

2016-08-11 Thread Steinar Bang
I read the "maven cookbook" a couple of years back, and one thing I picked up was using the maven-pax-plugin to start an OSGi container https://books.sonatype.com/mcookbook/reference/osgi-sect-starting-osgi-container.html https://books.sonatype.com/mcookbook/reference/ch01s04.html I've used thi

Why does the pom of the pax web primefaces sample import jsp packages?

2016-08-11 Thread Steinar Bang
Why does https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/war-jsf-primefaces/pom.xml import JSP stuff, like: javax.servlet.jsp;version="[2.2.0,3.0.0)", javax.servlet.jsp.jstl.core;version="1.2", javax.servlet.jsp.jstl.fmt;version="1.2", javax.servlet.jsp.jstl.tlv;version

Re: Why does the pom of the pax web primefaces sample import jsp packages?

2016-08-12 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > It's a OSGi ready WAB and therefore should declare those packages which it > needs to import. Yes, I understand that part. But I was wondering why a sample project with "primefaces" as part of its name, and containing only .xhtml files and no .jsp files imp

Re: Why does the pom of the pax web primefaces sample import jsp packages?

2016-08-12 Thread Steinar Bang
>>>>> Steinar Bang : > Ie. what does this particular OSGi ready war use, that forces the need > to import the JSP stuff? Is it the faces servlet that needs the JSP stuff, since the faces servlet can be used with JSPs as well as .xhtml pages? -- -- --

Re: Documentation for the maven-pax-plugin?

2016-08-18 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > well pax construct, a main part of Pax Exam isn't needed any longer > for pax Exam. Therefore it kind of got abandoned. Too bad. It's really neat for quick turnaround in development of eg. pax web applications. > But 7 Month ago a newer release has been m

Does anyone have examples of getting PAX JDBC services in JSF Faces beans?

2016-08-22 Thread Steinar Bang
I now have a PAX Web application running with a primefaces GUI and mock data in the beans: https://github.com/steinarb/ukelonn/tree/using-primefaces/ukelonn.bundle https://github.com/steinarb/ukelonn/blob/using-primefaces/ukelonn.bundle/src/main/webapp/ukelonn.xhtml https://github.com/steinarb

Re: Does anyone have examples of getting PAX JDBC services in JSF Faces beans?

2016-09-01 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > it's a web bundle right? Yes. It has to be to get JSF working, if I've understood correctly...? > In that case it's a bit more tricky. Yes, web bundles are strange... > If you'd mix in Pax CDI this could be a possible solution. > An Example on how to mix

Re: Does anyone have examples of getting PAX JDBC services in JSF Faces beans?

2016-09-01 Thread Steinar Bang
> Marc Schlegel : > Hi Steinar. > The problem is, that JSF doesn`t provide any means to handle OSGi services. > CDI would solve this but at the moment it is not possible to use > CDI-Annotations in a JSF-Controller (UkelonnController) because JSF inside > Pax-Web cannot resolve beans within

Re: Does anyone have examples of getting PAX JDBC services in JSF Faces beans?

2016-09-02 Thread Steinar Bang
>>>>> Steinar Bang : > I already have OSGi service injections, and I would have been able to > hand those over to a servlet. [snip!] > But the problem is how to get the captured OSGi services into the > beans that are created on need by the JSF servlet...? > I could

Problems using @PostConstruct on primefaces bean in Pax web 4.2.7

2016-09-03 Thread Steinar Bang
Platform: Intel i7, Windows 7 professional, eclipse Neon 4.6.0 m2e 1.7.0.20160603-1933 (ie. the version bundled with eclipse Neon) Java SDK 1.8.0_91 Pax web 4.2.7 Pax exam 4.9.1 Apache myfaces 2.2.6 primefaces 5.1 I was trying t

What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
Hi, What are people using for debugging Pax Web JSF applications (ie. the bean code) in eclipse? Creating an eclipse OSGi run configuration from scratch? (it would be neat if that could use maven dependencies through m2e, but google hasn't found me anything saying that this is the case) Use the

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
>>>>> Steinar Bang : > Creating an eclipse OSGi run configuration from scratch? (it would be > neat if that could use maven dependencies through m2e, but google hasn't > found me anything saying that this is the case) I tried this, but as far as I can tell it is o

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
>>>>> Steinar Bang : > Use the eclipse pax runner? > https://ops4j1.jira.com/wiki/display/paxrunner/Eclipse+Plugin > (seems abandoned...?) This is newer: https://github.com/ops4j/org.ops4j.pax.runner https://ops4j1.jira.com/wiki/display/paxrunner/Pax+Runner But AFAICT

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
>>>>> Steinar Bang : >>>>> Steinar Bang : >> Use the eclipse pax runner? >> https://ops4j1.jira.com/wiki/display/paxrunner/Eclipse+Plugin >> (seems abandoned...?) > This is newer: > https://github.com/ops4j/org.ops4j.pax.runner > https:/

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
> Benson Margulies : > Why not just run the junit test in eclipse the usual way? Assuming > that you are not using the exam-maven-plugin. That would require a test-that-isn't-actually-a-test-but-just-a-way-of-launching-an-osgi-runtime-with-my-bundles. And that seems kind of clumsy, and it fe

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
>>>>> Steinar Bang : > Start the webapp i karaf and remote debug that...? > http://karaf.apache.org/manual/latest-3.0.x/#_debugging Back in 2011 there was an eclipse Karaf integration that looked promising: https://www.youtube.com/watch?v=Z1zVLDwd02Q Unfortunately it

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-27 Thread Steinar Bang
> Benson Margulies : > Surely you want something that also works in your commands-line/CI > system, not just eclipse? I plan to use karaf to actually run the webapp. But for now, I run the bundle(s) in two places; 1. In a PaxExam JUnit test https://github.com/steinarb/ukelonn/tree/mas

Re: What's the best way of debugging Pax Web applications in eclipse?

2016-09-30 Thread Steinar Bang
>>>>> Steinar Bang : >> Creating an eclipse OSGi run configuration from scratch? (it would be >> neat if that could use maven dependencies through m2e, but google hasn't >> found me anything saying that this is the case) > I tried this, but as far

Pax exam test fails on some setups and works on others

2016-10-09 Thread Steinar Bang
I have a pax exam test https://github.com/steinarb/ukelonn/blob/using-primefaces/ukelonn.tests/src/test/java/no/priv/bang/ukelonn/tests/UkelonnServiceIntegrationTest.java that works on two of my development environments and fails on one of them. The one that fails, is: - Windows 10 - mvn 3.2.1

Re: Pax exam test fails on some setups and works on others

2016-10-09 Thread Steinar Bang
>>>>> Steinar Bang : > Is the cause the newer maven version on the failing computer? > Or is it that this will work in Java 8 but not in Java 7? Another thing could have been that my pax-exam version was too old to work properly with the new maven on the failing machine..

Re: Pax exam test fails on some setups and works on others

2016-10-09 Thread Steinar Bang
>>>>> Steinar Bang : >> I have a pax exam test >> >> https://github.com/steinarb/ukelonn/blob/using-primefaces/ukelonn.tests/src/test/java/no/priv/bang/ukelonn/tests/UkelonnServiceIntegrationTest.java >> that works on two of my development environments

Re: Pax exam test fails on some setups and works on others

2016-10-09 Thread Steinar Bang
> Harald Wellmann : > There might be an issue with the system packages exported by your OSGi > framework for the given JRE. > On the failing platform (Win 10, Java 7), does your application start > without Pax Exam? Yes. The application runs from my maven + gogoshell setup, and it runs in k

No shiro for karaf 4?

2016-10-11 Thread Steinar Bang
I downloaded and unpacked the newest karaf, which currently is version 4.0.7. I then installed the newest shiro features file: feature:repo-add mvn:org.apache.shiro/shiro-features/1.3.2/xml/features and tried to install shiro-web: feature:install shiro-web However, shiro-web fails because it re

Re: No shiro for karaf 4?

2016-10-12 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" : > did you consider point 4? > open jira issue for an dependency upgrade and provide a PR / Fix yourself > in the Pax-Shiro project to actually use the latest and greatest version of > pax-web ;) Ah, but it wasn't the Pax-Shiro feature I tried to install, becau

Re: Documentation for the maven-pax-plugin?

2016-10-12 Thread Steinar Bang
> "'Achim Nierbeck' via OPS4J" > : [snip!] > Need a Jira/Confluence account? Give me a hint I'll create it for you, > we've been swamped with Spam on the Jira. > That's the reason the self-registration is disabled for now. I can't promise to contribute anything, but it might be a good id

  1   2   >