You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by nicolas muller <n....@nouvellemarque.com> on 2007/02/01 09:01:17 UTC

Re: roller 3.1, user registration page exception

Do you have the good syntax for hibernate ? Which database are you using ?

Jeffrey Blattman a écrit :
> fresh roller 3.1 install. when i access the user registration page, i
> get an empty page and an exception in the logs ...
>
> javax.servlet.jsp.JspException: ServletException in
> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
> bean userFormEx on action /roller-ui/user
>        at
> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
>
>
> any ideas?
>
> thanks
>

Re: roller 3.1, user registration page exception

Posted by Jeffrey Blattman <Je...@Sun.COM>.
i removed the formset element completely making the XML valid, but i 
still see the problem (but not the exception about formset). so it looks 
like that specifically wasn't the problem ...

Jeffrey Blattman wrote:
> java se 5.
> tomcat 5.5.x.
>
> note, i've been using this setup for some time ...
>
> the DTD called out in validation.xml clearly shows that the content is 
> invalid (the empty formset tag is not allowed) ...
>
> <!ELEMENT formset (constant*, form+)>
>
> Dave wrote:
>> On 2/1/07, Jeffrey Blattman <Je...@sun.com> wrote:
>>> i also see this in the logs which i missed initially ...
>>>
>>> ERROR 2007-02-01 11:12:35,420 Digester:error - Parse Error at line 17
>>> column 13: The content of element type "formset" is incomplete, it must
>>> match "(constant*,form+)".
>>> org.xml.sax.SAXParseException: The content of element type "formset" is
>>> incomplete, it must match "(constant*,form+)".
>>>
>>> looking in the webapp, there is a file, validation.xml that contains a
>>> "formset" element ...
>>>
>>>   <formset>
>>>   <!--
>>>     Define form validation config in validation-forms.xml
>>>   -->
>>>
>>>   </formset>
>>>
>>> indeed, it doesn't match the schema. do i need to fill something in 
>>> there?
>>
>> I haven't seen a problem like that before so I wonder:
>> Which app server?
>> Which version of Java?
>>
>> - Dave

Re: roller 3.1, user registration page exception

Posted by Jeffrey Blattman <Je...@Sun.COM>.
java se 5.
tomcat 5.5.x.

note, i've been using this setup for some time ...

the DTD called out in validation.xml clearly shows that the content is 
invalid (the empty formset tag is not allowed) ...

<!ELEMENT formset (constant*, form+)>

Dave wrote:
> On 2/1/07, Jeffrey Blattman <Je...@sun.com> wrote:
>> i also see this in the logs which i missed initially ...
>>
>> ERROR 2007-02-01 11:12:35,420 Digester:error - Parse Error at line 17
>> column 13: The content of element type "formset" is incomplete, it must
>> match "(constant*,form+)".
>> org.xml.sax.SAXParseException: The content of element type "formset" is
>> incomplete, it must match "(constant*,form+)".
>>
>> looking in the webapp, there is a file, validation.xml that contains a
>> "formset" element ...
>>
>>   <formset>
>>   <!--
>>     Define form validation config in validation-forms.xml
>>   -->
>>
>>   </formset>
>>
>> indeed, it doesn't match the schema. do i need to fill something in 
>> there?
>
> I haven't seen a problem like that before so I wonder:
> Which app server?
> Which version of Java?
>
> - Dave

Re: roller 3.1, user registration page exception

Posted by Dave <sn...@gmail.com>.
On 2/1/07, Jeffrey Blattman <Je...@sun.com> wrote:
> i also see this in the logs which i missed initially ...
>
> ERROR 2007-02-01 11:12:35,420 Digester:error - Parse Error at line 17
> column 13: The content of element type "formset" is incomplete, it must
> match "(constant*,form+)".
> org.xml.sax.SAXParseException: The content of element type "formset" is
> incomplete, it must match "(constant*,form+)".
>
> looking in the webapp, there is a file, validation.xml that contains a
> "formset" element ...
>
>   <formset>
>   <!--
>     Define form validation config in validation-forms.xml
>   -->
>
>   </formset>
>
> indeed, it doesn't match the schema. do i need to fill something in there?

I haven't seen a problem like that before so I wonder:
Which app server?
Which version of Java?

- Dave

Re: roller 3.1, user registration page exception

Posted by Jeffrey Blattman <Je...@Sun.COM>.
hi dave,

i am using MySQL 5, and i did NOT have the dialect set properly. 
however, i changed it, re-initialized the DB, and still have the same 
problem (i've never set that property before, so unless that changed 
recently ...)

nicolas,

i am using a datasource, not direct DB access, so i don't have those 
settings. i just have "connection.datasource".

i also see this in the logs which i missed initially ...

ERROR 2007-02-01 11:12:35,420 Digester:error - Parse Error at line 17 
column 13: The content of element type "formset" is incomplete, it must 
match "(constant*,form+)".
org.xml.sax.SAXParseException: The content of element type "formset" is 
incomplete, it must match "(constant*,form+)".

looking in the webapp, there is a file, validation.xml that contains a 
"formset" element ...


  <formset>
  <!--
    Define form validation config in validation-forms.xml
  -->

  </formset>

indeed, it doesn't match the schema. do i need to fill something in there?

thanks.

nicolas muller wrote:
> There is a config file into WEB-INF/classes : hibernate.cfg.xml
>
> In which you can find :
>
>         <property
> name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
>         <property
> name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:3219</property>
>         <property name="hibernate.connection.username">sa</property>
>         <property name="hibernate.connection.password"></property>
>         <property
> name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
>
>         <!--
>         Examples for configuring Hibernate to use the JDBC Driver Manager
>        
>         <property
> name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
>         <property name="hibernate.connection.url">
>                        
> jdbc:mysql://localhost/roller?user=roller&amp;password=tiger</property>
>         <property name="hibernate.connection.username">roller</property>
>         <property name="hibernate.connection.password">tiger</property>
>         <property
> name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
>        -->
>
> By default, the HSQL language is used and you are using Mysql. You must
> just uncomment mysql block and comment Hsql block.
> Restart and enjoy !
>
>   Best regards,
>
> Jeffrey Blattman a écrit :
>   
>> sorry, good syntax for hibernate? i'm using mysql.
>>
>> this a completely new install. new database, no migration from
>> previously install.
>>
>> thanks!
>>
>> nicolas muller wrote:
>>     
>>> Do you have the good syntax for hibernate ? Which database are you
>>> using ?
>>>
>>> Jeffrey Blattman a écrit :
>>>  
>>>       
>>>> fresh roller 3.1 install. when i access the user registration page, i
>>>> get an empty page and an exception in the logs ...
>>>>
>>>> javax.servlet.jsp.JspException: ServletException in
>>>> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
>>>> bean userFormEx on action /roller-ui/user
>>>>        at
>>>> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
>>>>
>>>>
>>>>
>>>> any ideas?
>>>>
>>>> thanks
>>>>
>>>>     
>>>>         

Re: roller 3.1, user registration page exception

Posted by nicolas muller <n....@nouvellemarque.com>.
There is a config file into WEB-INF/classes : hibernate.cfg.xml

In which you can find :

        <property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
        <property
name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:3219</property>
        <property name="hibernate.connection.username">sa</property>
        <property name="hibernate.connection.password"></property>
        <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>

        <!--
        Examples for configuring Hibernate to use the JDBC Driver Manager
       
        <property
name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
        <property name="hibernate.connection.url">
                       
jdbc:mysql://localhost/roller?user=roller&amp;password=tiger</property>
        <property name="hibernate.connection.username">roller</property>
        <property name="hibernate.connection.password">tiger</property>
        <property
name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
       -->

By default, the HSQL language is used and you are using Mysql. You must
just uncomment mysql block and comment Hsql block.
Restart and enjoy !

  Best regards,

Jeffrey Blattman a écrit :
> sorry, good syntax for hibernate? i'm using mysql.
>
> this a completely new install. new database, no migration from
> previously install.
>
> thanks!
>
> nicolas muller wrote:
>> Do you have the good syntax for hibernate ? Which database are you
>> using ?
>>
>> Jeffrey Blattman a écrit :
>>  
>>> fresh roller 3.1 install. when i access the user registration page, i
>>> get an empty page and an exception in the logs ...
>>>
>>> javax.servlet.jsp.JspException: ServletException in
>>> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
>>> bean userFormEx on action /roller-ui/user
>>>        at
>>> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
>>>
>>>
>>>
>>> any ideas?
>>>
>>> thanks
>>>
>>>     
>

Re: roller 3.1, user registration page exception

Posted by Jeffrey Blattman <Je...@Sun.COM>.
hi,

this actually was the problem, but i needed to update the dialect 
setting in roller's properties ...

/hibernate.dialect=org.hibernate.dialect.DerbyDialect/

i am not sure which one of the setting is used where and when.

thanks!

Dave wrote:
> On 2/1/07, Jeffrey Blattman <Je...@sun.com> wrote:
>> sorry, good syntax for hibernate? i'm using mysql.
>> this a completely new install. new database, no migration from
>> previously install.
>
> Hi Jeffrey,
>
> I'm not sure if this is the problem or not, but if you are using
> MySQL5 you do need to set the correct Hibernate dialect. You can do
> that in WEB-INF/classes/hibernate.cfg.xml:
>
> Change this:
> <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
>
> To this:
> <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
>
> - Dave
>
>
>
>>
>> thanks!
>>
>> nicolas muller wrote:
>> > Do you have the good syntax for hibernate ? Which database are you 
>> using ?
>> >
>> > Jeffrey Blattman a écrit :
>> >
>> >> fresh roller 3.1 install. when i access the user registration page, i
>> >> get an empty page and an exception in the logs ...
>> >>
>> >> javax.servlet.jsp.JspException: ServletException in
>> >> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
>> >> bean userFormEx on action /roller-ui/user
>> >>        at
>> >> 
>> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921) 
>>
>> >>
>> >>
>> >> any ideas?
>> >>
>> >> thanks
>> >>
>> >>
>>

Re: roller 3.1, user registration page exception

Posted by Dave <sn...@gmail.com>.
On 2/1/07, Jeffrey Blattman <Je...@sun.com> wrote:
> sorry, good syntax for hibernate? i'm using mysql.
> this a completely new install. new database, no migration from
> previously install.

Hi Jeffrey,

I'm not sure if this is the problem or not, but if you are using
MySQL5 you do need to set the correct Hibernate dialect. You can do
that in WEB-INF/classes/hibernate.cfg.xml:

Change this:
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

To this:
<property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>

- Dave



>
> thanks!
>
> nicolas muller wrote:
> > Do you have the good syntax for hibernate ? Which database are you using ?
> >
> > Jeffrey Blattman a écrit :
> >
> >> fresh roller 3.1 install. when i access the user registration page, i
> >> get an empty page and an exception in the logs ...
> >>
> >> javax.servlet.jsp.JspException: ServletException in
> >> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
> >> bean userFormEx on action /roller-ui/user
> >>        at
> >> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
> >>
> >>
> >> any ideas?
> >>
> >> thanks
> >>
> >>
>

Re: roller 3.1, user registration page exception

Posted by Jeffrey Blattman <Je...@Sun.COM>.
sorry, good syntax for hibernate? i'm using mysql.

this a completely new install. new database, no migration from 
previously install.

thanks!

nicolas muller wrote:
> Do you have the good syntax for hibernate ? Which database are you using ?
>
> Jeffrey Blattman a écrit :
>   
>> fresh roller 3.1 install. when i access the user registration page, i
>> get an empty page and an exception in the logs ...
>>
>> javax.servlet.jsp.JspException: ServletException in
>> '/WEB-INF/jsps/core/UserNew.jsp': Cannot retrieve definition for form
>> bean userFormEx on action /roller-ui/user
>>        at
>> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
>>
>>
>> any ideas?
>>
>> thanks
>>
>>