[ 
https://issues.apache.org/jira/browse/SLING-12173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792131#comment-17792131
 ] 

Robert Munteanu edited comment on SLING-12173 at 12/1/23 4:55 PM:
------------------------------------------------------------------

I tried switching the parser implementation to Parsson, but that did not help

{noformat}java.util.ServiceConfigurationError: jakarta.json.spi.JsonProvider: 
org.eclipse.parsson.JsonProviderImpl not a subtype
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
        at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
        at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
        at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:69)
        at jakarta.json.Json.createReader(Json.java:189){noformat}

This is very likely an Eclipse IDE problem.


was (Author: rombert):
OK, scratch that, I did a small POC with Parsson and I get the same problem

{noformat}java.util.ServiceConfigurationError: jakarta.json.spi.JsonProvider: 
org.eclipse.parsson.JsonProviderImpl not a subtype
        at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
        at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
        at 
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
        at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
        at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
        at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:69)
        at jakarta.json.Json.createReader(Json.java:189){noformat}

This is very likely an Eclipse IDE problem.

> Configuration errors in Eclipse for projects using the 
> slingfeature-maven-plugin
> --------------------------------------------------------------------------------
>
>                 Key: SLING-12173
>                 URL: https://issues.apache.org/jira/browse/SLING-12173
>             Project: Sling
>          Issue Type: Improvement
>          Components: Maven Plugins and Archetypes
>            Reporter: Robert Munteanu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: OSGi Feature Maven Plugin 1.8.2
>
>
> The slingfeature-maven-plugin currently uses the Jakarta JSON implementation 
> of the Apache Johnzon parser. 
> I have noticed problems in the Eclipse IDE, where projects fail to update 
> with hard to isolate errors (see below).
> {noformat}java.util.ServiceConfigurationError: jakarta.json.spi.JsonProvider: 
> org.apache.johnzon.core.JsonProviderImpl not a subtype
>       at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)
>       at 
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244)
>       at 
> java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273)
>       at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309)
>       at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393)
>       at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:69)
>       at jakarta.json.Json.createReader(Json.java:189)
>       at 
> org.apache.sling.feature.maven.JSONFeatures.read(JSONFeatures.java:64)
>       at 
> org.apache.sling.feature.maven.ProjectHelper.readFeatureFile(ProjectHelper.java:622)
>       at 
> org.apache.sling.feature.maven.Preprocessor.readProjectFeatures(Preprocessor.java:304)
>       at 
> org.apache.sling.feature.maven.Preprocessor.process(Preprocessor.java:145)
>       at 
> org.apache.sling.feature.maven.Preprocessor.process(Preprocessor.java:110)
>       at 
> org.apache.sling.feature.maven.extensions.DependencyLifecycleParticipant.afterProjectsRead(DependencyLifecycleParticipant.java:87)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.executeParticipants(ProjectRegistryManager.java:824)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$15(ProjectRegistryManager.java:791)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$14(ProjectRegistryManager.java:790)
>       at java.base/java.util.HashMap$Values.forEach(HashMap.java:1065)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$11(ProjectRegistryManager.java:788)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProjectFacades(ProjectRegistryManager.java:760)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:392)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:366)
>       at 
> org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:318)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:146)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:84)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
>       at 
> org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:83)
>       at 
> org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:192)
>       at 
> org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1079)
>       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
>       at 
> org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
>       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
>       at 
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
>       at 
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
>       at 
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:207)
>       at 
> org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:300)
>       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to