hello,

i've a problem with fortress testcase class.
i've compiled it from cvs. I've collected needed jars.

Now, i have a problem while running this class.
On init i have a exception pasted below:

INFO    2003-08-31 03:19:44.968 [prepare                       ] (): 
AuthenticationDaoTestCase !!!
org.apache.avalon.framework.configuration.ConfigurationException: No log targets 
configured for the root logger.
        at 
org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupLoggers(LogKitLoggerManager.java:567)
        at 
org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure(LogKitLoggerManager.java:443)
        at 
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:240)
        at 
org.apache.avalon.fortress.util.ContextManager.initializeLoggerManager(ContextManager.java:917)
        at 
org.apache.avalon.fortress.util.ContextManager.initialize(ContextManager.java:273)
        at 
org.apache.avalon.fortress.impl.DefaultContainerManager.getInitializedContextManager(DefaultContainerManager.java:119)
        at 
org.apache.avalon.fortress.impl.DefaultContainerManager.<init>(DefaultContainerManager.java:106)
        at 
org.apache.avalon.fortress.impl.DefaultContainerManager.<init>(DefaultContainerManager.java:100)
        at 
org.apache.avalon.fortress.testcase.FortressTestCase.prepare(FortressTestCase.java:480)
        at 
org.apache.avalon.fortress.testcase.FortressTestCase.prepare(FortressTestCase.java:435)
        at 
org.apache.avalon.fortress.testcase.FortressTestCase.run(FortressTestCase.java:357)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:396)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:280)


It *looks* like problem with configuration file.
I pasted it below:

  <testcase>
     <annotation>AuthenticationDaoTestCase !!!</annotation>

     <logkit log-level="DEBUG">
       <factories>
         <factory type="stream" 
class="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>
         <factory type="file" 
class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
       </factories>

       <targets>
         <file id="root">
           <filename>AuthentificationDaoTest-root.log</filename>
           <format type="extended">
              %7.7{priority} %5.5{time}   [%8.8{category}] (%{context}): 
%{message}\n%{throwable}
           </format>
         </file>
         <stream id="console">
           <stream>System.out</stream>
           <format type="avalon">
             %7.7{priority} %23.23{time:yyyy-MM-dd' 'HH:mm:ss.SSS} [%30.30{category}] 
(%{context}): %{message}\n%{throwable}
           </format>
         </stream>
         <file id="log-file">
           <filename>AuthentificationDaoTest.log</filename>
           <format type="avalon">
             %7.7{priority} %23.23{time:yyyy-MM-dd' 'HH:mm:ss.SSS} [%30.30{category}] 
(%{context}): %{message}\n%{throwable}
           </format>
         </file>
       </targets>

       <categories>
         <category name="" log-level="DEBUG">
           <log-target id-ref="root"/>
         </category>
         <category name="test" log-level="DEBUG">
           <log-target id-ref="console"/>
           <log-target id-ref="log-file"/>
         </category>
         <category name="jdbc" log-level="DEBUG">
           <log-target id-ref="console"/>
           <log-target id-ref="log-file"/>
         </category>
       </categories>
     </logkit>

     <context>
     </context>

     <roles>
          <role name="net.sf.hibernate.avalon.HibernateService"
            shorthand="hibernate"
            default-class="net.sf.hibernate.avalon.HibernateServiceImpl"/>
     </roles>

     <components>
     </components>


I also tried to use deprecated ExcaliburTestCase, and it
works *with the same configuration file*. But when i change
extended class name back to FortressTestCase, this exception
is thrown again.

Is this TestCase class usable? Should I wait for stable release?
Or maybe it's a mistake in configuration? Could you give me
any hint?

regards,
-- 
Michal Stochmialek <[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to