You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Th...@putnam.com on 2005/02/17 17:07:33 UTC

Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.






This line indicates the problem:
"org.xml.sax.SAXParseException: The prefix "castor" for element
> "castor:generate" is not bound."

This is a namespace problem. If you have a tag like <castor:  in your
maven.xml, you
have to declare the tag in a namespace, as in
<project xmlns:castor="maven:castor"

hope this helps.

<

"Graham Leggett" <mi...@sharp.fm> wrote on 02/17/2005 10:44:03 AM:

> Hi all,
>
> While trying to set up the castor plugin (and following the instructions
> for installing a default implementation of it), I try and run maven
> jar:install (castor is a preGoal of this), and get the exception below.
>
> Google doesn't show this error anywhere, so I am stumped. Anyone know
what
> the error message is trying to tell me?
>
> Graham-Leggetts-Computer:~/src/standard/monaco-xml minfrin$ maven -e
> jar:install
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0.2
>
> Fatal Error [line 18, row 34]: The prefix "castor" for element
> "castor:generate" is not bound.
> org.apache.maven.MavenException: Error parsing plugin script
>         at
>
org.apache.maven.plugin.JellyScriptHousing.parse(JellyScriptHousing.java:165)

>         at
>
org.apache.maven.plugin.JellyScriptHousing.parse(JellyScriptHousing.java:177)

>         at
>
org.apache.maven.plugin.PluginManager.readMavenXml(PluginManager.java:514)
>         at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:580)
>         at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
>         at org.apache.maven.cli.App.doMain(App.java:488)
>         at org.apache.maven.cli.App.main(App.java:1239)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

>         at
> sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
>         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)
> --- Nested Exception ---
> org.xml.sax.SAXParseException: The prefix "castor" for element
> "castor:generate" is not bound.
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
>         at javax.xml.parsers.SAXParser.parse(Unknown Source)
>         at
>
org.apache.maven.plugin.JellyScriptHousing.parse(JellyScriptHousing.java:157)

>         at
>
org.apache.maven.plugin.JellyScriptHousing.parse(JellyScriptHousing.java:177)

>         at
>
org.apache.maven.plugin.PluginManager.readMavenXml(PluginManager.java:514)
>         at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:580)
>         at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
>         at org.apache.maven.cli.App.doMain(App.java:488)
>         at org.apache.maven.cli.App.main(App.java:1239)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

>         at
> sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
>         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)
>
> Regards,
> Graham
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>



 
This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only.  It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction.  Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail.   All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice.  Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you are not the intended recipient of this e-mail, please delete the e-mail.

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


Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.

Posted by Th...@putnam.com.





Sorry, I shouldn't have used a generalized example without checking first.

In the castor plugin I found this namespace declaration in plugin.jelly:
xmlns:castor="castor"

try that in place of maven:castor

regards
Tom

Graham Leggett <mi...@sharp.fm> wrote on 02/17/2005 01:49:37 PM:

> Thomas_Perry@putnam.com wrote:
>
> > This line indicates the problem:
> > "org.xml.sax.SAXParseException: The prefix "castor" for element
> >
> >>"castor:generate" is not bound."
> >
> >
> > This is a namespace problem. If you have a tag like <castor:  in your
> > maven.xml, you
> > have to declare the tag in a namespace, as in
> > <project xmlns:castor="maven:castor"
> >
> > hope this helps.
>
> This has helped a whole lot, thanks!
>
> Maven now downloads the castor jar file, but still does not seem to
> generate any code, but rather gives the following warnings:
>
> Tag library requested that is not present: 'maven:castor' in plugin:
'null'
> Tag library requested that is not present: 'maven' in plugin: 'null'
>
> Any ideas what these warnings might mean?
>
> Regards,
> Graham
> --



 
This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only.  It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction.  Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail.   All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice.  Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you are not the intended recipient of this e-mail, please delete the e-mail.

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


Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.

Posted by Graham Leggett <mi...@sharp.fm>.
Thomas_Perry@putnam.com wrote:

> This line indicates the problem:
> "org.xml.sax.SAXParseException: The prefix "castor" for element
> 
>>"castor:generate" is not bound."
> 
> 
> This is a namespace problem. If you have a tag like <castor:  in your
> maven.xml, you
> have to declare the tag in a namespace, as in
> <project xmlns:castor="maven:castor"
> 
> hope this helps.

This has helped a whole lot, thanks!

Maven now downloads the castor jar file, but still does not seem to 
generate any code, but rather gives the following warnings:

Tag library requested that is not present: 'maven:castor' in plugin: 'null'
Tag library requested that is not present: 'maven' in plugin: 'null'

Any ideas what these warnings might mean?

Regards,
Graham
--

Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.

Posted by Graham Leggett <mi...@sharp.fm>.
Thomas_Perry@putnam.com wrote:

> do you have castor\jars in your repository? If not, you need to do a
> plugin:download

There is a maven-castor-plugin.jar and a castor-0.9.5.jar available in 
the repository. If I delete the castor jar, it downloads it again and 
then says "Could not find org.exolab.castor.builder.SourceGenerator".

I tried to remove my repository and let maven download it's dependancies 
from scratch, but still no luck.

Has anyone got the castor plugin to work by following the 
maven-castor-plugin instructions?

Regards,
Graham
--

Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.

Posted by Th...@putnam.com.





do you have castor\jars in your repository? If not, you need to do a
plugin:download

I also have a %HOME% environmental variable set to the path Documents and
Settings\tperry
I think maven uses that variable to get the path to the repository in the
classpath.
Do you have a similar variable set?

Hope this helps


Graham Leggett <mi...@sharp.fm> wrote on 02/17/2005 03:22:34 PM:

> Thomas_Perry@putnam.com wrote:
>
> > This is a namespace problem. If you have a tag like <castor:  in your
> > maven.xml, you
> > have to declare the tag in a namespace, as in
> > <project xmlns:castor="maven:castor"
>
> I fixed the namespaces as you suggested, and the warnings are now gone.
> Castor still won't run though, it now complains as below. It seeems
> maven has got confused as to whether it had downloaded castor or not -
> any ideas how to fix this?
>
> build:start:
>
> java:prepare-filesystem:
>
> java:compile:
> castor:prepare-filesystem:
>
>      [echo] Generating sources for src/xsd/eod.xsd
>
> BUILD FAILED
> File......
/Users/minfrin/.maven/cache/maven-castor-plugin-1.2/plugin.jelly
> Element... ant:java
> Line...... 92
> Column.... 38
> Could not find org.exolab.castor.builder.SourceGenerator. Make sure you
> have it in your classpath
> Total time: 5 seconds
> Finished at: Thu Feb 17 22:19:54 SAST 2005
>
> Regards,
> Graham
> --



 
This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only.  It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction.  Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail.   All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice.  Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you are not the intended recipient of this e-mail, please delete the e-mail.

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


Re: Castor plugin: The prefix "castor" for element "castor:generate" is not bound.

Posted by Graham Leggett <mi...@sharp.fm>.
Thomas_Perry@putnam.com wrote:

> This is a namespace problem. If you have a tag like <castor:  in your
> maven.xml, you
> have to declare the tag in a namespace, as in
> <project xmlns:castor="maven:castor"

I fixed the namespaces as you suggested, and the warnings are now gone. 
Castor still won't run though, it now complains as below. It seeems 
maven has got confused as to whether it had downloaded castor or not - 
any ideas how to fix this?

build:start:

java:prepare-filesystem:

java:compile:
castor:prepare-filesystem:

     [echo] Generating sources for src/xsd/eod.xsd

BUILD FAILED
File...... /Users/minfrin/.maven/cache/maven-castor-plugin-1.2/plugin.jelly
Element... ant:java
Line...... 92
Column.... 38
Could not find org.exolab.castor.builder.SourceGenerator. Make sure you 
have it in your classpath
Total time: 5 seconds
Finished at: Thu Feb 17 22:19:54 SAST 2005

Regards,
Graham
--