This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am trying to update the findbugs libraries to latest versions and I got stuck with upgrading to latest dom4j. If you want to use some special features you need e.g. jaxen to be on classpath for dom4j (e.g. by putting this in an extra library wrapper). Now it seems that although I have an own module for dom4j - dom4j may still try to load classes via the global classloader (Thread.currentThread.getContextClassLoader()) and may with this retrieve classes from the hibernatelib module (a proper warning is printed on the console about clashing classloaders). So what shall I do - I cannot alter the package statements since all I have are 3rdParty libraries. I am still trying to figure out if I can work around all problems (deactivating hibernate module took me step further) or if I have to stay with old version of FindBugs so I can get SQE to work correct with 6.5. I know it is already quite late in the schedule for 6.5 but I would appreciate anything that could be done to get this working - maybe you could just create correct dom4j/jaxen modules so I can just use those.
The warning I get is the following WARNUNG [org.netbeans.ProxyClassLoader]: Will not load class org.dom4j.DocumentFactory arbitrarily from one of org.netbeans.StandardModule$OneModuleClassLoader@433545[org.dom4j] and org.netbeans.StandardModule$OneModuleClassLoader@327236[org.netbeans.modules.hibernatelib]; see http://wiki.netbeans.org/DevFaqModuleCCE WARNUNG [org.netbeans.ProxyClassLoader]: Will not load class org.dom4j.tree.QNameCache arbitrarily from one of org.netbeans.StandardModule$OneModuleClassLoader@433545[org.dom4j] and org.netbeans.StandardModule$OneModuleClassLoader@327236[org.netbeans.modules.hibernatelib]; see http://wiki.netbeans.org/DevFaqModuleCCE It seems as if I was able to get around the other problems by moving some classes from my jaxen module to my dom4j module so that using xpath from dom4j via jaxen now works. Still trying to figure out if those warnings above may have bad side effects.
I'm not quite sure I understand the problem yet. What was the old version you were using? The hibernatelib uses 1.6.1.
Before I used an old dom4j-full.jar but now the dependency was upgraded from to the project to 1.6.1 and there I have to go with a real modules and correct dependencies now. The main thing this is about is that there is not a separate module for dom4j available within the IDE. It just becomes visible through the hibernatelib.
What exactly is the problem ? Looks like what the version you need (1.6.1) is the same as what Hibernate uses.
I need the complete dom4j functionality including those using jaxen. This dependency is missing from the hibernate lib. Besides this I really have the feeling that a dependency to hibernatelib just to use dom4j seems to be wrong in terms of modularity.
Is it true that jaxen is in a different jar? Are you trying to create a wrapper module wrapping around the dom4j and jaxen jar? If you have a such module already, can you mail it to me? I'll try to change the hibernatelib module to depend on your wrapper module and see if everything is fine? Please make sure dom4j is 1.6.1.
Please try to workaround the issue in 6.5 by declaring dependency on hibernatelib. We can try to create separate wrapper module for dom4j and jaxen in the next release.
I have two modules one for dom4j and one for jaxen since there are other 3rd party libraries just using at jaxen. I will try to extract those two modules from my suite and attach the necessary information here.I had to circumvent a dependency problem between jaxen und dom4j the dom4j for jaxen adapter is part of the jaxen library so I had to move those classes to the dom4j library-wrapper also. Still looking for the best way to get this done. I looked at the code in the hibernate module (it seems to be the only one using hibernatelib?) and looked for the dom4j dependency. I just found one class referencing it and I am not quite sure if this is really needed to be done via dom4j - HQLEditorController). Besides this it seems that the dom4j and the other 3rd party libraries (besides hibernate itself) are just supplied to make org.netbeans.modules.hibernate.util.CustomClassLoader work. As indicator for this I took that I could not find any references to antlr for example, yet it is declared as a public package inside hibernatelib. Even freemarker packages are declared public although they are an external dependency (not packaged with hibernatelib). So maybe there is even more cleanup necessary here. Perhaps a complete different strategy would allow for packaging those libraries in a complete different way.
(cc vadiraj, who created the custom classloader and HQL editor) The packages declared public because they needed for the Hibernate tools for reverse engineering and HQL editor via the custom class loader.
We are freezing for 6.5 this week, so at this point we won't be able to make major changes or fix issues that has side effects or can cause regressions. If there is any simple change/work around that can provide a temporary fix to your issue, we'll be happy be consider it for 6.5 but you'll have to let us know by tomorrow. If not, we'll definitely fix it post 6.5. Thanks
We're running out of time on 6.5. Let's look into this post 6.5.
Will re-look in 7.0
Any progress on this? The milestone is currently 70M1 but I can not see anything going on.
Targeting for 7.0M2
Any chance this will make it at least in M3?
5 years from last update, hibernate itself still use dom4j but version may be different now, also it may be possible to depend on hibernate instead of separate dom4j module, as it's in java cluster and I suppose it should be available form base n distribution. I'm not sure the issue is still valid or required to fix after this time. On other side, separate dom4j module may be used in hibernate too.
if anybody still interested in separate dom4j module, it's possible to create and hibernate to make dependent, but please reopen the issue in this case or if the issue is valid yet and need to be handled some other way
Still interested in getting this sorted out by having a separate module for dom4j
Similiar problem with jaxen library -> https://netbeans.org/bugzilla/show_bug.cgi?id=254488
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss