You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Korbinian Bachl <ko...@whiskyworld.de> on 2016/05/15 09:39:30 UTC

wicket 6.x / java.text.ParseException on multiple div's

Hello,

I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now got a problem I dont know how to solve. A page throws following error:

java.text.ParseException: Same attribute found twice: div (line 163, column 52)
at org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
        at org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
....

so far I would expect this to happen on wrong/ malformed HTML - but my HTML is fine is indeed needed this way!

complained HTML:

<div id="slides">

      <div>
           content
        </div>       
        
        <div>
              content
        </div>
</div>

So what is going on here? Why does wicket complain about those poor div's? Is there any way I can disable this check for div's??? For me this behaviour seems as a bug as div following a div is perfectly fine HTML code?

Best,

Korbinian

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


Re: wicket 6.x / java.text.ParseException on multiple div's

Posted by Korbinian Bachl <ko...@whiskyworld.de>.
Hello Per,

yes, when I remove just 1 of the 2 div's it works instantly; I can tigger this by putting in:
<div>
<div>A</div>
<div>B</div>
</div>

and he complains....

Best,

Korbinian

----- Ursprüngliche Mail -----
> Von: "Per Newgro" <pe...@gmx.ch>
> An: users@wicket.apache.org
> Gesendet: Sonntag, 15. Mai 2016 11:54:30
> Betreff: Re: wicket 6.x / java.text.ParseException on multiple div's

> Did you try to remove the questionable markup to see what is happening?
> 
> Am 15.05.2016 um 11:39 schrieb Korbinian Bachl:
>> Hello,
>>
>> I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now got a
>> problem I dont know how to solve. A page throws following error:
>>
>> java.text.ParseException: Same attribute found twice: div (line 163, column 52)
>> at
>> org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
>>          at org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
>> ....
>>
>> so far I would expect this to happen on wrong/ malformed HTML - but my HTML is
>> fine is indeed needed this way!
>>
>> complained HTML:
>>
>> <div id="slides">
>>
>>        <div>
>>             content
>>          </div>
>>          
>>          <div>
>>                content
>>          </div>
>> </div>
>>
>> So what is going on here? Why does wicket complain about those poor div's? Is
>> there any way I can disable this check for div's??? For me this behaviour seems
>> as a bug as div following a div is perfectly fine HTML code?
>>
>> Best,
>>
>> Korbinian
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org

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


Re: wicket 6.x / java.text.ParseException on multiple div's

Posted by Per Newgro <pe...@gmx.ch>.
Did you try to remove the questionable markup to see what is happening?

Am 15.05.2016 um 11:39 schrieb Korbinian Bachl:
> Hello,
>
> I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now got a problem I dont know how to solve. A page throws following error:
>
> java.text.ParseException: Same attribute found twice: div (line 163, column 52)
> at org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
>          at org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
> ....
>
> so far I would expect this to happen on wrong/ malformed HTML - but my HTML is fine is indeed needed this way!
>
> complained HTML:
>
> <div id="slides">
>
>        <div>
>             content
>          </div>
>          
>          <div>
>                content
>          </div>
> </div>
>
> So what is going on here? Why does wicket complain about those poor div's? Is there any way I can disable this check for div's??? For me this behaviour seems as a bug as div following a div is perfectly fine HTML code?
>
> Best,
>
> Korbinian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


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


Re: wicket 6.x / java.text.ParseException on multiple div's

Posted by Korbinian Bachl <ko...@whiskyworld.de>.
Hello Martin,

I tried to look for this but I isn't that easy. He really complains about fine closed div's.... if I remove the mentioned div's it renders fine;

I can trigger the error when I just enter this into my page HTML:

<div>
<div>A</div>
<div>B</div>
</div>

and thats a perfectly fine HTML....

Best,
Korbinian 


----- Ursprüngliche Mail -----
> Von: "Martin Spielmann" <ma...@pingunaut.com>
> An: users@wicket.apache.org
> Gesendet: Sonntag, 15. Mai 2016 11:47:07
> Betreff: Re: wicket 6.x / java.text.ParseException on multiple div's

> Hello Korbinian,
> 
> the error message tells you about a duplicated attribute. Please check if there
> is a tag looking like this in your code:
> 
> <div ... div>
> 
> </div>
> 
> E.g. smth like this:
> <div class="a" div style="b">
> Happened some times to me...
> 
> Best regards,
> Martin
> 
> 
> 
> Am 15. Mai 2016 11:39:30 MESZ, schrieb Korbinian Bachl
> <ko...@whiskyworld.de>:
>>Hello,
>>
>>I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now
>>got a problem I dont know how to solve. A page throws following error:
>>
>>java.text.ParseException: Same attribute found twice: div (line 163,
>>column 52)
>>at
>>org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
>>        at
>>org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
>>....
>>
>>so far I would expect this to happen on wrong/ malformed HTML - but my
>>HTML is fine is indeed needed this way!
>>
>>complained HTML:
>>
>><div id="slides">
>>
>>      <div>
>>           content
>>        </div>
>>        
>>        <div>
>>              content
>>        </div>
>></div>
>>
>>So what is going on here? Why does wicket complain about those poor
>>div's? Is there any way I can disable this check for div's??? For me
>>this behaviour seems as a bug as div following a div is perfectly fine
>>HTML code?
>>
>>Best,
>>
>>Korbinian
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>For additional commands, e-mail: users-help@wicket.apache.org
> 
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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


Re: wicket 6.x / java.text.ParseException on multiple div's

Posted by Korbinian Bachl <ko...@whiskyworld.de>.
@Martin Spielmann, @Per Negro

thank you for your help. In fact I found out that there was a glitch in the HTML, however, not with the div's! - It seems as the parser has some problems when there is an error in the markup with quotations; In my case I had a innocent looking 

<img height="340"" width="978" src="xxx">

on the page hirarchy at the divs; (content a much lower level)

If you look at it you see 2 quotations at 340 and this seems to break the parser. He gives out the error, but the error is not where he reported it. Since my HTML got over 1000 lines i had quite a time to find this little bugger.

Anyway thanks for your help!

Best,

Korbinian

----- Ursprüngliche Mail -----
> Von: "Martin Spielmann" <ma...@pingunaut.com>
> An: users@wicket.apache.org
> Gesendet: Sonntag, 15. Mai 2016 11:47:07
> Betreff: Re: wicket 6.x / java.text.ParseException on multiple div's

> Hello Korbinian,
> 
> the error message tells you about a duplicated attribute. Please check if there
> is a tag looking like this in your code:
> 
> <div ... div>
> 
> </div>
> 
> E.g. smth like this:
> <div class="a" div style="b">
> Happened some times to me...
> 
> Best regards,
> Martin
> 
> 
> 
> Am 15. Mai 2016 11:39:30 MESZ, schrieb Korbinian Bachl
> <ko...@whiskyworld.de>:
>>Hello,
>>
>>I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now
>>got a problem I dont know how to solve. A page throws following error:
>>
>>java.text.ParseException: Same attribute found twice: div (line 163,
>>column 52)
>>at
>>org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
>>        at
>>org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
>>....
>>
>>so far I would expect this to happen on wrong/ malformed HTML - but my
>>HTML is fine is indeed needed this way!
>>
>>complained HTML:
>>
>><div id="slides">
>>
>>      <div>
>>           content
>>        </div>
>>        
>>        <div>
>>              content
>>        </div>
>></div>
>>
>>So what is going on here? Why does wicket complain about those poor
>>div's? Is there any way I can disable this check for div's??? For me
>>this behaviour seems as a bug as div following a div is perfectly fine
>>HTML code?
>>
>>Best,
>>
>>Korbinian
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>For additional commands, e-mail: users-help@wicket.apache.org
> 
> --
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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


Re: wicket 6.x / java.text.ParseException on multiple div's

Posted by Martin Spielmann <ma...@pingunaut.com>.
Hello Korbinian,

the error message tells you about a duplicated attribute. Please check if there is a tag looking like this in your code:

<div ... div>

</div>

E.g. smth like this:
<div class="a" div style="b">
Happened some times to me...

Best regards,
Martin



Am 15. Mai 2016 11:39:30 MESZ, schrieb Korbinian Bachl <ko...@whiskyworld.de>:
>Hello,
>
>I'm still on migrating a big wicket 1.4 app to wicket 6.23, and I now
>got a problem I dont know how to solve. A page throws following error:
>
>java.text.ParseException: Same attribute found twice: div (line 163,
>column 52)
>at
>org.apache.wicket.markup.parser.XmlPullParser.parseTagText(XmlPullParser.java:698)
>��������at
>org.apache.wicket.markup.parser.XmlPullParser.next(XmlPullParser.java:311)
>....
>
>so far I would expect this to happen on wrong/ malformed HTML - but my
>HTML is fine is indeed needed this way!
>
>complained HTML:
>
><div id="slides">
>
>�� � �<div>
>�� � � � � content
>�� � � �</div> � � � 
>�� � � �
>�� � � �<div>
>�� � � � � � �content
>�� � � �</div>
></div>
>
>So what is going on here? Why does wicket complain about those poor
>div's? Is there any way I can disable this check for div's??? For me
>this behaviour seems as a bug as div following a div is perfectly fine
>HTML code?
>
>Best,
>
>Korbinian
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>For additional commands, e-mail: users-help@wicket.apache.org

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.