Re: Apache Karaf 4.x JPA - Working example

2018-07-24 Thread François Papon
Hi Miroslav,

The changes are :

- use the H2 drivers with class declaration
- add jndi feature
- add capabilities for Hibernate Persistence Provider

The provider module emmebed the persistence.xml with the Persistence provider 
declaration inside so it require the Persistence provider.

We have :
- common feature : provide Hibernate Persistence capabilities
- provider feature : require Hibernate Persistence capabilities

About feature xml and blueprint DSL, this not the same. The feature XML is used 
to packaging bundles and bundles/feature  dependencies, the blueprint xml is 
used to manage your services instances and their services usage.

Regards

François

Le 25 juil. 2018 00:14, Miroslav Beranič  a écrit :
>
> Hi,
>
> @Jean-Baptiste Onofré, François: I can confirm, issues is fixed now. I can 
> get JPA example working. I see output in Karaf Shell.
>
> but :)
>
>
> What was the fix ( so I can understand what was wrong, for any future case, 
> other projects ):
>
> I see 
> examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml
>  ( I guess this is most of the fix )
>
>      
>          transaction          
> transaction
> +        jndi
>          pax-jdbc-config          
> pax-jdbc-config
>          pax-jdbc-h2          
> pax-jdbc-h2
>          pax-jdbc-pool-dbcp2          
> pax-jdbc-pool-dbcp2
>          jdbc          jdbc
>          jpa           version="[2,3)">jpa
> -        hibernate
> +        hibernate
> +        
> +            
> osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider
> +        
>            
>
> So this three lines:
> +        
> +            
> osgi.service;objectClass=javax.persistence.spi.PersistenceProvider;effective:=active;javax.persistence.provider=org.hibernate.jpa.HibernatePersistenceProvider
> +        
>
> I have similar Bundle structure, but I have dedicated Bundle for DataSource 
> setup/configuration. How do I translate this "Feature DSL" to "Blueprint DSL" 
> ==> How would this translate into Blueprint XML?
>
> So changes look they make sense but, this is first time I see this to be 
> defined so explicit. This was my original complaint, as it always looked like 
> this piece of code was missing ( also in other available online examples ).
>
> I also guess "effective:=active;" is important ( as I read the "I've 
> explained it already three times" forum post ) ( FW: 
> http://karaf.922171.n3.nabble.com/What-does-effective-active-mean-td4047770.html
>  )
>
> Well, thank you both very much. Saved me tons of headache.
>
> Kind Regards,
> Miroslav
>
>
> 2018-07-24 20:51 GMT+02:00 Jean-Baptiste Onofré :
>>
>> Hi,
>>
>> François just fixed the JPA example of the DEV_GUIDE branch.
>>
>> I will add the corresponding examples itests tomorrow.
>>
>> Regards
>> JB
>>
>> On 20/07/2018 16:17, Miroslav Beranič wrote:
>> > Hi,
>> > 
>> > I've upgraded my environment from ServiceMix 7.1.0-SNAPSHOT ( running
>> > Karaf 4.0.9 ) to Karaf 4.1.x ( GitHub ) branch and later on I've
>> > experimented with version 4.2.x.
>> > I was using linked linkes from Karaf home page (
>> > https://karaf.apache.org/documentation.html ) to GitHub Examples - for JPA.
>> > 
>> > My main task is to get JPA 2 up and running, but I fail to do so.
>> > 
>> > So on provided examples Github repository:
>> > https://github.com/jbonofre/karaf/tree/DEV_GUIDE/examples/karaf-jpa-example
>> > 
>> > I've tested with Karaf 4.1.x and 4.2.x and in both version, Examples for
>> > JPA do now work - for me.
>> > 
>> > For Karaf 4.2.x I've created PasteBin outputs ( please see ):
>> > 1.) https://pastebin.com/eJybVNhn
>> > 2.) https://pastebin.com/W2UhihdR
>> > 
>> > In examples, I've noted that there is a reference to Hibernate
>> > 6.0.10.Final - this version is not released yet ( hibernate.org
>> >  ), so I guess this is a wrong version, or ? as I
>> > see Karaf has build-in support for Hibernate 5.2.9.Final.
>> > 
>> > https://github.com/jbonofre/karaf/blob/DEV_GUIDE/examples/karaf-jpa-example/karaf-jpa-example-features/src/main/feature/feature.xml
>> > 
>> > For Hibernate version I am looking at:
>> > https://github.com/apache/karaf/blob/master/pom.xml
>> > 5.2.9.Final
>> > 
>> > So what I did was:
>> > 
>> > 1.) checked out Karaf 4.1.x from Github
>> > 2.) checked out Karaf Examples ( DEV_GUIDE branch from Github )
>> > 
>> > 3.) Build Karaf with Maven: mvn -Pfastinstall and started Karaf with
>> > ./bin/karaf debug
>> > 4.) Build Karaf Examples ( changed version of Hibernate from
>> > 6.0.10.Final to 5.2.9.Final )
>> > 
>> > Read instruction from:
>> > https://github.com/jbonofre/karaf/blob/DEV_GUIDE/examples/karaf-jpa-example/README.md
>> > 
>> > 5.) feature:repo-add
>> > mvn:org.apache.karaf.examples/karaf-jpa-example-features/4.2.1-SNAPSHOT/xml
>> > 6.) feature:install karaf-jpa-example-datasource
>> > 7.) feature:install karaf-jpa-example-provider
>> 

Re: Installing cxf-jaxrs and http-whiteboard on virgin karaf v4.2.0 silently fail with "Unable to start pax web server: Weaving hook failed."

2018-07-12 Thread François Papon
Hi,

You are using a jdk 10, could you try with a jdk 9 ?

Regards,

François

Le 13 juil. 2018 06:45, Paul Spencer  a écrit :
>
> Installing cxf-jaxrs and http-whiteboard on virgin karaf v4.2.0 silently fail 
> with "Unable to start pax web server: Weaving hook failed." 
>
> I am started with a freshly installed copy of karaf. 
>
> Why is pax-web not starting? 
>
> Paul Spencer 
>
>
> *** 
> * Console Log 
> *** 
> sparrow:apache-karaf-4.2.0 paul$ bin/start 
> sparrow:apache-karaf-4.2.0 paul$ bin/client 
> Logging in as karaf 
>     __ __    
>    / //_/ __ _/ __/  
>   / ,<  / __ `/ ___/ __ `/ /_    
>  / /| |/ /_/ / /  / /_/ / __/    
>     /_/ |_|\__,_/_/   \__,_/_/ 
>
>   Apache Karaf (4.2.0) 
>
> Hit '' for a list of available commands 
> and '[cmd] --help' for help on a specific command. 
> Hit 'system:shutdown' to shutdown Karaf. 
> Hit '' or type 'logout' to disconnect shell from current session. 
>
> karaf@root()> repo-add cxf
>   
>   
> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/RELEASE/xml/features 
> karaf@root()> feature:install cxf-jaxrs http-whiteboard 
> karaf@root()> list 
> START LEVEL 100 , List Threshold: 50 
> ID │ State  │ Lvl │ Version │ Name 
> ┼┼─┼─┼───
>  
> 21 │ Active │  80 │ 4.2.0   │ Apache Karaf :: OSGi Services :: Event 
> 73 │ Active │  80 │ 4.6.0   │ Apache XBean OSGI Bundle Utilities 
> 74 │ Active │  80 │ 4.6.0   │ Apache XBean :: Classpath Resource Finder 
> 103 │ Active │  80 │ 6.0 │ ASM 
> 104 │ Active │  80 │ 6.0 │ ASM commons classes 
> 105 │ Active │  80 │ 6.0 │ ASM Tree class visitor 
> karaf@root()> shell:info 
> Karaf 
>   Karaf version   4.2.0 
>   Karaf home  /Users/paul/Downloads/apache-karaf-4.2.0 
>   Karaf base  /Users/paul/Downloads/apache-karaf-4.2.0 
>   OSGi Framework  org.apache.felix.framework-5.6.10 
>
> JVM 
>   Java Virtual Machine    Java HotSpot(TM) 64-Bit Server VM version 
> 10.0.1+10 
>   Version 10.0.1 
>   Vendor  "Oracle Corporation" 
>   Pid 7220 
>   Uptime  12 minutes 
>   Process CPU time    32.502 seconds 
>   Process CPU load    0.00 
>   System CPU load 0.00 
>   Open file descriptors   152 
>   Max file descriptors    10,240 
>   Total compile time  22.879 seconds 
> Threads 
>   Live threads    75 
>   Daemon threads  61 
>   Peak    88 
>   Total started   146 
> Memory 
>   Current heap size   41,553 kbytes 
>   Maximum heap size   524,288 kbytes 
>   Committed heap size 131,072 kbytes 
>   Pending objects 0 
>   Garbage collector   Name = 'G1 Young Generation', Collections = 10, 
> Time = 0.084 seconds 
>   Garbage collector   Name = 'G1 Old Generation', Collections = 0, 
> Time = 0.000 seconds 
> Classes 
>   Current classes loaded  9,220 
>   Total classes loaded    9,220 
>   Total classes unloaded  0 
> Operating system 
>   Name    Mac OS X version 10.13.5 
>   Architecture    x86_64 
>   Processors  8 
> karaf@root()> 
>   
>   karaf@root()> 
>
>
> *** 
> * From karaf.log 
> *** 
> 22:34:12.283 INFO [pipe-feature:install cxf-jaxrs http-whiteboard] Adding 
> features: http-whiteboard/[4.2.0,4.2.0],cxf-jaxrs/[3.2.5,3.2.5] 
> 22:34:12.590 INFO [features-3-thread-1] Changes to perform: 
> 22:34:12.592 INFO [features-3-thread-1]   Region: root 
> 22:34:12.593 INFO [features-3-thread-1] Bundles to install: 
> 22:34:12.594 INFO [features-3-thread-1]   
> mvn:com.fasterxml.woodstox/woodstox-core/5.0.3 
> 22:34:12.595 INFO [features-3-thread-1]   
> mvn:javax.annotation/javax.annotation-api/1.3 
> 22:34:12.596 INFO [features-3-thread-1]   mvn:javax.el/javax.el-api/3.0.0 
> 22:34:12.597 INFO [features-3-thread-1]   mvn:javax.mail/mail/1.4.4 
> 22:34:12.598 INFO [features-3-thread-1]   
> mvn:javax.servlet/javax.servlet-api/3.1.0 
> 22:34:12.599 INFO [features-3-thread-1]   
> mvn:javax.websocket/javax.websocket-api/1.1 
> 22:34:12.600 INFO [features-3-thread-1]   
> mvn:org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle/1.0.10 
> 22:34:12.602 INFO [features-3-thread-1]   
> mvn:org.apache.cxf/cxf-core/3.2.5 
> 22:34:12.603 INFO 

Re: JPA (Hibernate) with Apache Karaf 4.2

2018-05-29 Thread François Papon
Hi Alex,

We have already start example in a dev guide and planned to released it in the 
4.2.1 or Karaf.

You have a preview on the JB repo :

https://github.com/jbonofre/karaf/tree/DEV_GUIDE/examples

There is JPA example working with Hibernate.

Hope it can help and you are welcome to contribute :)

François

Le 29 mai 2018 10:54 PM, alex09  a écrit :
>
> Hi there, 
>
> being new to OSGi, I have difficulties getting demos/examples/tutorials to 
> run (esp. with JPA) with Apache Karaf 4.2. 
>
> I tried all these resources: 
> * Apache Aries 2.7 JPA examples: 
> https://github.com/apache/aries-jpa/tree/master/examples (also user 
> documentation is not accurate for the current Karaf versions) 
> * Tutorials at http://karaf.apache.org/documentation.html#tutorials, which 
> don't work as liquid-reality.de has not been available for weeks now (I 
> found some of them here, but still they don't work: 
> https://github.com/cschneider/Karaf-Tutorial) 
> * Apache Aries 2.7: The Blog Example: 
> http://aries.apache.org/modules/samples/blog-sample.html 
> * Hibernate Demos: 
> https://github.com/hibernate/hibernate-demos/tree/master/hibernate-orm/osgi 
> (also reflecting the outdated user documentation) 
> * also the Entwicklerpress 143 book "OSGi Entwicklung" and Enterprise OSGi 
> in Action 
>
> All without success, the sample are really dated and there is a lot more to 
> do than just simple changes - this is difficult for someone coming new to 
> this topic. 
> I'd certainly volunteer for helping with this, but as there is no starting 
> point currently, this is complicated. 
>
> So my question is: are there any plans to create a new, sound 
> description/documentation/tutorial/example for JPA/Hibernate on Apache Karaf 
> 4.x? Or isn't this supposed to work anymore as there are better practices 
> for persistence in OSGi? 
>
> Thanks & Best 
>
> Alex 
>
>
>
> -- 
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html 


Re: Odd feature repo behavior in 4.2.0 custom distrorome

2018-05-13 Thread François Papon
Hi,

Did the feature:list show your feature un your custom distribution ?

You also set log to debug and see if there is something wrong.

François

Le 13 mai 2018 00:43, Erwin Hogeweg  a écrit :
>
> Hi -
>
> I ran into an issue with a custom distro.
>
> Installing a local feature from the console works just fine, but when I 
> include the feature repo in the org.apache.karaf.features.cfg file the 
> feature won’t load because karaf thinks it doesn’t exist.
>
> This is what I get when I install from the console while the :
>
> karaf@root()> feature:repo-add 
> mvn:com.myproject/my-features/1.0.0-SNAPSHOT/xml/features
> karaf@root()> feature:repo-list
>   my-features-1.0.0-SNAPSHOT               │ 
> mvn:com.myproject/my-features/1.0.0-SNAPSHOT/xml/features
> karaf@root()> feature:install my-feature
> karaf@root()> 
>
> This is the entry in the distro pom to add the repo to the config file:
>
> 
> com.myproject
> my-features
> ${project.version}
> features
> xml
> runtime
> 
>
>
> And this is what I get when I install the feature in the distro:
>
> feature:repo-list
>   my-features                     │ 
> mvn:com.myproject/my-features/1.0.0-SNAPSHOT/xml/features
> karaf@root()> feature:install my-feature
> Error executing command: No matching features for my-feature/0
>
> Not sure what is going on here. In the first case the Repository name shown 
> is the feature name as defined in feature.xml, in the second case it is the 
> feature artifact name as defined in the pom.xml.
>
> I checked the docs and compared my distro pom with the 4.2.0 source code. I 
> don’t see (...) any glaring mistakes, but obviously something must be wrong.
>
> Any suggestions are greatly appreciated.
>
>
> Kind Regards,
>
> Erwin

Re: Repo-add timed out on HTTP url

2018-03-15 Thread François Papon
Can you to put the arguments inside the .bat file ?

Le 16 mars 2018 7:37 AM, Spaulding  a écrit :
>
> Here is the settings.xml proxy section with proxy host\port changed to a 
> garbage value: 
>
>    
>   
>    optional 
>    true 
>    http 
>    proxy.myhost.com 
>    8080 
>   
>
> regarding the arguments, I just appended them on the command line as such: 
> bin/karaf.bat -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=80 
>
>
>
> -- 
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html 


Re: Repo-add timed out on HTTP url

2018-03-15 Thread François Papon
Hi,

Can you share the proxy section of your maven settings.xml ?

François

Le 16 mars 2018 7:24 AM, Spaulding  a écrit :
>
> used -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=80, but still no luck. 
> changed host and port to the actual proxy settings. 
>
>
>
> -- 
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html 


Re: 4.1.5 and Karaf Maven Plugin

2018-02-25 Thread François Papon
Hi,

Your repository mvnrepo:8080 required an authentication (401). Are you using 
the same repository when you build on local ? May be your old job is ok because 
the artefacts already are in the workspace of Jenkins.

Francois

Le 25 févr. 2018 23:50, Ryan Moquin  a écrit :
>
> Has anyone had any weird issues with the karaf-maven-plugin having issues 
> pulling the framework features xml when building a distribution?  After 
> switching to 4.1.5, our jenkins build fails due to a 401 trying to retrieve 
> the 4.1.5 features xml when building a distribution.  If I change the version 
> back to a previous Karaf version, it works.  I can also see that features xml 
> file in our private maven repository and I can access it without any issues 
> using the maven credentials our jenkins server is using.  I notice the 
> stacktrace is coming from ops4j (and I think I saw in the Karaf release notes 
> the pax url library was updated.)  What's weird is that this ONLY happens on 
> our Jenkins server.  If I build on my machine locally which uses the same 
> maven proxy settings (to route all requests through our private maven server) 
> with the exception of different credentials.
>
> The only thing I can think of that is going on is that our Jenkins job is 
> configured with a custom settings.xml for our build, so the settings.xml 
> isn't in the default location.  I'm wondering if somehow when the 
> karaf-maven-plugin uses ops4j to retrieve maven resources, it's somehow not 
> picking up the custom maven settings? I'm not sure if this could be ops4j or 
> the karaf plugin...
>
> Does anyone have any pointers how I might be able to troubleshoot what is 
> going on (since this is happening on Jenkins only, it makes troubleshooting a 
> bit trickier):
>
> [DEBUG] Connection released: [id: 0][route: {}->http://mvnrepo:8080][total 
> kept alive: 0; route allocated: 0 of 20; total allocated: 0 of 40]
> [WARNING] Error resolving artifact 
> org.apache.karaf.features:framework:xml:features:4.1.5: [Could not transfer 
> artifact org.apache.karaf.features:framework:xml:features:4.1.5 from/to 
> nexus-mirror (http://mvnrepo:8080/nexus/content/groups/public/): Not 
> authorized , ReasonPhrase:Unauthorized.]
> java.io.IOException: Error resolving artifact 
> org.apache.karaf.features:framework:xml:features:4.1.5: [Could not transfer 
> artifact org.apache.karaf.features:framework:xml:features:4.1.5 from/to 
> nexus-mirror (http://mvnrepo:8080/nexus/content/groups/public/): Not 
> authorized , ReasonPhrase:Unauthorized.]
> at 
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:720)
> at 
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659)
> at 
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600)
> at 
> org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567)
> at 
> org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:47)
> at 
> org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Suppressed: shaded.org.eclipse.aether.transfer.ArtifactTransferException: 
> Could not transfer artifact 
> org.apache.karaf.features:framework:xml:features:4.1.5 from/to nexus-mirror 
> (http://mvnrepo:8080/nexus/content/groups/public/): Not authorized , 
> ReasonPhrase:Unauthorized.
> at 
> shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
> at 
> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
> at 
> shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
> at 
> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
> at 
> shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
> at 
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
> at 
> shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
> at 
> 

Re: Error downloading mvn:org.apache.felix/org.apache.felix.scr/2.0.12

2018-02-03 Thread François Papon
Ok, I tried and I know that JB always find the right solution :)

François

Le 3 févr. 2018 17:57, anynamus a écrit : > > Hi François, > > It does not work 
more with the /http://repo1.maven.apache.org/maven2/ URL > > Thanks anyway ;) > 
> Kind Regards > PES > > > > > -- > Sent from: 
http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Error downloading mvn:org.apache.felix/org.apache.felix.scr/2.0.12

2018-02-02 Thread François Papon
Sorry I made a mistake on the URL it should be :

http://repo1.maven.apache.org/maven2

Could you try again with this one on the settings.xml ?

François

Le 3 févr. 2018 1:15 AM, anynamus  a écrit :
>
> Hi François, 
>
> This configuration was not set because we use an internal instance of 
> Artifactory. 
>
> I configured my settings.xml to bypass Artifactory and configured the mirror 
> you specified and I got almost the same error: 
>
> 2018-02-02T16:08:47,582 | WARN  | pool-26-thread-4 | AetherBasedResolver  
>    
> | 4 - org.ops4j.pax.url.mvn - 2.5.3 | Error resolving artifact 
> org.apache.felix:org.apache.felix.scr:jar:2.0.12: [Could not transfer 
> artifact org.apache.felix:org.apache.felix.scr:jar:2.0.12 from/to US 
> (http://repo.maven.apache.org/maven2): 
> C:\Users\anynamus\.m2\repository\org\apache\felix\org.apache.felix.scr\2.0.12\org.apache.felix.scr-2.0.12.jar.part.lock
>  
> (The system cannot find the path specified)] 
> java.io.IOException: Error resolving artifact 
> org.apache.felix:org.apache.felix.scr:jar:2.0.12: [Could not transfer 
> artifact org.apache.felix:org.apache.felix.scr:jar:2.0.12 from/to US 
> (http://repo.maven.apache.org/maven2): 
> C:\Users\anynamus\.m2\repository\org\apache\felix\org.apache.felix.scr\2.0.12\org.apache.felix.scr-2.0.12.jar.part.lock
>  
> (The system cannot find the path specified)] 
>
>
> Regards. 
> Pascal-Eric 
>
>
>
>
> -- 
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html 


Re: Unable to get module classpath

2018-01-26 Thread François Papon
Hi,

We can't see your first error, can you repaste it ?

François

Le 26 janv. 2018 12:19 PM, GFO  a écrit :
>
> I am facing a problem with one of my OSGi bundles. 
> When I start it, I have the following error : 
>
>     
>
> It is not blocking for starting my bundle, it is "Active". But when I try to 
> execute a SQL command through my Java code, it only works with native 
> queries. When I try to execute HQL queries/named queries, I always have 
> errors such as 
>
>     ClassCastException: com.example.MyBean cannot be cast to 
> com.example.MyBean 
>
> I guess it is linked to the first error. What do you think about that? Do 
> you know how to prevent the first error? 
>
> Additional information: 
>
> - I have a bundle bundleA which contains persistence configuration, beans 
> (like MyBean), managers, etc. I also have bundleB which uses a service 
> exposed by bundleA. So the error appears when I call bundleA service through 
> bundleB. Alongside bundleA and bundleB, I have hibernate-osgi, 
> hibernate-entitymanager, hibernate-core and hibernate-commons-annotations 
> bundles in version 4.3.6.Final. 
>
> - Only bundleA contains MyBean class. BundleB has "Import-Package: 
> com.example" and "Import-Service: com.example.service" which is a service to 
> interact with managers contained in bundleA. When I show classes in bundleA 
> and bundleB with "bundle:classes" Karaf command, I find MyBean in both 
> bundles 
>
> - when I look at classes in my jars, I only find MyBean in bundleA. Not in 
> bundleB. Maybe "bundle:classes" shows classes in the bundle's jar and 
> classes imported by the bundle? 
>
> Do not hesitate if you need more information. 
>
> Thanks a lot 
>
>
>
> -- 
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html 


Re: Starting bundle: spring error in camel context

2018-01-04 Thread François Papon
Do you embedded a Spring dependencie in your bundle ?

Le 4 janv. 2018 10:09 PM, GFO a écrit : > > Hi, > > I think it has been 
deleted, it was in the message when I previewed it... > > Here is the pastebin 
link: https://pastebin.com/LkKDwv89 > > Thanks, > GFO > > > > -- > Sent from: 
http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: [4.2.0.M1] - Assembly build failed with endorsed libraries

2017-11-06 Thread François Papon
Ok, I will remove this tag.

Thanks

Le 7 nov. 2017 00:17, Jean-Baptiste Onofré  a écrit :
>
> Hi, 
>
> As Karaf 4.2.x targets Java 9, we had to change some stuff. As endorsed 
> doesn't 
> exist anymore in Java 9,  tag should stay empty. 
>
> Regards 
> JB 
>
> On 11/06/2017 09:12 PM, Francois Papon wrote: 
> > Hi, 
> > 
> > I just change the Karaf version of my custom distribution from 4.1.2 to 
> > 4.2.0.M1 
> > and the maven build failed on the assembly. 
> > 
> > The endorsed librairies are found by the plugin in the local repository but 
> > not 
> > copy in the lib/endorsed target directory. 
> > 
> > Here the plugin declaration with  
> > 
> >               
> > org.apache.karaf.tooling 
> > karaf-maven-plugin 
> >                  ${karaf.version} 
> >                  true 
> >                   
> >                       
> >                          my-project 
> >                       
> >                       
> >                          wrapper 
> >                          wrap 
> > aries-blueprint 
> >                          shell 
> > shell-compat 
> >                          feature 
> >                          jaas 
> >                          ssh 
> >                          management 
> >                          bundle 
> >                          config 
> >                          deployer 
> >                          diagnostic 
> >                          instance 
> >                          kar 
> >                          log 
> >                          package 
> >                          service 
> >                          system 
> >                          eventadmin 
> >                          scr 
> > 
> >                          jdbc 
> >                          jndi 
> >                          jpa 
> >                          jms 
> >                          transaction 
> >                          eclipselink 
> >                          spring 
> >                          war 
> > 
> >                          cxf 
> >                          cxf-jaxrs 
> > cxf-rs-description-swagger2 
> > 
> >                          pax-jdbc 
> > pax-jdbc-config 
> > pax-jdbc-pool-hikaricp 
> > pax-jdbc-pool-aries 
> > pax-jdbc-postgresql 
> > 
> > activemq-client 
> >                          activemq-cf 
> >                          activemq 
> > activemq-camel 
> > 
> >                          camel 
> > camel-jackson 
> > camel-restlet 
> > camel-restlet-jackson 
> >                          camel-jms 
> > camel-servlet 
> > camel-swagger-java 
> > 
> >                           
> >                          cellar 
> >                       
> > *** 
> > **mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxrs-api-2.1/${servicemix.specs.jaxrs.version};type:=endorsed;export:=true**
> >  
> > **mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.json-api-1.1/${servicemix.specs.json.version};type:=endorsed;export:=true**
> >  
> > **                    * 
> >                      1.8 
> >                   
> >               
> > 
> > 
> > [INFO] Downloading libraries 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.jaxrs-api-2.1:jar:2.9.1)
> >  as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxrs-api-2.1/2.9.1/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
> >  
> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar 
> > [DEBUG] Resolved 
> > (org.apache.servicemix.specs:org.apache.servicemix.specs.json-api-1.1:jar:2.9.0)
> >  
> > as 
> > /home/user/.m2/repository/org/apache/servicemix/specs/org.apache.servicemix.specs.json-api-1.1/2.9.0/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
> >  
> > [INFO]    adding library: 
> > lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar 
> > ... 
> > [DEBUG] Connection manager is shutting down 
> > [DEBUG] Connection manager shut down 
> > [ERROR] Failed to execute goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly 
> > (default-assembly) 
> > on project moss-orchestrator-assembly: Unable to build assembly: Error: 
> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.jaxrs-api-2.1-2.9.1.jar
> >  
> > [ERROR] 
> > /home/user/my-project-assembly/target/assembly/lib/endorsed/org.apache.servicemix.specs.json-api-1.1-2.9.0.jar
> >  
> > [ERROR] -> [Help 1] 
> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> > goal 
> > org.apache.karaf.tooling:karaf-maven-plugin:4.2.0.M1:assembly 
> > (default-assembly) 
> > on project moss-orchestrator-assembly: Unable to build assembly 
> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
> >  
> >      at 
> > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> >  
> >      at 
> >