|
[ jetty-Bugs-1033803 ] ThreadPool calls Class.getPackage throwing an NPE: msg#00077java.jetty.general
Bugs item #1033803, was opened at 2004-09-24 14:35 Message generated for change (Comment added) made by ben_walding You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1033803&group_id=7322 Category: None Group: None Status: Open Resolution: Fixed Priority: 5 Submitted By: Ben Walding (ben_walding) Assigned to: Nobody/Anonymous (nobody) Summary: ThreadPool calls Class.getPackage throwing an NPE Initial Comment: It looks like the changes made to the ThreadPool about a month ago have some issues with any classloader that doesn't define a Package object for the class (eg. getPackage() returns null). Reading the API definition for getPackage() tends to indicate that it is valid for the Class to return null for getPackage() however this break the new ThreadPool. See following for change in question: http://cvs.sourceforge.net/viewcvs.py/jetty/Jetty/src/org/mortbay/util/ThreadPool.java?r1=1.36&r2=1.37 API definition: /** * Gets the package for this class. The class loader of this class is used * to find the package. If the class was loaded by the bootstrap class * loader the set of packages loaded from CLASSPATH is searched to find the * package of the class. Null is returned if no package object was created * by the class loader of this class. * * <p> Packages have attributes for versions and specifications only if the * information was defined in the manifests that accompany the classes, and * if the class loader created the package instance with the attributes * from the manifest. * * @return the package of the class, or null if no package * information is available from the archive or codebase. */ public Package getPackage() Our usecase? We use classworlds (classworlds.codehaus.org) to launch our jetty server and application from a single jar. At present classworlds doesn't return a Package object (CLASSWORLDS-1 issue in jira.codehaus.org) - although it will one day. This isn't urgent as I'll just revert back to 5.0.RC2 for the time being. It'll be a while before classworlds and maven are all patched up to define a Package, and in my opinion, Jetty should work without getPackage() defined irregardless. ---------------------------------------------------------------------- >Comment By: Ben Walding (ben_walding) Date: 2004-09-25 09:56 Message: Logged In: YES user_id=61278 Thanks Greg I wasn't being pushy, most developers (myself included) forget about stuff if they don't reply in a day or two. So I thought I'd log it for posterity. Cheers, Ben ---------------------------------------------------------------------- Comment By: Greg Wilkins (gregwilkins) Date: 2004-09-25 09:38 Message: Logged In: YES user_id=44062 Sorry I "ignored" your prior posting on this. It was on the todo list. Fixed in CVS. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1033803&group_id=7322 ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ jetty-Bugs-1033766 ] Request and reponse object are not same after dispatch, SourceForge.net |
|---|---|
| Next by Date: | Re: page not accessible on first access, Greg Wilkins |
| Previous by Thread: | [ jetty-Bugs-1033803 ] ThreadPool calls Class.getPackage throwing an NPE, SourceForge.net |
| Next by Thread: | page not accessible on first access, Maxime Martineau |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |