Thanks, Jaroslav and Matthias for the reply, soon I will try this solution.
Thanks and kind regards, Gaurav Gupta On Wed, Nov 13, 2019 at 1:22 AM Matthias Bläsing <[email protected]> wrote: > Hi, > > I had a similar problem (Webservice Client bases on Axis 1). It was > possible to fix it this way: > > private static MantisConnectPortType initClient(String baseUrl, String > httpUsername, String httpPassword) throws ServiceException, > MalformedURLException { > ClassLoader origLoader = > Thread.currentThread().getContextClassLoader(); > > Thread.currentThread().setContextClassLoader(MantisRepository.class.getClassLoader()); > MantisConnectPortType result = null; > try { > // Initialize client > } finally { > Thread.currentThread().setContextClassLoader(origLoader); > } > return result; > } > > It was enough to just wrap the initialization, this might work for you > to. > > Greetings > > Matthias > > Am Dienstag, den 12.11.2019, 17:32 +0100 schrieb Jaroslav Tulach: > > Thread.currentThread.getContextClassLoader is asked to load the > > class. The > > ClassLoader sees classes from all modules. It doesn't know which one > > to > > choose. > > > > -jt > > > > > > Dne út 12. 11. 2019 13:08 uživatel Gaurav Gupta < > > [email protected]> > > napsal: > > > > > Hi all, > > > > > > I am facing a weird classloader issue in Jeddict plugin that > > > includes > > > *org.netbeans.api:org-netbeans-modules-xml-jaxb-api* dependency via > > > maven > > > plugin nbm-maven-plugin as JAXB removed from JDK. > > > > > > Every XML binding operation performs perfectly without any issue > > > until other plugins like Radar > > > <http://plugins.netbeans.org/plugin/51532/radar-netbeans> and SQL > > > DAL > > > Maker > > > <http://plugins.netbeans.org/plugin/73614/sql-dal-maker> installed > > > in > > > Apache NetBeans which bundle JAXB libraries (API, Impl, and Core). > > > > > > After installation of any of above-listed plugins, Jeddict plugin > > > throws > > > the following error: > > > > > > Message : Will not load class com.sun.xml.bind.v2.ContextFactory > > > > arbitrarily from one of ModuleCL@2f558e85[org.radar.radar.netbean > > > > s] and > > > > ModuleCL@4ccccff0[org.netbeans.libs.jaxb] starting from > > > > SystemClassLoader[742 modules]; > > > > > > > > > As Radar and SQL DAL Maker plugins, neither part of the Apache > > > NetBeans > > > Platform nor listed in Jeddict module's manifest file then how > > > classloader > > > is shared. > > > > > > Please help! > > > > > > Thanks and kind regards, > > > Gaurav Gupta > > > > > > --------------------------------------------------------------------- > 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 > > > >
