You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by fenallen <fe...@gmx.net> on 2005/10/13 11:24:08 UTC

Checkstyle and Saxon in Maven 1.1

Hi.

I'm just moving a project to Maven 1.1

We need to use saxon for many ant:style goals during build so I have 
saxon in the ${JAVA_HOME}/jre/lib/endorsed dir and it builds fine.

However, the checkstyle plugin fails with this error:

just a snipet from the full stack trace....

   at java.lang.reflect.Method.invoke(Method.java:324)
   at com.werken.forehead.Forehead.run(Forehead.java:551)
   at com.werken.forehead.Forehead.main(Forehead.java:581)
Caused by: Unable to create a Checker: unable to parse file:C:/Documents 
and Settings/allen.fensome/.maven/cache/maven-c
heckstyle-plugin-2.5/plugin-resources/sun_checks.xml
   at 
com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:319) 

   at 
com.puppycrawl.tools.checkstyle.CheckStyleTask.execute(CheckStyleTask.java:259) 

   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
   at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
   ... 72 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: 
unable to parse file:C:/Documents and Settings/allen
.fensome/.maven/cache/maven-checkstyle-plugin-2.5/plugin-resources/sun_checks.xml 

   at 
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:257) 

   at 
com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:291) 

   ... 76 more
Caused by: javax.xml.parsers.ParserConfigurationException: AElfred 
parser is non-validating
   at 
com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:34) 

   at 
com.puppycrawl.tools.checkstyle.api.AbstractLoader.<init>(AbstractLoader.java:80) 

   at 
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.<init>(ConfigurationLoader.java:106) 

   at 
com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.<init>(ConfigurationLoader.java:83) 

   at 
com.puppycrawl.tools.checkstyle.ConfigurationLoader.<init>(ConfigurationLoader.java:200) 

   at 
com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:235) 

   ... 77 more
Root cause
Unable to create a Checker: unable to parse file:C:/Documents and 
Settings/allen.fensome/.maven/cache/maven-checkstyle-p
lugin-2.5/plugin-resources/sun_checks.xml
   at 
com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:319) 

   at 
com.puppycrawl.tools.checkstyle.CheckStyleTask.execute(CheckStyleTask.java:259) 

   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
   at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
   at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
         etc.....


Any suggestions?  The ${maven.home}/lib/endorsed equivalent in maven 
1.0.2 worked a treat with the same checkstyle plugin.

Allen.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Checkstyle and Saxon in Maven 1.1

Posted by Andy Glick <an...@acm.org>.
fenallen wrote:

> We need to use saxon for many ant:style goals during build so I have 
> saxon in the ${JAVA_HOME}/jre/lib/endorsed dir and it builds fine.
> 
> However, the checkstyle plugin fails with this error:
> 
> just a snipet from the full stack trace....
> 
>   at java.lang.reflect.Method.invoke(Method.java:324)
>   at com.werken.forehead.Forehead.run(Forehead.java:551)
>   at com.werken.forehead.Forehead.main(Forehead.java:581)
> Caused by: Unable to create a Checker: unable to parse file:C:/Documents 
> and Settings/allen.fensome/.maven/cache/maven-c
> heckstyle-plugin-2.5/plugin-resources/sun_checks.xml
>   at 
> com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:319) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.CheckStyleTask.execute(CheckStyleTask.java:259) 
> 
>   at org.apache.tools.ant.Task.perform(Task.java:364)
>   at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
>   at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
>   ... 72 more
> Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: 
> unable to parse file:C:/Documents and Settings/allen
> .fensome/.maven/cache/maven-checkstyle-plugin-2.5/plugin-resources/sun_checks.xml 
> 
>   at 
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:257) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:291) 
> 
>   ... 76 more
> Caused by: javax.xml.parsers.ParserConfigurationException: AElfred 
> parser is non-validating
>   at 
> com.icl.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryImpl.java:34) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.api.AbstractLoader.<init>(AbstractLoader.java:80) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.<init>(ConfigurationLoader.java:106) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.<init>(ConfigurationLoader.java:83) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.<init>(ConfigurationLoader.java:200) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:235) 
> 
>   ... 77 more
> Root cause
> Unable to create a Checker: unable to parse file:C:/Documents and 
> Settings/allen.fensome/.maven/cache/maven-checkstyle-p
> lugin-2.5/plugin-resources/sun_checks.xml
>   at 
> com.puppycrawl.tools.checkstyle.CheckStyleTask.createChecker(CheckStyleTask.java:319) 
> 
>   at 
> com.puppycrawl.tools.checkstyle.CheckStyleTask.execute(CheckStyleTask.java:259) 
> 
>   at org.apache.tools.ant.Task.perform(Task.java:364)
>   at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195)
>   at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
>   at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
>         etc.....
> 
> 
> Any suggestions?  The ${maven.home}/lib/endorsed equivalent in maven 
> 1.0.2 worked a treat with the same checkstyle plugin.

Hello,

>From looking at the stack trace I can see only that the code could not parse the file sun_checks.xml. I hesitate to make the following statement, mostly because I understand that the checkstyle plugin normally works and my observation suggests that it should never work, but  

file:C:/Documents and Settings/allen.fensome/.maven/cache/maven-checkstyle-plugin-2.5/plugin-resources/sun_checks.xml

is not an appropriate specification of a file URL. I often see controversies about how many forward slash characters ought to appear between "file:" and the file spec, e.g. "C:/Documents and Settings/..." but it is my understanding that file:<file spec> should not work.

Perhaps someone who has more experience with the checkstyle plugin could reply, yes?

Hope that this helps  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org