You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Ryan Holmes (JIRA)" <ji...@apache.org> on 2010/09/06 23:17:34 UTC

[jira] Created: (CLK-716) XmlConfigService throws exception with autobinding value of "default"

XmlConfigService throws exception with autobinding value of "default"
---------------------------------------------------------------------

                 Key: CLK-716
                 URL: https://issues.apache.org/jira/browse/CLK-716
             Project: Click
          Issue Type: Bug
          Components: core
    Affects Versions: 2.2.0
         Environment: Java 1.6, Jetty 7, Mac OS X
            Reporter: Ryan Holmes


The click-2.2.dtd specifies a default value of "default" for the autobinding attribute of the pages element:

  <!-- Application pages. -->
  <!ELEMENT pages (page*, excludes*)>
    <!ATTLIST pages package CDATA #IMPLIED>
    <!ATTLIST pages automapping (true|false) "true">
    <!ATTLIST pages autobinding (default|annotation|none) "default">


This causes the following exception when the DTD is specified in click.xml and no autobinding value is supplied (or a value of "default" is specified):

java.lang.RuntimeException: Invalid pages autobinding attribute: default
	at org.apache.click.service.XmlConfigService.loadPages(XmlConfigService.java:994)
	at org.apache.click.service.XmlConfigService.onInit(XmlConfigService.java:240)
	at org.apache.click.ClickServlet.initConfigService(ClickServlet.java:1687)
	at org.apache.click.ClickServlet.init(ClickServlet.java:197)
	at org.apache.click.extras.spring.SpringClickServlet.init(SpringClickServlet.java:387)
	at javax.servlet.GenericServlet.init(GenericServlet.java:241)

I marked this bug as major priority because an exception is thrown with a minimal click.xml file (at least when using the DTD), so the impact to out-of-the-box functionality is pretty severe.

A quick look at the code reveals that XmlConfigService expects an autobinding value of "public" instead of "default". This conflicts with both the DTD and the documentation for click.xml. Since an autobinding value of "public" is not documented anywhere as far as I can tell and since XmlConfigService maps "public" to the AutoBinding.DEFAULT enum, the use of "public" is most likely a typo and should simply be replaced with "default".



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-716) XmlConfigService throws exception with autobinding value of "default"

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906636#action_12906636 ] 

Bob Schellink commented on CLK-716:
-----------------------------------

Hi Ryan,

Thanks for the report.  I recalled some work done in this area for the next release. Do you see this issue in trunk? You can grab a copy of trunk here:

https://hudson.apache.org/hudson/view/Click/job/Click/ws/

Kind regards

Bob

> XmlConfigService throws exception with autobinding value of "default"
> ---------------------------------------------------------------------
>
>                 Key: CLK-716
>                 URL: https://issues.apache.org/jira/browse/CLK-716
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.2.0
>         Environment: Java 1.6, Jetty 7, Mac OS X
>            Reporter: Ryan Holmes
>
> The click-2.2.dtd specifies a default value of "default" for the autobinding attribute of the pages element:
>   <!-- Application pages. -->
>   <!ELEMENT pages (page*, excludes*)>
>     <!ATTLIST pages package CDATA #IMPLIED>
>     <!ATTLIST pages automapping (true|false) "true">
>     <!ATTLIST pages autobinding (default|annotation|none) "default">
> This causes the following exception when the DTD is specified in click.xml and no autobinding value is supplied (or a value of "default" is specified):
> java.lang.RuntimeException: Invalid pages autobinding attribute: default
> 	at org.apache.click.service.XmlConfigService.loadPages(XmlConfigService.java:994)
> 	at org.apache.click.service.XmlConfigService.onInit(XmlConfigService.java:240)
> 	at org.apache.click.ClickServlet.initConfigService(ClickServlet.java:1687)
> 	at org.apache.click.ClickServlet.init(ClickServlet.java:197)
> 	at org.apache.click.extras.spring.SpringClickServlet.init(SpringClickServlet.java:387)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> I marked this bug as major priority because an exception is thrown with a minimal click.xml file (at least when using the DTD), so the impact to out-of-the-box functionality is pretty severe.
> A quick look at the code reveals that XmlConfigService expects an autobinding value of "public" instead of "default". This conflicts with both the DTD and the documentation for click.xml. Since an autobinding value of "public" is not documented anywhere as far as I can tell and since XmlConfigService maps "public" to the AutoBinding.DEFAULT enum, the use of "public" is most likely a typo and should simply be replaced with "default".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CLK-716) XmlConfigService throws exception with autobinding value of "default"

Posted by "Ryan Holmes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906707#action_12906707 ] 

Ryan Holmes commented on CLK-716:
---------------------------------

Ah, yes. Looks like it's been fixed. Sorry I didn't check trunk first. The following was added to the autobinding parsing logic in the loadPages(Element) method:

                } else if ("default".equalsIgnoreCase(autobindingStr)) {
                    autobinding = AutoBinding.DEFAULT;


> XmlConfigService throws exception with autobinding value of "default"
> ---------------------------------------------------------------------
>
>                 Key: CLK-716
>                 URL: https://issues.apache.org/jira/browse/CLK-716
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.2.0
>         Environment: Java 1.6, Jetty 7, Mac OS X
>            Reporter: Ryan Holmes
>
> The click-2.2.dtd specifies a default value of "default" for the autobinding attribute of the pages element:
>   <!-- Application pages. -->
>   <!ELEMENT pages (page*, excludes*)>
>     <!ATTLIST pages package CDATA #IMPLIED>
>     <!ATTLIST pages automapping (true|false) "true">
>     <!ATTLIST pages autobinding (default|annotation|none) "default">
> This causes the following exception when the DTD is specified in click.xml and no autobinding value is supplied (or a value of "default" is specified):
> java.lang.RuntimeException: Invalid pages autobinding attribute: default
> 	at org.apache.click.service.XmlConfigService.loadPages(XmlConfigService.java:994)
> 	at org.apache.click.service.XmlConfigService.onInit(XmlConfigService.java:240)
> 	at org.apache.click.ClickServlet.initConfigService(ClickServlet.java:1687)
> 	at org.apache.click.ClickServlet.init(ClickServlet.java:197)
> 	at org.apache.click.extras.spring.SpringClickServlet.init(SpringClickServlet.java:387)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> I marked this bug as major priority because an exception is thrown with a minimal click.xml file (at least when using the DTD), so the impact to out-of-the-box functionality is pretty severe.
> A quick look at the code reveals that XmlConfigService expects an autobinding value of "public" instead of "default". This conflicts with both the DTD and the documentation for click.xml. Since an autobinding value of "public" is not documented anywhere as far as I can tell and since XmlConfigService maps "public" to the AutoBinding.DEFAULT enum, the use of "public" is most likely a typo and should simply be replaced with "default".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CLK-716) XmlConfigService throws exception with autobinding value of "default"

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLK-716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink resolved CLK-716.
-------------------------------

    Fix Version/s: 2.3.0-M1
       Resolution: Duplicate

Good to hear its working. Closing as duplicate of: CLK-714

> XmlConfigService throws exception with autobinding value of "default"
> ---------------------------------------------------------------------
>
>                 Key: CLK-716
>                 URL: https://issues.apache.org/jira/browse/CLK-716
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.2.0
>         Environment: Java 1.6, Jetty 7, Mac OS X
>            Reporter: Ryan Holmes
>             Fix For: 2.3.0-M1
>
>
> The click-2.2.dtd specifies a default value of "default" for the autobinding attribute of the pages element:
>   <!-- Application pages. -->
>   <!ELEMENT pages (page*, excludes*)>
>     <!ATTLIST pages package CDATA #IMPLIED>
>     <!ATTLIST pages automapping (true|false) "true">
>     <!ATTLIST pages autobinding (default|annotation|none) "default">
> This causes the following exception when the DTD is specified in click.xml and no autobinding value is supplied (or a value of "default" is specified):
> java.lang.RuntimeException: Invalid pages autobinding attribute: default
> 	at org.apache.click.service.XmlConfigService.loadPages(XmlConfigService.java:994)
> 	at org.apache.click.service.XmlConfigService.onInit(XmlConfigService.java:240)
> 	at org.apache.click.ClickServlet.initConfigService(ClickServlet.java:1687)
> 	at org.apache.click.ClickServlet.init(ClickServlet.java:197)
> 	at org.apache.click.extras.spring.SpringClickServlet.init(SpringClickServlet.java:387)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> I marked this bug as major priority because an exception is thrown with a minimal click.xml file (at least when using the DTD), so the impact to out-of-the-box functionality is pretty severe.
> A quick look at the code reveals that XmlConfigService expects an autobinding value of "public" instead of "default". This conflicts with both the DTD and the documentation for click.xml. Since an autobinding value of "public" is not documented anywhere as far as I can tell and since XmlConfigService maps "public" to the AutoBinding.DEFAULT enum, the use of "public" is most likely a typo and should simply be replaced with "default".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.