NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Supressing ProxyClassLoader warning cant load from default package warnings

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
javadev



Joined: 01 Jul 2009
Posts: 34

PostPosted: Thu Apr 22, 2010 6:40 pm    Post subject: Supressing ProxyClassLoader warning cant load from default package warnings Reply with 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 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

PostPosted: 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 Reply with 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();

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

PostPosted: Fri Apr 23, 2010 1:53 pm    Post subject: Reply with quote

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.





PostPosted: 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 Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo