tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <oh...@cox.net>
Subject Re: NullPointerException/java.util.logging.ErrorManager: 5 when have <load-on-startup>
Date Sat, 07 Jul 2012 20:25:16 GMT

---- Mark Thomas <markt@apache.org> wrote: 
> On 07/07/2012 17:33, ohaya@cox.net wrote:
> 
> Trace A:
> > java.util.logging.ErrorManager: 5
> > java.lang.NullPointerException
> >         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:109)
> >         at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
> >         at java.util.ResourceBundle.getString(ResourceBundle.java:334)
> >         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
> >         at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:63)
> >         at org.apache.juli.FileHandler.publish(FileHandler.java:198)
> >         at java.util.logging.Logger.log(Logger.java:478)
> >         at java.util.logging.Logger.doLog(Logger.java:501)
> >         at java.util.logging.Logger.log(Logger.java:524)
> >         at oracle.security.am.common.nap.util.NAPLogger.log(NAPLogger.java:60)
> >         at oracle.security.am.common.nap.util.pool.ObjectPoolManager.shutdown(ObjectPoolManager.java:267)
> >         at oracle.security.am.common.aaaclient.ObAAAServiceClient.close(ObAAAServiceClient.java:1239)
> >         at oracle.security.am.common.aaaclient.ObAAAServiceClient.finalize(ObAAAServiceClient.java:2548)
> >         at jrockit.memory.Finalizer.doFinalize(Finalizer.java:29)
> >         at jrockit.memory.Finalizer.access$300(Finalizer.java:12)
> >         at jrockit.memory.Finalizer$4.run(Finalizer.java:186)
> >         at java.lang.Thread.run(Thread.java:662)
> > java.util.logging.ErrorManager: 5
> 
> Trace B:
> > java.lang.NullPointerException
> >         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:109)
> >         at java.util.ResourceBundle.getObject(ResourceBundle.java:368)
> >         at java.util.ResourceBundle.getString(ResourceBundle.java:334)
> >         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
> >         at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:63)
> >         at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
> >         at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
> >         at java.util.logging.Logger.log(Logger.java:478)
> >         at java.util.logging.Logger.doLog(Logger.java:501)
> >         at java.util.logging.Logger.log(Logger.java:524)
> >         at oracle.security.am.common.nap.util.NAPLogger.log(NAPLogger.java:60)
> >         at oracle.security.am.common.nap.util.pool.ObjectPoolManager.shutdown(ObjectPoolManager.java:267)
> >         at oracle.security.am.common.aaaclient.ObAAAServiceClient.close(ObAAAServiceClient.java:1239)
> >         at oracle.security.am.common.aaaclient.ObAAAServiceClient.finalize(ObAAAServiceClient.java:2548)
> >         at jrockit.memory.Finalizer.doFinalize(Finalizer.java:29)
> >         at jrockit.memory.Finalizer.access$300(Finalizer.java:12)
> >         at jrockit.memory.Finalizer$4.run(Finalizer.java:186)
> >         at java.lang.Thread.run(Thread.java:662)
> 
> Do you see any Tomcat code in Trace B? No? Neither do I. So what makes
> you think there is a Tomcat problem here?
> 
> Given the only difference in Trace A is that you are using a Tomcat
> Handler rather than the console I don't see anything here to suggest a
> Tomcat bug.
> 
> Looking at the source for java.util.ListResourceBundle, the key or the
> value being used for the log message is null. That makes this an OAM
> bug, not a Tomcat one.
> 
> Mark
> 


Hi Mark,

Just to be clear, I wasn't pointing to a Tomcat bug :(...  

I'm just trying to figure out why the NullPointerException doesn't happen when I don't have
<load-on-startup> in my servlet's web.xml, but does happen when I have <load-on-startup>
in the web.xml.  Also, BTW, if I stop then start the servlet app using the Tomcat manager
app, I don't get the NullPointerException.

What might the difference be between when the <load-on-startup> is in the web.xml vs.
not being in the web.xml?  Doesn't Tomcat just load and call the servlet's init() method when
the <load-on-startup> is present?  I'm kind of guessing it may be a timing type issue,
as in my servlet's init() method, I initialize the Oracle stuff.  My initialization call returns,
but it may be that there's still something going on behind-the-scenes that's not quite done.

Thanks,
Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message