You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jeff Jensen <je...@upstairstechnology.com> on 2005/06/28 18:55:54 UTC

Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

(Is this the correct list for help on this plugin?  Its web page does not have a
list listed, it is not listed on sf's "Maven Plugins", but it is hosted on sf,
so I am not sure.)

I am using Maven beta 1.1 and trying to get the Validator "3rd party" plugin
working (maven-xhtml-plugin).

The following problem occurs:

Could not start validation: null not found
at org.apache.maven.xhtml.Validator.initValidator (Validator.java:176)

Has anyone seen this before?

The offending lines are:
        // turn validation on
        try
        {
            this.xmlReader = XMLReaderFactory.createXMLReader();
            this.xmlReader.setFeature(VALIDATION_FEATURE, true);
        }
        catch (SAXNotRecognizedException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " doesn't provide validation");
        }
        catch (SAXNotSupportedException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " doesn't provide validation");
        }
        catch (SAXException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " not found");
        }


So a SAXException was thrown, probably by "XMLReaderFactory.createXMLReader()".

>From the Javadoc: "This method uses the value of the system property
"org.xml.sax.driver" as the full name of a Java class and tries to instantiate
that class as a SAX2 XMLReader."

I wonder if I have to set "org.xml.sax.driver" system property?

Or is there an extra config step I need to do that I did not see on the plugin
web site instructions?

Regretfully the real exception message is swallowed.  And before I have to get
source and modify and build to see it, I am hoping someone has a quick & easy
answer to the problem!  :-)


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


RE: Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

Posted by Jeff Jensen <je...@upstairstechnology.com>.
Hi Lukas, Thanks for sharing your progress.

Sorry, I haven't done anything further!  :-(  Haven't had time for more
troubleshooting as I spent a lot of time trying to get multiproject
working...I still haven't resolved problems with JDepend either  :-((

Basically, I have disabled the report running until I get JDK1.5 setup and
running for the CI machine.


-----Original Message-----
From: Lukas Theussl [mailto:triumf@triumf.ca] 
Sent: Wednesday, August 17, 2005 12:56 PM
To: Maven Users List
Subject: Re: Maven Validator (maven-xhtml-plugin): Could not start
validation: null not found

Still trying to get this to work on 1.4...:)

Jeff Jensen wrote:
> I found using 1.5 eliminates the problem (did you see my follow-up post?).
> I have not pursued making 1.4 work though.

Java 5 includes xerces while 1.4 doesn't. So I figured I'd just have to
include xerces somewhere explicitly to make it work on 1.4.

> 
> I think all it will take for 1.4 (famous last words :-) is setting 
> org.xml.sax.driver, but again I have not done so.

First, it works when running the plugin with the option
-Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl (crimson is
included in 1.4). However, the reports show the same strange error message
as above (External parameter entity "%[dtd];" has characters after markup.)
for every page.

But then, using the option
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser always results in a
ClassNotFoundException. I tried including xerces in my project dependencies
(added to the root classloader) and in the plugin dependencies, with no
success. So the question is: how can I make maven find xerces and include it
in its classpath? I saw the note on xerces on the Compatibility page, but it
doesn't say anything about what to do about it.


> 
> Thanks for your insight.  If you find the solution, please share!   :-D
>  

One solution I can offer is to put a xerces jar into
$JAVA_HOME/jre/lib/endorsed (you still need to specify the command line
option though). However, I would be grateful if somebody could tell me how
to get this to work on the plugin level.

Thanks,
Lukas

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


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


Re: Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

Posted by Lukas Theussl <tr...@triumf.ca>.
Still trying to get this to work on 1.4...:)

Jeff Jensen wrote:
> I found using 1.5 eliminates the problem (did you see my follow-up post?).
> I have not pursued making 1.4 work though.

Java 5 includes xerces while 1.4 doesn't. So I figured I'd just have to 
include xerces somewhere explicitly to make it work on 1.4.

> 
> I think all it will take for 1.4 (famous last words :-) is setting
> org.xml.sax.driver, but again I have not done so.

First, it works when running the plugin with the option 
-Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl (crimson is 
included in 1.4). However, the reports show the same strange error 
message as above (External parameter entity "%[dtd];" has characters 
after markup.) for every page.

But then, using the option 
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser always results 
in a ClassNotFoundException. I tried including xerces in my project 
dependencies (added to the root classloader) and in the plugin 
dependencies, with no success. So the question is: how can I make maven 
find xerces and include it in its classpath? I saw the note on xerces on 
the Compatibility page, but it doesn't say anything about what to do 
about it.


> 
> Thanks for your insight.  If you find the solution, please share!   :-D
>  

One solution I can offer is to put a xerces jar into 
$JAVA_HOME/jre/lib/endorsed (you still need to specify the command line 
option though). However, I would be grateful if somebody could tell me 
how to get this to work on the plugin level.

Thanks,
Lukas

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


RE: Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

Posted by Jeff Jensen <je...@upstairstechnology.com>.
I found using 1.5 eliminates the problem (did you see my follow-up post?).
I have not pursued making 1.4 work though.

I think all it will take for 1.4 (famous last words :-) is setting
org.xml.sax.driver, but again I have not done so.

Thanks for your insight.  If you find the solution, please share!   :-D
 

-----Original Message-----
From: Lukas Theussl [mailto:triumf@triumf.ca] 
Sent: Monday, July 04, 2005 1:31 PM
To: Maven Users List
Subject: Re: Maven Validator (maven-xhtml-plugin): Could not start
validation: null not found


Just a comment: I am having basically the same problem with maven
1.1-beta-1 (everything works fine with 1.0.2).

However, I noticed something weird: I have a project B that extends project
A.

If I run 'site' in project A, I get the above error (Could not start
validation: null not found), and the build stops.

If I run 'site' in projet B, the build goes through, the xhtml report gets
generated but contains a number of strange error messages for each html page
that I didn't have before (External parameter entity "%[dtd];" 
has characters after markup.) ?

If I run 'multiproject:site' in project A, the build goes through but the
xhtml report page contains just an empty placeholder (' This file is used as
a placeholder until the final xhtml validation can occur.').


I have checked the Compatibility page on the maven web site but I can't
figure out what to do to make the xhtml plugin work again.

Hope somebody can help.
Cheers


PS I am running java 1.4, I didn't try with 1.5.


Jeff Jensen wrote:
> (Is this the correct list for help on this plugin?  Its web page does 
> not have a list listed, it is not listed on sf's "Maven Plugins", but 
> it is hosted on sf, so I am not sure.)
> 
> I am using Maven beta 1.1 and trying to get the Validator "3rd party" 
> plugin working (maven-xhtml-plugin).
> 
> The following problem occurs:
> 
> Could not start validation: null not found at 
> org.apache.maven.xhtml.Validator.initValidator (Validator.java:176)
> 
> Has anyone seen this before?
> 
> The offending lines are:
>         // turn validation on
>         try
>         {
>             this.xmlReader = XMLReaderFactory.createXMLReader();
>             this.xmlReader.setFeature(VALIDATION_FEATURE, true);
>         }
>         catch (SAXNotRecognizedException e)
>         {
>             throw new BuildException("Could not start validation: " + 
> this.xmlReader + " doesn't provide validation");
>         }
>         catch (SAXNotSupportedException e)
>         {
>             throw new BuildException("Could not start validation: " + 
> this.xmlReader + " doesn't provide validation");
>         }
>         catch (SAXException e)
>         {
>             throw new BuildException("Could not start validation: " + 
> this.xmlReader + " not found");
>         }
> 
> 
> So a SAXException was thrown, probably by
"XMLReaderFactory.createXMLReader()".
> 
> From the Javadoc: "This method uses the value of the system property 
> "org.xml.sax.driver" as the full name of a Java class and tries to 
> instantiate that class as a SAX2 XMLReader."
> 
> I wonder if I have to set "org.xml.sax.driver" system property?
> 
> Or is there an extra config step I need to do that I did not see on 
> the plugin web site instructions?
> 
> Regretfully the real exception message is swallowed.  And before I 
> have to get source and modify and build to see it, I am hoping someone 
> has a quick & easy answer to the problem!  :-)


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


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


Re: Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

Posted by Lukas Theussl <tr...@triumf.ca>.
Just a comment: I am having basically the same problem with maven 
1.1-beta-1 (everything works fine with 1.0.2).

However, I noticed something weird: I have a project B that extends 
project A.

If I run 'site' in project A, I get the above error (Could not start 
validation: null not found), and the build stops.

If I run 'site' in projet B, the build goes through, the xhtml report 
gets generated but contains a number of strange error messages for each 
html page that I didn't have before (External parameter entity "%[dtd];" 
has characters after markup.) ?

If I run 'multiproject:site' in project A, the build goes through but 
the xhtml report page contains just an empty placeholder (' This file is 
used as a placeholder until the final xhtml validation can occur.').


I have checked the Compatibility page on the maven web site but I can't 
figure out what to do to make the xhtml plugin work again.

Hope somebody can help.
Cheers


PS I am running java 1.4, I didn't try with 1.5.


Jeff Jensen wrote:
> (Is this the correct list for help on this plugin?  Its web page does not have a
> list listed, it is not listed on sf's "Maven Plugins", but it is hosted on sf,
> so I am not sure.)
> 
> I am using Maven beta 1.1 and trying to get the Validator "3rd party" plugin
> working (maven-xhtml-plugin).
> 
> The following problem occurs:
> 
> Could not start validation: null not found
> at org.apache.maven.xhtml.Validator.initValidator (Validator.java:176)
> 
> Has anyone seen this before?
> 
> The offending lines are:
>         // turn validation on
>         try
>         {
>             this.xmlReader = XMLReaderFactory.createXMLReader();
>             this.xmlReader.setFeature(VALIDATION_FEATURE, true);
>         }
>         catch (SAXNotRecognizedException e)
>         {
>             throw new BuildException("Could not start validation: " +
> this.xmlReader + " doesn't provide validation");
>         }
>         catch (SAXNotSupportedException e)
>         {
>             throw new BuildException("Could not start validation: " +
> this.xmlReader + " doesn't provide validation");
>         }
>         catch (SAXException e)
>         {
>             throw new BuildException("Could not start validation: " +
> this.xmlReader + " not found");
>         }
> 
> 
> So a SAXException was thrown, probably by "XMLReaderFactory.createXMLReader()".
> 
> From the Javadoc: "This method uses the value of the system property
> "org.xml.sax.driver" as the full name of a Java class and tries to instantiate
> that class as a SAX2 XMLReader."
> 
> I wonder if I have to set "org.xml.sax.driver" system property?
> 
> Or is there an extra config step I need to do that I did not see on the plugin
> web site instructions?
> 
> Regretfully the real exception message is swallowed.  And before I have to get
> source and modify and build to see it, I am hoping someone has a quick & easy
> answer to the problem!  :-)


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


RE: Maven Validator (maven-xhtml-plugin): Could not start validation: null not found

Posted by Jeff Jensen <je...@upstairstechnology.com>.
FYI Follow up on solution/work around 

This problem does not occur on JDK 1.5, but does on 1.4, and on multiple of
my PCs and another person's.

We also found other people reporting similar issues (not related to using
Maven), but no resolution on the JDK problem yet.

So a workaround for anyone needing it and having this problem is to run
Maven with 1.5.
 

-----Original Message-----
From: Jeff Jensen [mailto:jeffjensen@upstairstechnology.com] 
Sent: Tuesday, June 28, 2005 11:56 AM
To: Maven Users List
Subject: Maven Validator (maven-xhtml-plugin): Could not start validation:
null not found

(Is this the correct list for help on this plugin?  Its web page does not
have a list listed, it is not listed on sf's "Maven Plugins", but it is
hosted on sf, so I am not sure.)

I am using Maven beta 1.1 and trying to get the Validator "3rd party" plugin
working (maven-xhtml-plugin).

The following problem occurs:

Could not start validation: null not found at
org.apache.maven.xhtml.Validator.initValidator (Validator.java:176)

Has anyone seen this before?

The offending lines are:
        // turn validation on
        try
        {
            this.xmlReader = XMLReaderFactory.createXMLReader();
            this.xmlReader.setFeature(VALIDATION_FEATURE, true);
        }
        catch (SAXNotRecognizedException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " doesn't provide validation");
        }
        catch (SAXNotSupportedException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " doesn't provide validation");
        }
        catch (SAXException e)
        {
            throw new BuildException("Could not start validation: " +
this.xmlReader + " not found");
        }


So a SAXException was thrown, probably by
"XMLReaderFactory.createXMLReader()".

>From the Javadoc: "This method uses the value of the system property
"org.xml.sax.driver" as the full name of a Java class and tries to
instantiate that class as a SAX2 XMLReader."

I wonder if I have to set "org.xml.sax.driver" system property?

Or is there an extra config step I need to do that I did not see on the
plugin web site instructions?

Regretfully the real exception message is swallowed.  And before I have to
get source and modify and build to see it, I am hoping someone has a quick &
easy answer to the problem!  :-)


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


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