I'm not sure how to do what you want (you might need to write some
custom code) but you should be able to get rid of that NPE by changing
the following:

 <reference name="ServerInfo"/>

to:

 <reference name="ServerInfo">
     <name>ServerInfo</name>
 </reference>

in your RequestLog gbean.

Jarek

On Wed, Dec 3, 2008 at 4:44 PM, Russell E Glaue <[EMAIL PROTECTED]> wrote:
> Using geronimo-jetty 2.1.3
>
> I create a new HTTPSelectChannelConnector on port 21050
> Suppose I deploy 20 to 30 different web applications to this connector.
>
> Then I want to log all activity through that connector to a certain log file,
> and not the default jetty_yyyy_mm_dd.log file, but a new
> projectXX_yyyy_mm_dd.log file.
>
> How do I do this?
>
>
> I have attempted to start configuring Geronimo using the NCSARequestLog gbean,
> but I am getting an initialization error (pasted below) on Geronimo start up,
> erroring on doStart().
>
> I cannot find any written documentation on how to change the log file output 
> for
> a connector. I have read how to change the log file for an individual web
> application, but I do not want to do that. I want to change the log file on 
> the
> connector level.
>
>
>    <module name="org.apache.geronimo.configs/jetty6/2.1.3/car">
>        ...
>        <gbean
> name="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=RequestLog"
> gbeanInfo="org.apache.geronimo.jetty6.requestlog.NCSARequestLog">
>            <attribute 
> name="filename">var/log/projectXX_yyyy_mm_dd.log</attribute>
>            <attribute name="logDateFormat">dd/MMM/yyyy:HH:mm:ss 
> ZZZ</attribute>
>            <attribute name="logTimeZone">GMT</attribute>
>            <attribute name="retainDays">30</attribute>
>            <attribute name="extended">true</attribute>
>            <attribute name="append">true</attribute>
>            <reference name="JettyContainer">
>                <pattern>
>                    <groupId>org.apache.geronimo.configs</groupId>
>                    <artifactId>jetty6</artifactId>
>                    <version>2.1.3</version>
>                    <type>car</type>
>                    <name>JettyWebContainer</name>
>                </pattern>
>            </reference>
>            <reference name="ServerInfo"/>
>        </gbean>
>        <gbean
> name="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=project-XX"
> gbeanInfo="org.apache.geronimo.jetty6.connector.HTTPSelectChannelConnector">
>            <attribute name="port">21050</attribute>
>            <attribute name="bufferSizeBytes">8096</attribute>
>            <attribute name="host">0.0.0.0</attribute>
>            <attribute name="lingerMillis">-1</attribute>
>            <attribute name="redirectPort">0</attribute>
>            <attribute name="maxThreads">50</attribute>
>            <attribute name="acceptQueueSize">0</attribute>
>            <attribute name="headerBufferSizeBytes">8192</attribute>
>            <reference name="JettyContainer">
>                <pattern>
>                    <groupId>org.apache.geronimo.configs</groupId>
>                    <artifactId>jetty6</artifactId>
>                    <version>2.1.3</version>
>                    <type>car</type>
>                    <name>JettyWebContainer</name>
>                </pattern>
>            </reference>
>        </gbean>
>        ...
>    </module>
>
>
> Error message on Geronimo startup with above configuration:
> --
> Module 24/67 org.apache.geronimo.configs/j2ee-corba-yoko/2.1.3/car
>  started in  1.558s
> Module 25/67 org.apache.geronimo.configs/jetty6/2.1.3/car
>  15:27:20,161 ERROR [GBeanInstanceState] Error while starting; GBean is now in
> the FAILED state:
> abstractName="org.apache.geronimo.configs/jetty6/2.1.3/car?ServiceModule=org.apache.geronimo.configs/jetty6/2.1.3/car,j2eeType=GBean,name=RequestLog"
> java.lang.NullPointerException
>        at
> org.apache.geronimo.jetty6.requestlog.NCSARequestLog.doStart(NCSARequestLog.java:113)
>        at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:998)
>        at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>        at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>        at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:541)
>        at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:111)
>        at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:146)
>        at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:120)
>        at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176)
> --
>
>
>

Reply via email to