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.

Bug 243938 - libs.amazon should now bundle commons.logging
Summary: libs.amazon should now bundle commons.logging
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Amazon Cloud (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2014-04-19 13:26 UTC by matthias42
Modified: 2014-07-19 14:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthias42 2014-04-19 13:26:40 UTC
This is logged from my netbeans startup:

WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.apache.commons.logging.impl.Log4JLogger arbitrarily from one of NetbinoxLoader delegating to org.apache.commons.logging_1.1.1 and ModuleCL@85df089[org.netbeans.libs.amazon] starting from SystemClassLoader[745 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE
WARNING [org.netbeans.ProxyClassLoader]: Will not load class org.apache.commons.logging.impl.Jdk14Logger arbitrarily from one of NetbinoxLoader delegating to org.apache.commons.logging_1.1.1 and ModuleCL@85df089[org.netbeans.libs.amazon] starting from SystemClassLoader[745 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE

It looks like commons.logging uses the global classloader to load dependcies. I see a simple work-around: Use the bundled commons logging module.

This should do it:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -48,7 +48,12 @@
     <configuration>
         <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
             <code-name-base>org.netbeans.libs.amazon</code-name-base>
-            <module-dependencies/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.apache.commons.logging</code-name-base>
+                    <run-dependency/>
+                </dependency>
+            </module-dependencies>
             <friend-packages>
                 <friend>org.netbeans.modules.cloud.amazon</friend>
                 <package>com.amazonaws</package>
@@ -74,10 +79,6 @@
                 <runtime-relative-path>ext/aws-sdk/commons-codec-1.3.jar</runtime-relative-path>
                 <binary-origin>external/commons-codec-1.3.jar</binary-origin>
             </class-path-extension>
-            <class-path-extension>
-                <runtime-relative-path>ext/aws-sdk/commons-logging-1.1.1.jar</runtime-relative-path>
-                <binary-origin>external/commons-logging-1.1.1.jar</binary-origin>
-            </class-path-extension>
         </data>
     </configuration>
 </project>


This is not a fatal problem - logging via java.util.logging works none the less, but it does not look good.

For the MantisConnector module I decided to go down that route, to not polute the global classloader further.
Comment 1 David Konecny 2014-07-07 02:17:59 UTC
Thanks for the patch Matthias. Have a look at the discussion in issue 222408#c11 - the logging jar is an internal dependency of the Amazon SDK and I would prefer not to change it arbitrarily. Especially if it is only causing cosmetic error in form of an extra log warning. What do you think?
Comment 2 matthias42 2014-07-07 17:37:50 UTC
Thank you david for the pointer - the discussion in the referenced bug pretty much puts everything up, that I could bring to the discussion.

I would go the "use common netbeans dependency" way:

 - the version is identical (1.1.1)
 - commons-logging is slow moving as in: glacier like

See http://commons.apache.org/proper/commons-logging/. From the referenced bugs in the changelog no api changes were introduced, so even if netbeans would bump to 1.1.3, it should work.
Comment 3 David Konecny 2014-07-08 01:53:52 UTC
913ac288e497
Comment 4 Quality Engineering 2014-07-09 02:48:17 UTC
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/913ac288e497
User: David Konecny <dkonecny@netbeans.org>
Log: #243938 - libs.amazon should now bundle commons.logging
Comment 5 matthias42 2014-07-19 14:51:35 UTC
Thank you!