santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Mullan <Sean.Mul...@Sun.COM>
Subject Re: debugging
Date Mon, 11 Jan 2010 21:22:15 GMT
Bolcina Ivan wrote:
> Thanks Sean!
> 
> That was it. Great blog!
> 
> However,something strange is still happening, since app doesn't work
> without xmlsec jar. I guess JSR 106 (encryption is missing), JSR 105
> is defined bouth in JDK and in this jar.

Correct.

Now, if you want to use a more recent Apache XML Security library with 
Sun's JDK 6 or JDK 7, you will need to override the implementation built 
into the JDK. For details on that, see:

http://blogs.sun.com/mullan/entry/using_more_recent_apache_xml

--Sean

> 
> BR,ivan
> 
> -----Original Message----- From: Sean.Mullan@Sun.COM
> [mailto:Sean.Mullan@Sun.COM] Sent: Monday, January 11, 2010 8:47 PM 
> To: security-dev@xml.apache.org Subject: Re: debugging
> 
> Are you using the JSR 105 API and JDK 6? If you are, it could be
> using the XML Security implementation bundled with JDK 6. This uses a
>  different logging mechanism (JDK logging). If so, check my blog for
> info on configuring that:
> 
> http://weblogs.java.net/blog/mullan/archive/2006/02/more_xml_signat_1.html
>  
> http://weblogs.java.net/blog/2008/03/13/configuring-logging-properties-jsr-105-and-apache-xml-signature-applications
> 
> 
> I don't really know much about configuring log4j - I just use the
> config that somebody else set up previously in the ant build.xml
> file. It seems to work for me, at least for the stuff in the Apache
> XML Security code.
> 
> --Sean
> 
> Bolcina Ivan wrote:
>> Thanks, Sean.
>> 
>> I dont have  a clue, why it doesn't work. I put
>> commons-logging.jar, commons-loggin-api.jar, log4j-1.2.15.jar into
>> lib directory.
>> 
>> I edited log4j.properties like below. Then I stared my app using 
>> java -Dlog4j.configuration=log4j.properties -jar PartnersXC.jar
>> 
>> Still, nothing happens :-( Any ideas?
>> 
>> My coleage told me, that this "should work right out of box", so I
>> really don't know what am I missing...
>> 
>> BR,ivan
>> 
>> #
>> ------------------------------------------------------------------------
>>  # # Logging Configuration # #
>> ------------------------------------------------------------------------
>>  # log4j.rootLogger=DEBUG, Console
>> 
>> ########################################################################
>>  # # Logging based on packages # 
>> ########################################################################
>>  log4j.logger.org.apache.xml.security=DEBUG, Console 
>> log4j.logger.org.apache.xml.security.test.AllTests=DEBUG, Console
>> 
>> ########################################################################
>>  # # Logfile definitions # 
>> ########################################################################
>>  #Console Log 
>> log4j.appender.Console=org.apache.log4j.ConsoleAppender 
>> log4j.appender.Console.Threshold=DEBUG 
>> log4j.appender.Console.layout=org.apache.log4j.PatternLayout 
>> log4j.appender.Console.layout.ConversionPattern=%-5p %C{1}:%L -
>> %m\n log4j.appender.Console.Target=System.out
>> 
>> #LOGTXT Log log4j.appender.LOGTXT=org.apache.log4j.FileAppender 
>> log4j.appender.LOGTXT.File=log.txt 
>> log4j.appender.LOGTXT.Append=true 
>> log4j.appender.LOGTXT.Threshold=DEBUG 
>> log4j.appender.LOGTXT.layout=org.apache.log4j.PatternLayout 
>> log4j.appender.LOGTXT.layout.ConversionPattern=%-5p %C{1}:%L - %m\n
>> 
>> 
>> 
>> and then I started my app.like
>> 
>> -----Original Message----- From: Sean.Mullan@Sun.COM
>> [mailto:Sean.Mullan@Sun.COM] Sent: Monday, January 11, 2010 5:10 PM
>>  To: security-dev@xml.apache.org Subject: Re: debugging
>> 
>> Look at src/org/apache/xml/security/resource/log4j.properties in
>> the source tree. Change these lines to print debug messages on
>> Console:
>> 
>> log4j.logger.org.apache.xml.security=DEBUG, Console 
>> log4j.logger.org.apache.xml.security.test.AllTests=DEBUG, Console
>> 
>> Specify the following system property when running tests:
>> 
>> -Dlog4j.configuration=[path to logging.properties]
>> 
>> Make sure log4j and apache commons logging jars are in classpath.
>> 
>> Look at the build.xml and search for "log4j" to see how this works
>> when running ant and Junit tests.
>> 
>> --Sean
>> 
>> 
>> Bolcina Ivan wrote:
>>> Thanks for info, but I don't understand it.
>>> 
>>> The link on site of apache xml security seems broken, and link
>>> you provided explains things very generic.
>>> 
>>> As far as I understand, I have to write yet another configuration
>>> file? Has anyone enable debuging messages? Can you share your
>>> configuration files/startup properties?
>>> 
>>> BR,ivan
>>> 
>>> -----Original Message----- From: Sean.Mullan@Sun.COM
>>> [mailto:Sean.Mullan@Sun.COM] Sent: Wednesday, January 06, 2010
>>> 3:27 PM To: security-dev@xml.apache.org Subject: Re: debugging
>>> 
>>> Bolcina Ivan wrote:
>>>> Hi.
>>>> 
>>>> 
>>>> 
>>>> How to enable debuging messages. I looked at log4j.log and it
>>>> seems fine, but no debug messages are printed out to console?
>>> See: http://commons.apache.org/logging/guide.html#Configuration
>>> 
>>> --Sean
> 


Mime
View raw message