• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
java.lang.NullPointerException at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

java.lang.NullPointerException at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)


  • Subject: java.lang.NullPointerException at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)
  • From: Lars Sonchocky-Helldorf <email@hidden>
  • Date: Fri, 08 Jul 2011 19:51:16 +0200

I regularly see the following stacktrace in our applications log:

[2011-7-8 10:4:1 CEST] <WorkerThread3> java.lang.NullPointerException
       at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)
       at com.webobjects.woextensions.WOExceptionParser._parseException(WOExceptionParser.java:105)
       at com.webobjects.woextensions.WOExceptionParser.<init>(WOExceptionParser.java:44)
       at com.webobjects.woextensions.WOExceptionPage.setException(WOExceptionPage.java:33)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at com.webobjects.woextensions.KeyValueCodingProtectedAccessor.setMethodValue(KeyValueCodingProtectedAccessor.java:34)
       at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.setValueInObject(NSKeyValueCoding.java:1150)
       at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.takeValueForKey(NSKeyValueCoding.java:1354)
       at com.webobjects.appserver.WOComponent.takeValueForKey(WOComponent.java:1748)
       at com.webobjects.appserver.WOApplication._handleError(WOApplication.java:3093)
       at com.webobjects.appserver.WOApplication.handleException(WOApplication.java:3245)
       at com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:389)
       at com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:445)
       at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java:17)
       at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
       at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
       at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
       at java.lang.Thread.run(Thread.java:662)

Since there is none of our code involved it seems to be an issue with WO 5.4.3. Usually it seems to appear after another bug was triggered before. Looks like the Exception Page doesn't get filled in correctly in those cases. So I decompiled the Code in question (com.webobjects.woextensions.WOExceptionParser):

/*     */   protected NSArray _ignoredPackages()
/*     */   {
/*  53 */     NSMutableArray allBundles = new NSMutableArray(NSBundle.frameworkBundles());
/*  54 */     NSMutableArray ignored = new NSMutableArray();
/*     */ 
/*  56 */     Enumeration enumerator = allBundles.objectEnumerator();
/*  57 */     while (enumerator.hasMoreElements()) {
/*  58 */       NSBundle bundle = (NSBundle)enumerator.nextElement();
/*  59 */       String path = WOApplication.application().resourceManager().pathForResourceNamed("WOIgnoredPackage.plist", bundle.name(), null);
/*  60 */       if (path != null);
/*  61 */       String content = _stringFromFile(path);
/*  62 */       NSDictionary dic = (NSDictionary)NSPropertyListSerialization.propertyListFromString(content);
/*  63 */       NSArray tmpArray = (NSArray)dic.objectForKey("ignoredPackages");
/*  64 */       if ((tmpArray != null) && (tmpArray.count() > 0));
/*  65 */       ignored.addObjectsFromArray(tmpArray);
/*     */     }

Somehow that looks fishy to me. Note line 60 and line 64, the semicolon at the end of each. Either those are bugs or the decompiler (JD http://java.decompiler.free.fr/ ) has failed severely. 

Either way, how would I avoid such stacktraces? Providing an dummy WOIgnoredPackage.plist with dummy entries? 


cheers,

Lars
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: java.lang.NullPointerException at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)
      • From: Ray Kiddy <email@hidden>
  • Prev by Date: Attribute being read as NSData instead of String
  • Next by Date: Re: Attribute being read as NSData instead of String
  • Previous by thread: Re: Attribute being read as NSData instead of String
  • Next by thread: Re: java.lang.NullPointerException at com.webobjects.woextensions.WOExceptionParser._ignoredPackages(WOExceptionParser.java:63)
  • Index(es):
    • Date
    • Thread