You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Shane Duan <sd...@borland.com> on 2002/07/15 19:44:25 UTC

init Logging Error?

I think this has to be pretty common but I just cannot find any 
information.  And I cannot find any archive of the mails for me to search.

I am trying to run the example in 
http://jakarta.apache.org/cactus/howto_ejb_j2eeri.html  and I keep on 
getting the following stack trace, even when I don't have the logging 
 turned on in the cactus.properties file.

Has anyone seen this before?

Thanks.

java.lang.RuntimeException: Must call init() first
    at org.apache.cactus.util.log.LogService.getLog(LogService.java:202)
    at 
org.apache.cactus.util.ChainedRuntimeException.around97_printStackTrace(ChainedRuntimeException.java;org/apache/cactus/util/log/LogAspect.java(1k):1133)
    at 
org.apache.cactus.util.ChainedRuntimeException.printStackTrace(ChainedRuntimeException.java;org/apache/cactus/util/log/LogAspect.java(1k):141)
    at junit.framework.TestSuite.exceptionToString(TestSuite.java:123)
    at junit.framework.TestSuite.addTestMethod(TestSuite.java:106)Error 
Eorr!!!
    at junit.framework.TestSuite.<init>(TestSuite.java:66)



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: init Logging Error?

Posted by Vincent Massol <vm...@octo.com>.
Hi Shane,

> -----Original Message-----
> From: Shane Duan [mailto:sduan@borland.com]
> Sent: 17 July 2002 00:06
> To: Cactus Users List
> Subject: Re: init Logging Error?
> 
> Vincent,
> 
> I have tried the nightly build and it is fixed.  Thanks a lot for the
> prompt response!
> 
> I wonder if there is any way to initialize the log service before
> anything else happens, though.  When an exception is thrown when test
> runner is trying to construct the test, the test runner will try to
> construct a string from the exception, during which the LogService
will
> throw exception because it is not initialized correctly.  Then there
is
> no way to retrieve the real exception.  A good example will be when
you
> provide a invalid file location in your VM parameter for
cactus.config.
>  None of the test runners I tried (text ui, swing ui and JBuilder test
> runner) were able to report it correctly.  I just happened to guessed
> the reason.

I have also fixed this in the released Cactus 1.4 (when performing the
move to commons-logging). Try it!

Thanks
-Vincent

> 
> Other than than that, everything is working for me.  :)
> Shane
> 
> Vincent Massol wrote:
> 
> >Shane,
> >
> >I have looked at the Cactus code and I believe I have already fixed
this
> >problem in Cactus 1.4. If you have some time, could you try running
your
> >tests with Cactus 1.4 to see if the problem is really fixed ?
> >
> >I have put a nightly build under
>
>http://jakarta.apache.org/builds/jakarta-cactus/nightly/2002-07-16/jaka
r
> >ta-cactus-13-20020716.zip if you don't want to build from CVS ... :-)
> >
> >Thanks
> >-Vincent
> >
> >
> >
> 
> --
> Disclaimer:  I join all the news groups out of my own interest.  All
> opinions expressed here are my own and not necessarily those of my
> employer.
> 
> Borland -- Enabling the digital world where our customers have the
freedom
> of choice to develop, deploy, and integrate applications across the
> enterprise and  the Internet. http://www.borland.com
> 
> This e-mail, and any attachments thereto, is intended only for use by
the
> addressee(s) named herein and may contain legally privileged and/or
> confidential information.  If you are not the intended recipient of
this
> e-mail, you are hereby notified that any dissemination, distribution
or
> copying of this e-mail, and any attachments thereto, is strictly
> prohibited.  If you have received this e-mail in error, please
immediately
> and permanently delete the original and any copy of any e-mail and any
> printout thereof.
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: init Logging Error?

Posted by Shane Duan <sd...@borland.com>.
Vincent,

I have tried the nightly build and it is fixed.  Thanks a lot for the 
prompt response!

I wonder if there is any way to initialize the log service before 
anything else happens, though.  When an exception is thrown when test 
runner is trying to construct the test, the test runner will try to 
construct a string from the exception, during which the LogService will 
throw exception because it is not initialized correctly.  Then there is 
no way to retrieve the real exception.  A good example will be when you 
provide a invalid file location in your VM parameter for cactus.config. 
 None of the test runners I tried (text ui, swing ui and JBuilder test 
runner) were able to report it correctly.  I just happened to guessed 
the reason.

Other than than that, everything is working for me.  :)
Shane

Vincent Massol wrote:

>Shane,
>
>I have looked at the Cactus code and I believe I have already fixed this
>problem in Cactus 1.4. If you have some time, could you try running your
>tests with Cactus 1.4 to see if the problem is really fixed ?
>
>I have put a nightly build under
>http://jakarta.apache.org/builds/jakarta-cactus/nightly/2002-07-16/jakar
>ta-cactus-13-20020716.zip if you don't want to build from CVS ... :-)
>
>Thanks
>-Vincent
>
>  
>

-- 
Disclaimer:  I join all the news groups out of my own interest.  All opinions expressed here are my own and not necessarily those of my employer.

Borland -- Enabling the digital world where our customers have the freedom of choice to develop, deploy, and integrate applications across the enterprise and  the Internet. http://www.borland.com

This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information.  If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited.  If you have received this e-mail in error, please immediately and permanently delete the original and any copy of any e-mail and any printout thereof.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: init Logging Error?

Posted by Vincent Massol <vm...@octo.com>.
Shane,

I have looked at the Cactus code and I believe I have already fixed this
problem in Cactus 1.4. If you have some time, could you try running your
tests with Cactus 1.4 to see if the problem is really fixed ?

I have put a nightly build under
http://jakarta.apache.org/builds/jakarta-cactus/nightly/2002-07-16/jakar
ta-cactus-13-20020716.zip if you don't want to build from CVS ... :-)

Thanks
-Vincent

> -----Original Message-----
> From: Shane Duan [mailto:sduan@borland.com]
> Sent: 15 July 2002 22:36
> To: Cactus Users List
> Subject: Re: init Logging Error?
> 
> Vicent,
> 
> I copied the stack trace as following in case you need it.  I checked
> and verified that cactus DOES pick up the VM parameter correctly.
> 
> 1) testConvert(org.apache.cactus.sample.ejb.TestConverterEJB)
> 
> org.apache.cactus.util.ChainedRuntimeException: The Cactus
> 'cactus.properties' configuration file need to be present in the java
> CLASSPATH (i.e. the directory that contains it need to be added to the
> client side CLASSPATH - This is the CLASSPATH that you used to start
the
> JUnit test runner).
> 
>     at
>
org.apache.cactus.client.ClientConfigurationChecker.checkCactusPropertie
s(
> ClientConfigurationChecker.java:136)
> 
>     at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:386)
> 
> 
> 
> Vincent Massol wrote:
> 
> >>The true problem behind is, however, is strange as well.  Somehow
the
> >>cactus.properties file is ALWAYS required to be in the class path,
> >>
> >>
> >even
> >
> >
> >>when you specified the cactus.config property through the VM
> >>
> >>
> >parameter.
> >
> >
> >> Is there a reason for this?
> >>
> >>
> >
> >No, I don't think so. I guess it can be called a bug ! :-) I'll check
> >that tomorrow. Thanks.
> >
> >
> 
> --
> Disclaimer:  I join all the news groups out of my own interest.  All
> opinions expressed here are my own and not necessarily those of my
> employer.
> 
> Borland -- Enabling the digital world where our customers have the
freedom
> of choice to develop, deploy, and integrate applications across the
> enterprise and  the Internet. http://www.borland.com
> 
> This e-mail, and any attachments thereto, is intended only for use by
the
> addressee(s) named herein and may contain legally privileged and/or
> confidential information.  If you are not the intended recipient of
this
> e-mail, you are hereby notified that any dissemination, distribution
or
> copying of this e-mail, and any attachments thereto, is strictly
> prohibited.  If you have received this e-mail in error, please
immediately
> and permanently delete the original and any copy of any e-mail and any
> printout thereof.
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: init Logging Error?

Posted by Shane Duan <sd...@borland.com>.
Vicent,

I copied the stack trace as following in case you need it.  I checked 
and verified that cactus DOES pick up the VM parameter correctly.

1) testConvert(org.apache.cactus.sample.ejb.TestConverterEJB)

org.apache.cactus.util.ChainedRuntimeException: The Cactus 
'cactus.properties' configuration file need to be present in the java 
CLASSPATH (i.e. the directory that contains it need to be added to the 
client side CLASSPATH - This is the CLASSPATH that you used to start the 
JUnit test runner).

    at 
org.apache.cactus.client.ClientConfigurationChecker.checkCactusProperties(ClientConfigurationChecker.java:136)

    at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:386)



Vincent Massol wrote:

>>The true problem behind is, however, is strange as well.  Somehow the
>>cactus.properties file is ALWAYS required to be in the class path,
>>    
>>
>even
>  
>
>>when you specified the cactus.config property through the VM
>>    
>>
>parameter.
>  
>
>> Is there a reason for this?
>>    
>>
>
>No, I don't think so. I guess it can be called a bug ! :-) I'll check
>that tomorrow. Thanks.
>  
>

-- 
Disclaimer:  I join all the news groups out of my own interest.  All opinions expressed here are my own and not necessarily those of my employer.

Borland -- Enabling the digital world where our customers have the freedom of choice to develop, deploy, and integrate applications across the enterprise and  the Internet. http://www.borland.com

This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information.  If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited.  If you have received this e-mail in error, please immediately and permanently delete the original and any copy of any e-mail and any printout thereof.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: init Logging Error?

Posted by Vincent Massol <vm...@octo.com>.

> -----Original Message-----
> From: Shane Duan [mailto:sduan@borland.com]
> Sent: 15 July 2002 22:14
> To: Cactus Users List
> Subject: Re: init Logging Error?
> 
> Hi Vincent,
> 
> I should have sent another mail regarding this but I have been dealing
> with the deployment for the last several hours.
> 
> It turned out that another exception occurred during the construction
of
> the tests and JBuilder TestRunner (in version 7) tried to construct
the
> stack trace string.  Somehow, the LogService gets involved and threw
an
> exception because it was not initialized properly.  I switched to
JUnit
> Text UI test runner and that revealed the problem.
> 

ok cool. Tell me if there is anything to do on Cactus side.

> The true problem behind is, however, is strange as well.  Somehow the
> cactus.properties file is ALWAYS required to be in the class path,
even
> when you specified the cactus.config property through the VM
parameter.
>  Is there a reason for this?

No, I don't think so. I guess it can be called a bug ! :-) I'll check
that tomorrow. Thanks.

> 
> For the record, I am using JBuilder 7, BES server, JUnit 3.7 and
Cactus
> 1.3 for J2EE 1.3
> 

Cheers,
-Vincent

> 
> 
> Vincent Massol wrote:
> 
> >Hi Shane,
> >
> >This is very strange and it should not happen. It simply means that
> >somehow the Cactus logging initialization step was skipped ...
somehow
> >...
> >
> >Can you give us more information on :
> >- Cactus version
> >- JUnit version
> >- How do you start it ? From JBuilder ? (I'm just asking as I saw
> >Borland in your email ! :-)). With what Test Runner ?
> >
> >I was going to say : "the easiest would be for you to send the logs",
> >but obviously this won't work ...
> >
> >Have you tried running the Cactus sample which is packaged in the
Cactus
> >distribution ? Is it working ok ?
> >
> >Thanks
> >-Vincent
> >
> >
> >
> 
> --
> Disclaimer:  I join all the news groups out of my own interest.  All
> opinions expressed here are my own and not necessarily those of my
> employer.
> 
> Borland -- Enabling the digital world where our customers have the
freedom
> of choice to develop, deploy, and integrate applications across the
> enterprise and  the Internet. http://www.borland.com
> 
> This e-mail, and any attachments thereto, is intended only for use by
the
> addressee(s) named herein and may contain legally privileged and/or
> confidential information.  If you are not the intended recipient of
this
> e-mail, you are hereby notified that any dissemination, distribution
or
> copying of this e-mail, and any attachments thereto, is strictly
> prohibited.  If you have received this e-mail in error, please
immediately
> and permanently delete the original and any copy of any e-mail and any
> printout thereof.
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: init Logging Error?

Posted by Shane Duan <sd...@borland.com>.
Hi Vincent,

I should have sent another mail regarding this but I have been dealing 
with the deployment for the last several hours.

It turned out that another exception occurred during the construction of 
the tests and JBuilder TestRunner (in version 7) tried to construct the 
stack trace string.  Somehow, the LogService gets involved and threw an 
exception because it was not initialized properly.  I switched to JUnit 
Text UI test runner and that revealed the problem.

The true problem behind is, however, is strange as well.  Somehow the 
cactus.properties file is ALWAYS required to be in the class path, even 
when you specified the cactus.config property through the VM parameter. 
 Is there a reason for this?

For the record, I am using JBuilder 7, BES server, JUnit 3.7 and Cactus 
1.3 for J2EE 1.3



Vincent Massol wrote:

>Hi Shane,
>
>This is very strange and it should not happen. It simply means that
>somehow the Cactus logging initialization step was skipped ... somehow
>...
>
>Can you give us more information on :
>- Cactus version
>- JUnit version
>- How do you start it ? From JBuilder ? (I'm just asking as I saw
>Borland in your email ! :-)). With what Test Runner ?
>
>I was going to say : "the easiest would be for you to send the logs",
>but obviously this won't work ...
>
>Have you tried running the Cactus sample which is packaged in the Cactus
>distribution ? Is it working ok ?
>
>Thanks
>-Vincent
>
>  
>

-- 
Disclaimer:  I join all the news groups out of my own interest.  All opinions expressed here are my own and not necessarily those of my employer.

Borland -- Enabling the digital world where our customers have the freedom of choice to develop, deploy, and integrate applications across the enterprise and  the Internet. http://www.borland.com

This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information.  If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited.  If you have received this e-mail in error, please immediately and permanently delete the original and any copy of any e-mail and any printout thereof.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: init Logging Error?

Posted by Vincent Massol <vm...@octo.com>.
Hi Shane,

This is very strange and it should not happen. It simply means that
somehow the Cactus logging initialization step was skipped ... somehow
...

Can you give us more information on :
- Cactus version
- JUnit version
- How do you start it ? From JBuilder ? (I'm just asking as I saw
Borland in your email ! :-)). With what Test Runner ?

I was going to say : "the easiest would be for you to send the logs",
but obviously this won't work ...

Have you tried running the Cactus sample which is packaged in the Cactus
distribution ? Is it working ok ?

Thanks
-Vincent

> -----Original Message-----
> From: Shane Duan [mailto:sduan@borland.com]
> Sent: 15 July 2002 18:44
> To: Cactus Users List
> Subject: init Logging Error?
> 
> I think this has to be pretty common but I just cannot find any
> information.  And I cannot find any archive of the mails for me to
search.
> 
> I am trying to run the example in
> http://jakarta.apache.org/cactus/howto_ejb_j2eeri.html  and I keep on
> getting the following stack trace, even when I don't have the logging
>  turned on in the cactus.properties file.
> 
> Has anyone seen this before?
> 
> Thanks.
> 
> java.lang.RuntimeException: Must call init() first
>     at
org.apache.cactus.util.log.LogService.getLog(LogService.java:202)
>     at
>
org.apache.cactus.util.ChainedRuntimeException.around97_printStackTrace(
Ch
>
ainedRuntimeException.java;org/apache/cactus/util/log/LogAspect.java(1k)
:1
> 133)
>     at
>
org.apache.cactus.util.ChainedRuntimeException.printStackTrace(ChainedRu
nt
> imeException.java;org/apache/cactus/util/log/LogAspect.java(1k):141)
>     at junit.framework.TestSuite.exceptionToString(TestSuite.java:123)
>     at
junit.framework.TestSuite.addTestMethod(TestSuite.java:106)Error
> Eorr!!!
>     at junit.framework.TestSuite.<init>(TestSuite.java:66)
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>