Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 758B7200BD3 for ; Tue, 6 Dec 2016 17:07:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 74090160B17; Tue, 6 Dec 2016 16:07:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE969160B2D for ; Tue, 6 Dec 2016 17:06:59 +0100 (CET) Received: (qmail 2953 invoked by uid 500); 6 Dec 2016 16:06:58 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 2679 invoked by uid 99); 6 Dec 2016 16:06:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 16:06:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 71C9D2C03E1 for ; Tue, 6 Dec 2016 16:06:58 +0000 (UTC) Date: Tue, 6 Dec 2016 16:06:58 +0000 (UTC) From: "Robert Munteanu (JIRA)" To: dev@geronimo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (GERONIMO-6560) JSON spec jar is not able to load provider in an OSGi environment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Dec 2016 16:07:00 -0000 [ https://issues.apache.org/jira/browse/GERONIMO-6560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15725912#comment-15725912 ] Robert Munteanu edited comment on GERONIMO-6560 at 12/6/16 4:06 PM: -------------------------------------------------------------------- [~romain.manni-bucau] - I _might_ find the time, but towards the end of of the month. Do you have an example on how this is achieved in similar jars? was (Author: rombert): [~romain.manni-bucau] - I _might_ find the time, but towards the end on of the month. Do you have an example on how this is achieved in similar jars? > JSON spec jar is not able to load provider in an OSGi environment > ----------------------------------------------------------------- > > Key: GERONIMO-6560 > URL: https://issues.apache.org/jira/browse/GERONIMO-6560 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Reporter: Robert Munteanu > > I am trying to use org.apache.geronimo.specs:geronimo-json_1.0_spec:1.0-alpha-1 together with Apache Johnzon in a minimal OSGi environment ( see https://lists.apache.org/thread.html/52ecda6f7b859fa9cdd4d9fb64d6f7a3b54f29f971e5536e844d9150@%3Cdev.johnzon.apache.org%3E for more details ). > Looking at the manifest of the JSON spec I can see it has no way of loading classes from another jar, and it fails at runtime: > {noformat}javax.json.JsonException: org.apache.johnzon.core.JsonProviderImpl not > found > at > javax.json.spi.JsonProvider.doLoadProvider(JsonProvider.java:132) > at javax.json.spi.JsonProvider.provider(JsonProvider.java:64) > at javax.json.Json.createGenerator(Json.java:48) > at > ro.lmn.routeradmin.web.impl.AdminServlet.doGet(AdminServlet.java:33) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:618) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(Servl > etHandler.java:85) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(I > nvocationChain.java:79) > at > org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispat > cher.java:124) > at > org.apache.felix.http.base.internal.DispatcherServlet.service(Dispatche > rServlet.java:61) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:5 > 83) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler > .java:224) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler > .java:1174) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:51 > 1) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler. > java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler. > java:1106) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.jav > a:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Contex > tHandlerCollection.java:213) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.j > ava:134) > at org.eclipse.jetty.server.Server.handle(Server.java:524) > at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java: > 253) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(Abstract > Connection.java:273) > at > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95) > at > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint. > java:93) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executePro > duceConsume(ExecuteProduceConsume.java:303) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceCon > sume(ExecuteProduceConsume.java:148) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(Execut > eProduceConsume.java:136) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool. > java:671) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.j > ava:589) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.ClassNotFoundException: > org.apache.johnzon.core.JsonProviderImpl > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at > javax.json.spi.JsonProvider.doLoadProvider(JsonProvider.java:129) > ... 32 more{noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)