javierllorente opened a new issue, #6566:
URL: https://github.com/apache/netbeans/issues/6566

   ### Apache NetBeans version
   
   Apache NetBeans 19
   
   ### What happened
   
   If you enable the "Java Web and EE" feature, the "REST Client" plugin stops 
working.
   I think it is because of having different `jersey` versions in the 
classpath; 
   `2.34`* (Java Web and EE) vs `3.1.3`* (REST Client).
   
   
*https://github.com/apache/netbeans/blob/master/enterprise/websvc.restlib/src/org/netbeans/modules/websvc/swdp/swdp.xml
   *https://github.com/javierllorente/netbeans-rest-client/blob/main/pom.xml
   
   
   `java.lang.ClassCastException: class 
org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable cannot be cast to 
class org.glassfish.jersey.internal.spi.AutoDiscoverable 
(org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable is in unnamed 
module of loader org.netbeans.StandardModule$OneModuleClassLoader @7c185a1b;`
   
   ### How to reproduce
   
   1. Install "REST Client" from the plugin manager
   2. Open a new tab (Tools -> REST Client)
   3. Type in any REST URL
   4. Observe you get the response
   5. Enable "Java Web and EE" feature (Tools -> Plugins -> Installed)
   6. Repeat 3.
   7. Observe you get an exception. Response is not displayed
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   openSUSE Tumbleweed 20230902
   
   ### JDK
   
   17.0.8.1
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer, Other
   
   ### Anything else
   
   ```
   SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor 
com.javierllorente.netbeans.rest.client.ui.RestClientTopComponent$$Lambda$1103/0x00007f9fdc8b8ed8
   java.lang.ClassCastException: class 
org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable cannot be cast to 
class org.glassfish.jersey.internal.spi.AutoDiscoverable 
(org.glassfish.jersey.jackson.internal.JacksonAutoDiscoverable is in unnamed 
module of loader org.netbeans.StandardModule$OneModuleClassLoader @7c185a1b; 
org.glassfish.jersey.internal.spi.AutoDiscoverable is in unnamed module of 
loader org.netbeans.StandardModule$OneModuleClassLoader @5bf2b5a1)
        at java.base/java.util.TreeMap.put(TreeMap.java:795)
        at java.base/java.util.TreeMap.put(TreeMap.java:534)
        at java.base/java.util.TreeSet.add(TreeSet.java:255)
        at 
java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:336)
        at java.base/java.util.TreeSet.addAll(TreeSet.java:309)
        at 
org.glassfish.jersey.model.internal.CommonConfig.configureAutoDiscoverableProviders(CommonConfig.java:613)
        at 
org.glassfish.jersey.client.ClientConfig$State.configureAutoDiscoverableProviders(ClientConfig.java:390)
        at 
org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:445)
        at 
org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:317)
        at 
org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:834)
        at 
org.glassfish.jersey.client.ClientRequest.getClientRuntime(ClientRequest.java:181)
        at 
org.glassfish.jersey.client.JerseyWebTarget.onBuilder(JerseyWebTarget.java:371)
        at 
org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:199)
        at 
org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:38)
        at 
com.javierllorente.netbeans.rest.client.RestClient.request(RestClient.java:187)
        at 
com.javierllorente.netbeans.rest.client.ui.RestClientTopComponent.lambda$request$4(RestClientTopComponent.java:284)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1419)
        at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
   [catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2034)
   ```
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to