NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
javadev
Joined: 01 Jul 2009 Posts: 34
|
Posted: Thu Apr 22, 2010 6:40 pm Post subject: Supressing ProxyClassLoader warning cant load from default package warnings |
|
|
So I get this warning while trying to access a properties file that belongs in one of my module wrapped libraries that accesses a web service.
So I have found that setting -J-Dorg.netbeans.ProxyClassLoader.level=1000
to ignore the warnings. This runs fine when using the ide setting it in the run.extra.args.
But for the deployed netbeans platform app, the argument doesn't work and my logs are flooded with these warnings. Ive tried adding it to the apps shortcuts, and is already located in the application.conf file in the default_options=-J-Dorg.netbeans.ProxyClassLoader.level=1000(along with other args that seem to work fine).
Any ideas. I'm not sure how to go around fixing where the file is actually located and accessed. The file in question is client-security-env.properties. I followed the general guidelines for building a web service client, made it a library, and wrapped the library in a module. Any Ideas would be awesome! Thanks all. |
|
| Back to top |
|
 |
zigcnb
Joined: 06 Dec 2009 Posts: 52
|
Posted: Thu Apr 22, 2010 8:57 pm Post subject: [platform-dev] Re: ProxyClassLoader warning cant load from default package, Web service-client-security-env.properties |
|
|
1. The error came from the fact that your code is trying to load a class or a resource from the default package, i.e. no package. If you can put the class or resource in a package, this warning should go away.
2. If you cannot do that for some reason, you can try to set system properties in your module installer and refresh log manager, such as
System.setProperty("org.netbeans.ProxyClassLoader.level", "1000");
java.util.logging.LogManager.getLogManager().readConfiguration();
cheers
Bill
On Thu, Apr 22, 2010 at 11:41 AM, javadev <address-removed ([email]address-removed[/email])> wrote:
| Quote: | So I get this warning while trying to access a properties file that belongs in one of my module wrapped libraries that accesses a web service.
So I have found that setting -J-Dorg.netbeans.ProxyClassLoader.level=1000
to ignore the warnings. This runs fine when using the ide and run.extra.args.
But for the deployed netbeans platform app, it argument doesn't work and my logs are flooded with these warnings. Ive tried adding it to the apps shortcuts, and is already located in the application.conf folder in the default_options=.
Any ideas. I'm not sure how to go around fixing where the file is actually located and accessed. |
|
| Back to top |
|
 |
javadev
Joined: 01 Jul 2009 Posts: 34
|
Posted: Fri Apr 23, 2010 1:53 pm Post subject: |
|
|
| Sweet Thanks, that was driving me crazy having to filter through that while debugging other issues, and also bloating up my log files. Awesome Thanks a bunch! |
|
| Back to top |
|
 |
Tim Boudreau Posted via mailing list.
|
Posted: Fri Apr 23, 2010 2:43 pm Post subject: [platform-dev] Re: ProxyClassLoader warning cant load from default package, Web service-client-security-env.properties |
|
|
On Apr 22, 2010, at 4:52 PM, zigc nb wrote:
| Quote: | 1. The error came from the fact that your code is trying to load a class or a resource from the default package, i.e. no package. If you can put the class or resource in a package, this warning should go away.
2. If you cannot do that for some reason, you can try to set system properties in your module installer and refresh log manager, such as
System.setProperty("org.netbeans.ProxyClassLoader.level", "1000");
java.util.logging.LogManager.getLogManager().readConfiguration();
|
Do not do this call in a NetBeans module - this attempts to reconfigure the entire JVM's logging infrastructure on the fly, and will break all sorts of logging inside of NetBeans - in fact there is SecurityManager code to prohibit it (libraries sometimes do this sort of thing, and if it reconfigures logging to use the JDK's evil synchronized FileLogger, NetBeans will deadlock within a few seconds of this call [logging calls toString() on random objects - if toString() calls a synchronized instance method and another thread is blocking that call, you're done]).
-Tim
| Quote: |
cheers
Bill
On Thu, Apr 22, 2010 at 11:41 AM, javadev <address-removed ([email]address-removed[/email])> wrote:
| Quote: | So I get this warning while trying to access a properties file that belongs in one of my module wrapped libraries that accesses a web service.
So I have found that setting -J-Dorg.netbeans.ProxyClassLoader.level=1000
to ignore the warnings. This runs fine when using the ide and run.extra.args.
But for the deployed netbeans platform app, it argument doesn't work and my logs are flooded with these warnings. Ive tried adding it to the apps shortcuts, and is already located in the application.conf folder in the default_options=.
Any ideas. I'm not sure how to go around fixing where the file is actually located and accessed. I followed the general guidlines for building a web service client, made it a library, and wrapped the library in a module. Any Ideas would be awesome! Thanks all.
|
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|