Unable to see exception detail (stack trace and related)
--------------------------------------------------------

         Key: WT-355
         URL: http://webtest-community.canoo.com/jira/browse/WT-355
     Project: WebTest
        Type: Bug

 Environment: not env related (replicated equally on windows and aix boxes)
    Reporter: Dario Bahena


I am using Build-Number: R_1619

When I enable debug level at the Ant command line, I can see full error 
description when something in webtest fails (like line number info, which is 
absolutely necessary for me to trace the problems).

I tried disabling debug for whole ant and specified on log4j.properties file 
that I wanted to debug just webtest packages. As a result, the exception info 
seems to be swallowed somewhere in the middle. See the following example:

BUILD FAILED
/big/pps/deployServer/chacaDeploy/scripts/ant/deployUIW3.xml:112: The following 
error occurred while executing this line:
/big/pps/deployServer/chacaDeploy/scripts/ant/deployUIW3.xml:85: The following 
error occurred while executing this line:
/big/pps/deployServer/chacaDeploy/scripts/ant/deployUICommon.xml:432: The 
following error occurred while executing this line:
/big/pps/deployServer/chacaDeploy/scripts/ant/deployUICommon.xml:343: 
Unexpected exception caught: org.apache.tools.ant.BuildException


That's all I get ... a generic BuildException. Now, let me describe my setup in 
order to allow you detect or even reproduce issue.

1. Im including following jars in ant's lib:

CVS                         commons-codec-1.3.jar
HtmlUnit-20071008.0355.jar  commons-collections-3.2.jar
Tidy.jar                    commons-httpclient-3.0.1.jar
ant-apache-bcel.jar         commons-io-1.3.1.jar
ant-apache-bsf.jar          commons-lang-2.3.jar
ant-apache-log4j.jar        commons-logging-1.0.4.jar
ant-apache-oro.jar          jaxen-1.1.1.jar
ant-apache-regexp.jar       js-1.6R5.jar
ant-commons-logging.jar     jsch-0.1.33.jar
ant-contrib-1.0b3.jar       jsse.jar
ant-jmf.jar                 junit-4.4.jar
ant-jsch.jar                log4j-1.2.14.jar
ant-junit.jar               mail-1.4.jar
ant-launcher.jar            nekohtml-0.9.5.jar
ant-nodeps.jar              oro-2.0.6.jar
ant-swing.jar               poi-3.0.1-FINAL.jar
ant-testutil.jar            serializer.jar
ant-trax.jar                webtest.jar
ant.jar                     webtest_T.jar
bsf-2.4.0.jar               xalan.jar
bsh-2.0b4.jar               xercesImpl.jar
collectpages.jar            xml-apis.jar

Of course not all are webtest related, but I am putting them all here for the 
sake of completeness. 

2. I setup webtest with following line in my ant stuff

  <taskdef resource="webtest.taskdef"/>

3. And my webtest usage is something like:

      <webtest name="WAS console interaction">
        <config
          saveresponse="yes"
          resultpath="@{resultpath}"
          autorefresh="yes"
          host="[EMAIL PROTECTED]"
          port="[EMAIL PROTECTED]"
          protocol="https"
          basepath="/ibm/console/" />
        <steps>
          <property name="webtest.connectioninitializer"
            value="com.canoo.webtest.security.SunJsseBaseConnectionInitializer" 
/>
          <property name="webtest.truststore.file" 
            value="${local.ui.tmp}/@{subenv}/@{subenv}.jks"/>
          <property name="webtest.truststore.passphrase"
            value="${local.ui.keystore.pwd}"/>
          <initialStepsUI 
            user="[EMAIL PROTECTED]"
            pwd="[EMAIL PROTECTED]"/>
          <addSteps/>
          <finalStepsUI/>
        </steps>
      </webtest>    

4. My log4j.properties file is:

# Default log level is warning and we setup two appenders.
log4j.rootLogger=warn, console

# console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

log4j.logger.com.canoo.webtest=debug

5. And I am instructing Ant to use with:

#main
ant -f "$BUILD_DIR"/scripts/ant/deploy.xml \
      -Dbuild.dir="$BUILD_DIR"  \
      -Dlog4j.configuration=file://"$BUILD_DIR"/conf/build/log4.properties \
      $*


That's it ... enabling debug for whole Ant is not an option for me, not only 
for practical but for security reasons (sensitive props, like passwords, are 
written). I would like just to keep the detail about webtest errors. Any idea?

Thankx.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to