Re: Practical WO pg 22
Re: Practical WO pg 22
- Subject: Re: Practical WO pg 22
- From: Chuck Hill <email@hidden>
- Date: Tue, 23 Nov 2004 07:47:19 -0800
Hmmm, think I'll blame that one on Sacha. :-) While I am waiting for
him to explain, try using System.out instead of null. This
OutputStream never gets used, it is just needed to keep the constructor
happy. The only reason to inherit from PrintStream is for its
interface/hierarchy and the need to keep Java's paranoid type-safe
system happy. Ah, how I long for the days of dynamic typing...
Chuck
On Nov 22, 2004, at 11:46 PM, Nathan Dumar wrote:
When trying to use the Listing 1-9: Class to Redirect NSLog and/or
System.out and System.err Messages to log4j, I get an error on the
line that reads "super(null);"
[2004-11-23 02:33:26 EST] <main> A fatal exception occurred: Null
output stream
[2004-11-23 02:33:26 EST] <main> java.lang.NullPointerException: Null
output stream
at java.io.PrintStream.<init>(PrintStream.java:71)
at java.io.PrintStream.<init>(PrintStream.java:93)
at java.io.PrintStream.<init>(PrintStream.java:56)
at LogPrintStream.<init>(LogPrintStream.java:19)
at Application.<init>(Application.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructor
AccessorImpl.java:39)
Apparently, the PrintStream constructor wants an OutputStream. Which
one will make this work as intended? Or am I doing something wrong?
Thank you for any pointers.
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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