RE: Other version of javax.xml.bind when running with Java 8 and 11

2020-04-28 Thread Siano, Stephan
Hi,

till Java 8 JAXB was part of the JDK, the version included in JDK8 is 2.2.8. 
Starting with Java 9, JAXB was removed from the JRE and has to be added as a 
separate library (the version that comes with Karaf 4.2.8 is 2.3.2).

I am currently working on the same problem, because we are trying to run some 
Jackson-xml component which requires JAXB 2.3.0 or later. My tests are not 
entirely finished, but in theory (and my tests justify this so far) the 
following approach should work:

1. copy the following files from lib/jdk9plus to lib/endorsed: 
istack-commons-runtime-3.0.10.jar, 
jakarta.xml.bind-api-2.3.2.jar, 
jaxb-runtime-2.3.2.jar, 
   txw2-2.3.2.jar
2. edit the file etc/jre.properties. There is a section starting with jre-1.8. 
In this section you have some exports for javax.xml.bind with version 2.2.8. 
Change that version to 2.3.0 (as in the jre-9 section)

The first step actually replaces the JAXB runtime in the JDK with the one from 
the external library with the JDK 8 endorsed mechanism. The second step changes 
the version of the exported JAXB packages to a newer version (which makes your 
first change known to the OSGi framework).

Best regards
Stephan

-Original Message-
From: Łukasz Dywicki  
Sent: Dienstag, 28. April 2020 12:06
To: user@karaf.apache.org; lechlukasz 
Subject: Re: Other version of javax.xml.bind when running with Java 8 and 11

Cześć Łukasz,
Technically speaking JAXB as a standard is moving its versions so
version shipped with Java 8 and Java 11 will be different. As far I
remember the overall plan for future releases is to remove JAXB from
official distribution and let programmers manage it as external dependency.
You can install RI within framework at the cost of additional megabyte
of your distribution.

Best regards,
Łukasz
--
Code-House
http://code-house.org


On 28.04.2020 09:50, lechlukasz wrote:
> Hello,
> 
> Is there a technical reason for org.apache.felix.framework providing other
> version of javax.xml.bind package when running with Java 8 (2.2.8) and Java
> 11 (2.3.0)?
> 
> Best regards,
> Lukasz Lech
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 


Re: "WebBeansConfigurationListener not found" loading Tobago demo on Karaf 4.2.8

2020-04-28 Thread Paul Spencer
JB,
I realized over night the issue, as you suggested, is related to what is on the 
class path.  So I need to step back and start over with a focus one ensuring 
the "war" list its requirements and the karaf environment has the appropriate 
bundles.  

I will keep this list apprised of my progress.

Paul Spencer  

> On Apr 28, 2020, at 1:27 AM, Jean-Baptiste Onofre  wrote:
> 
> Hi Paul,
> 
> Does the war include myface and web beans jar in META-INF/lib ?
> 
> Regards
> JB
> 
>> Le 27 avr. 2020 à 21:54, Paul Spencer  a écrit :
>> 
>> Karaf 4.2.8
>> 
>> I am trying to run the Tobago v4.4.1 Demo Example under a virgin instance of 
>> Karaf but I am getting the error below.  I packaged the Tobago war using the 
>> command "mvn -Djsf=provided clean package" and copied the war to the /deploy 
>> directory of the instance.
>> 
>> I did add the "demo-realm" configuration to etc/jetty.xml and uncomment the 
>> org.apache.myfaces.webapp.StartupServletContextListener
>>  from web.xml in the project.  Also "mvn jetty:run" works as expected.
>> 
>> Ideas? 
>> 
>> ***
>> * From Karaf.log
>> ***
>> 2020-04-27T15:21:26,130 | INFO  | FelixStartLevel  | HttpServiceFactoryImpl  
>>  | 105 - org.ops4j.pax.web.pax-web-runtime - 7.2.14 | Binding 
>> bundle: [tobago-example-demo [110]] to http service
>> 2020-04-27T15:21:26,146 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | will add 
>> org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer
>>  to ServletContainerInitializers
>> 2020-04-27T15:21:26,148 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | added ServletContainerInitializer: 
>> org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer
>> 2020-04-27T15:21:26,148 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | will add org.apache.jasper.servlet.JasperInitializer to 
>> ServletContainerInitializers
>> 2020-04-27T15:21:26,150 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | Skipt org.apache.jasper.servlet.JasperInitializer, because 
>> specialized handler will be present
>> 2020-04-27T15:21:26,150 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | will add org.apache.myfaces.ee6.MyFacesContainerInitializer to 
>> ServletContainerInitializers
>> 2020-04-27T15:21:26,151 | WARN  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | failed to parse and instantiate of 
>> javax.servlet.ServletContainerInitializer in classpath
>> 2020-04-27T15:21:26,151 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | will add 
>> org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
>>  to ServletContainerInitializers
>> 2020-04-27T15:21:26,154 | INFO  | FelixStartLevel  | CdiExtender 
>>  | 129 - org.ops4j.pax.cdi.extender - 1.1.2 | starting CDI extender 
>> org.ops4j.pax.cdi.extender
>> 2020-04-27T15:21:27,974 | INFO  | paxweb-extender-1-thread-1 | 
>> ServletContainerInitializerScanner | 98 - org.ops4j.pax.web.pax-web-api - 
>> 7.2.14 | added ServletContainerInitializer: 
>> org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer
>> 2020-04-27T15:21:28,010 | INFO  | paxweb-extender-1-thread-1 | 
>> HttpServiceContext   | 103 - org.ops4j.pax.web.pax-web-jetty - 
>> 7.2.14 | registering context WebAppHttpContext{tobago-example-demo - 110}, 
>> with context-name: tobago-example-demo
>> 2020-04-27T15:21:28,052 | ERROR | paxweb-extender-1-thread-1 | 
>> RegisterWebAppVisitorWC  | 101 - 
>> org.ops4j.pax.web.pax-web-extender-war - 7.2.14 | Registration exception. 
>> Skipping.
>> java.lang.ClassNotFoundException: 
>> org.apache.webbeans.servlet.WebBeansConfigurationListener not found by 
>> tobago-example-demo [110]
>>   at 
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
>>  ~[?:?]
>>   at 
>> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
>>  ~[?:?]
>>   at 
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
>>  ~[?:?]
>>   at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_172]
>>   at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1927) 
>> ~[?:?]
>>   at 
>> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:978) ~[?:?]
>>   at 
>> org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)
>>  ~[?:?]
>> ...
>>  

Re: [UPDATE] Karaf Virtual Meetup preparation

2020-04-28 Thread Jean-Baptiste Onofre
Hi,

Yes, I’m just waiting for a talk confirmation to share the full schedule.

However, here’s the rough agenda:

6pm - Introduction, connecting and welcome
6:30pm - Apache Karaf on the cloud (JB)
7:10pm - Talk to be confirmed
7:45pm - Apache Karaf ecosystem roadmap: dev experience, tooling, …
8pm - Wrapping up

It might change a bit (I can do the second talk if needed).

About the logistic, you have to register on meetup.com . We 
will share a zoom URL on meetup.com  and I will send a 
personal password for each registered attendee.

Regards
JB

> Le 28 avr. 2020 à 12:06, Łukasz Dywicki  a écrit :
> 
> Any updates on this?
> 
> On 25.04.2020 07:37, Jean-Baptiste Onofre wrote:
>> Hi everyone,
>> 
>> Just a quick update to let you know that we will have a call with Achim
>> on Monday to prepare the Karaf Virtual Meetup scheduled on Thursday.
>> 
>> I will share the schedule and details on Monday evening both on the
>> mailing list and meetup.com .
>> 
>> For the presenters, I will send an email directly to you with the
>> organisation.
>> 
>> Regards
>> JB



Re: [UPDATE] Karaf Virtual Meetup preparation

2020-04-28 Thread Łukasz Dywicki
Any updates on this?

On 25.04.2020 07:37, Jean-Baptiste Onofre wrote:
> Hi everyone,
> 
> Just a quick update to let you know that we will have a call with Achim
> on Monday to prepare the Karaf Virtual Meetup scheduled on Thursday.
> 
> I will share the schedule and details on Monday evening both on the
> mailing list and meetup.com .
> 
> For the presenters, I will send an email directly to you with the
> organisation.
> 
> Regards
> JB


Re: Other version of javax.xml.bind when running with Java 8 and 11

2020-04-28 Thread Łukasz Dywicki
Cześć Łukasz,
Technically speaking JAXB as a standard is moving its versions so
version shipped with Java 8 and Java 11 will be different. As far I
remember the overall plan for future releases is to remove JAXB from
official distribution and let programmers manage it as external dependency.
You can install RI within framework at the cost of additional megabyte
of your distribution.

Best regards,
Łukasz
--
Code-House
http://code-house.org


On 28.04.2020 09:50, lechlukasz wrote:
> Hello,
> 
> Is there a technical reason for org.apache.felix.framework providing other
> version of javax.xml.bind package when running with Java 8 (2.2.8) and Java
> 11 (2.3.0)?
> 
> Best regards,
> Lukasz Lech
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 


Other version of javax.xml.bind when running with Java 8 and 11

2020-04-28 Thread lechlukasz
Hello,

Is there a technical reason for org.apache.felix.framework providing other
version of javax.xml.bind package when running with Java 8 (2.2.8) and Java
11 (2.3.0)?

Best regards,
Lukasz Lech




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html