You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Angelo Turetta <at...@bestunion.it> on 2005/08/18 21:37:57 UTC

Reality check on 1.4x (long)

I'm a would-be user, evaluating lenya for a site possibly going online 
later this fall. I know the Open Source way of doing things is "if 
something doesn't work for you, fix-it", but I frankly cannot get up to 
the knowledge required to debug the things I'm reporting in this 
message. I hope my contribution as a tester is of some value to the team.

I think this is a time where one of the developers should try a basic 
lenya-1.4.x setup (preferably on a clean machine, not their dev 
machine), and fix the handful show-stoppers that must really just be 
small mistakes/omissions in some past commit.

My tests are run on Windows XP SP2, java -version:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

I just 'svn update' both cocoon-2.1.x and lenya-1.4.x, and then 'build 
clean' followed by 'build'. The build for lenya fails with:
BUILD FAILED
D:\Java\apache\lenya-1.4.x\src\targets\webapp-build.xml:69: Unable to 
delete file 
D:\Java\apache\lenya-1.4.x\build\lenya\webapp\WEB-INF\cocoon.xconf.ant_patch

(already reported on this list) which can be avoided with the attached 
build.patch

Once built, here is the first problem: some jar need to be copied from 
cocoon-2.1.x/lib/endorsed into build/lenya/webapp/lib/endorsed (already 
reported on the list). This is a change brought in from the latest 
cocoon, should be coded in some of the src/targets/*.xml files.

Start lenya with lenya.bat. At the default page, I choose New 
Publication and named it 'test', using 'default' as a template. Log in 
as editor.

In the authoring page, click on 'Document type examples', and watch a 
wonderful 'Invalid byte 2 of 3-byte UTF-8 sequence' error. I've found 
the cause of the problem: every page that has non-ASCII chars in the 
meta information fails almost every operation.

Ok, back to the index. Go to site map. Note that 'Features' and 
'Document Type Examples' cannot be selected because of the previous 
problem. Select Home, it's available in 'en' and 'de' languages. Go to 
'de', select File/Remove Language Version, confirm and you'll be back on 
the english Overview, but the available languages has not changed.

Well, do Workflow/Submit on the home page for both english and german. 
Then login as a reviewer and try to publish the home page. Publish 
Complete Subtree (which should publish all the languages) will fail 
with: The source 
[lenya://lenya/pubs/test/content/authoring/index/index_de.xml] does not 
exist!    OK, publish only the english home page (the first time I got 
another error, but selecting another node then back to the home just worked)

Well, let's test adding a new document. File/New XHTML Document (english 
language, ID:test Navigation_title: Test, Sibling after). Good. You are 
now in Authoring, and you see the default page text. Select Edit/With 
Kupu. Change any text, choose save. Surprise! the default page comes 
back and you lose your changes. OK, quit and then select Edit/With BXE. 
This works better, Save&quit.  Workflow/Submit (if you followed me, you 
are still logged in as a reviewer), then Workflow/Publish.

Now select File/New Language Version (Navigation_Title: German Test). 
The english text is correctly copied to the new german page. Edit/With 
BXE (change anything), File/Save&Quit. Uh oh, why cannot I 'Submit' this 
page? Publish will enable by default the 'complete subtree' option, 
let's try it. Verify with 'LIVE': Ooops, "The requested document is not 
available for language: 'de'". Note that from now on, no further 
revision of the 'test' document can be published, in any language.

I think that's enough for tonight.

Please beware I value your work to the maximum extent, and I know 1.4 is 
the unstable- devel- version which is not guaranteed to work, but it's 
really not possible to evaluate 1.4 in this condition, and I think this 
is bad because it's not possible to get a good release unless a lot of 
people try to use it in the early stages.
In my opinion, it's hard to get a wide real-world test if the minimum 
basic set of functionality (repeated submit/publish, for example) is not 
working at least since Alpha1 (included).

Best regards,
Angelo Turetta


Re: cocoon.xconf.ant_patch: failonerror=false (was: Re: Reality check on 1.4x (long))

Posted by Thorsten Scherler <th...@apache.org>.
Should be tested whether it is windows. 

On linux that behaviour should not be changed IMO.

salu2

On Mon, 2005-08-22 at 10:35 +0200, Andreas Hartmann wrote:
> Hi Lenya devs,
> 
> any objections against applying this patch by Angelo Turetta?
> 
> -- Andreas
> 
> 
> > ------------------------------------------------------------------------
> > 
> > Index: src/targets/publets-build.xml
> > ===================================================================
> > --- src/targets/publets-build.xml	(revision 233325)
> > +++ src/targets/publets-build.xml	(working copy)
> > @@ -50,7 +50,7 @@
> >        <isfalse value="${cocoon.xconf.isEqual}"/>
> >      </condition>
> >      <antcall target="copy-cocoon.xconf"/>
> > -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> > +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
> >    </target>
> >  
> >    <target name="deploy-publets"
> > Index: src/targets/webapp-build.xml
> > ===================================================================
> > --- src/targets/webapp-build.xml	(revision 233325)
> > +++ src/targets/webapp-build.xml	(working copy)
> > @@ -66,7 +66,7 @@
> >         <isfalse value="${cocoon.xconf.isEqual}"/>
> >      </condition>
> >      <antcall target="copy-cocoon.xconf"/>
> > -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> > +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
> >  
> >      <!-- Patch web.xml -->
> >      <!--
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> > For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: cocoon.xconf.ant_patch: failonerror=false

Posted by Oliver Schalch <ol...@wyona.com>.
Andreas Hartmann said the following on 22.08.2005 10:35:
> Hi Lenya devs,
> 
> any objections against applying this patch by Angelo Turetta?

At least as a temporary patch its okey, but with that patch the problem,
 shouldnt get forgotten why that do not work with the delete tasks.

--
oli


Re: cocoon.xconf.ant_patch: failonerror=false

Posted by Felix Röthenbacher <fe...@wyona.com>.
The reason for using an intermediate file (cocoon.xconf.ant_patch)
for patching the cocoon.xconf was to prevent a reload of cocoon
for minor changes. A reload results in an InitializationException at
this time (I think because of the quartz block).

The file cocoon.xconf.ant_patch doesn't do any harm, so the
deletion step may be omitted if this helps.

- Felix



Doug Chestnut wrote:
> agreed that we need to find the cause, but for now this patch should 
> take care of the problem coming up on the mailing list so often.  On 
> windows I have just commented the lines out and haven't seen any problems.
> 
> --Doug
> 
> Andreas Hartmann wrote:
> 
>> Hi Lenya devs,
>>
>> any objections against applying this patch by Angelo Turetta?
>>
>> -- Andreas
>>
>>
>>> ------------------------------------------------------------------------
>>>
>>> Index: src/targets/publets-build.xml
>>> ===================================================================
>>> --- src/targets/publets-build.xml    (revision 233325)
>>> +++ src/targets/publets-build.xml    (working copy)
>>> @@ -50,7 +50,7 @@
>>>        <isfalse value="${cocoon.xconf.isEqual}"/>
>>>      </condition>
>>>      <antcall target="copy-cocoon.xconf"/>
>>> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
>>> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" 
>>> failonerror="false"/>
>>>    </target>
>>>  
>>>    <target name="deploy-publets"
>>> Index: src/targets/webapp-build.xml
>>> ===================================================================
>>> --- src/targets/webapp-build.xml    (revision 233325)
>>> +++ src/targets/webapp-build.xml    (working copy)
>>> @@ -66,7 +66,7 @@
>>>         <isfalse value="${cocoon.xconf.isEqual}"/>
>>>      </condition>
>>>      <antcall target="copy-cocoon.xconf"/>
>>> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
>>> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" 
>>> failonerror="false"/>
>>>  
>>>      <!-- Patch web.xml -->
>>>      <!--
>>>

-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: cocoon.xconf.ant_patch: failonerror=false

Posted by Doug Chestnut <dh...@virginia.edu>.
agreed that we need to find the cause, but for now this patch should 
take care of the problem coming up on the mailing list so often.  On 
windows I have just commented the lines out and haven't seen any problems.

--Doug

Andreas Hartmann wrote:
> Hi Lenya devs,
> 
> any objections against applying this patch by Angelo Turetta?
> 
> -- Andreas
> 
> 
>> ------------------------------------------------------------------------
>>
>> Index: src/targets/publets-build.xml
>> ===================================================================
>> --- src/targets/publets-build.xml    (revision 233325)
>> +++ src/targets/publets-build.xml    (working copy)
>> @@ -50,7 +50,7 @@
>>        <isfalse value="${cocoon.xconf.isEqual}"/>
>>      </condition>
>>      <antcall target="copy-cocoon.xconf"/>
>> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
>> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" 
>> failonerror="false"/>
>>    </target>
>>  
>>    <target name="deploy-publets"
>> Index: src/targets/webapp-build.xml
>> ===================================================================
>> --- src/targets/webapp-build.xml    (revision 233325)
>> +++ src/targets/webapp-build.xml    (working copy)
>> @@ -66,7 +66,7 @@
>>         <isfalse value="${cocoon.xconf.isEqual}"/>
>>      </condition>
>>      <antcall target="copy-cocoon.xconf"/>
>> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
>> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" 
>> failonerror="false"/>
>>  
>>      <!-- Patch web.xml -->
>>      <!--
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: cocoon.xconf.ant_patch: failonerror=false (was: Re: Reality check on 1.4x (long))

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Mon, 22 Aug 2005, Andreas Hartmann wrote:

> Hi Lenya devs,
>
> any objections against applying this patch by Angelo Turetta?
>
+1  but we shoud add a TODO here and declare it is a workaround.

Jann

> -- Andreas
>
>
> > ------------------------------------------------------------------------
> >
> > Index: src/targets/publets-build.xml
> > ===================================================================
> > --- src/targets/publets-build.xml	(revision 233325)
> > +++ src/targets/publets-build.xml	(working copy)
> > @@ -50,7 +50,7 @@
> >        <isfalse value="${cocoon.xconf.isEqual}"/>
> >      </condition>
> >      <antcall target="copy-cocoon.xconf"/>
> > -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> > +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
> >    </target>
> >
> >    <target name="deploy-publets"
> > Index: src/targets/webapp-build.xml
> > ===================================================================
> > --- src/targets/webapp-build.xml	(revision 233325)
> > +++ src/targets/webapp-build.xml	(working copy)
> > @@ -66,7 +66,7 @@
> >         <isfalse value="${cocoon.xconf.isEqual}"/>
> >      </condition>
> >      <antcall target="copy-cocoon.xconf"/>
> > -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> > +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
> >
> >      <!-- Patch web.xml -->
> >      <!--
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> > For additional commands, e-mail: dev-help@lenya.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>

---------------------------------------------------------------
Jann Forrer
Informatikdienste
Universität Zürich
Winterthurerstr. 190
CH-8057 Zuerich

oooO   mail:  jann.forrer@id.unizh.ch
(  )   phone: +41 44 63 56772
 \ (   fax:   +41 44 63 54505
  \_)  http://www.id.unizh.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


cocoon.xconf.ant_patch: failonerror=false (was: Re: Reality check on 1.4x (long))

Posted by Andreas Hartmann <an...@apache.org>.
Hi Lenya devs,

any objections against applying this patch by Angelo Turetta?

-- Andreas


> ------------------------------------------------------------------------
> 
> Index: src/targets/publets-build.xml
> ===================================================================
> --- src/targets/publets-build.xml	(revision 233325)
> +++ src/targets/publets-build.xml	(working copy)
> @@ -50,7 +50,7 @@
>        <isfalse value="${cocoon.xconf.isEqual}"/>
>      </condition>
>      <antcall target="copy-cocoon.xconf"/>
> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
>    </target>
>  
>    <target name="deploy-publets"
> Index: src/targets/webapp-build.xml
> ===================================================================
> --- src/targets/webapp-build.xml	(revision 233325)
> +++ src/targets/webapp-build.xml	(working copy)
> @@ -66,7 +66,7 @@
>         <isfalse value="${cocoon.xconf.isEqual}"/>
>      </condition>
>      <antcall target="copy-cocoon.xconf"/>
> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
>  
>      <!-- Patch web.xml -->
>      <!--
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Delete Language Version (was: Re: Reality check on 1.4x (long))

Posted by Andreas Hartmann <an...@apache.org>.
Angelo Turetta wrote:

> Go to 
> 'de', select File/Remove Language Version, confirm and you'll be back on 
> the english Overview, but the available languages has not changed.

This is fixed.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36297

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Publishing Problem (was: Re: Reality check on 1.4x (long))

Posted by Andreas Hartmann <an...@apache.org>.
Angelo Turetta wrote:

[...]

> Well, do Workflow/Submit on the home page for both english and german. 
> Then login as a reviewer and try to publish the home page. Publish 
> Complete Subtree (which should publish all the languages) will fail 
> with: The source 
> [lenya://lenya/pubs/test/content/authoring/index/index_de.xml] does not 
> exist!

That problem occurs because of the preceding error (language version
not properly removed). It caused an inconsistent state - the German
document was removed, but still referenced in the site structure.
Because the publishing process uses the site structure, the exception
was thrown (site document not backed with XML document).

-- Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Reality check on 1.4x (long)

Posted by Andreas Hartmann <an...@apache.org>.
Angelo Turetta wrote:
> I'm a would-be user, evaluating lenya for a site possibly going online 
> later this fall. I know the Open Source way of doing things is "if 
> something doesn't work for you, fix-it", but I frankly cannot get up to 
> the knowledge required to debug the things I'm reporting in this 
> message. I hope my contribution as a tester is of some value to the team.

Thanks for your report!

I guess some problems were caused by recent changes to the repository layer.
I'll try to track them down asap and send an answer.

-- Andreas

> 
> I think this is a time where one of the developers should try a basic 
> lenya-1.4.x setup (preferably on a clean machine, not their dev 
> machine), and fix the handful show-stoppers that must really just be 
> small mistakes/omissions in some past commit.
> 
> My tests are run on Windows XP SP2, java -version:
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
> Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
> 
> I just 'svn update' both cocoon-2.1.x and lenya-1.4.x, and then 'build 
> clean' followed by 'build'. The build for lenya fails with:
> BUILD FAILED
> D:\Java\apache\lenya-1.4.x\src\targets\webapp-build.xml:69: Unable to 
> delete file 
> D:\Java\apache\lenya-1.4.x\build\lenya\webapp\WEB-INF\cocoon.xconf.ant_patch 
> 
> 
> (already reported on this list) which can be avoided with the attached 
> build.patch
> 
> Once built, here is the first problem: some jar need to be copied from 
> cocoon-2.1.x/lib/endorsed into build/lenya/webapp/lib/endorsed (already 
> reported on the list). This is a change brought in from the latest 
> cocoon, should be coded in some of the src/targets/*.xml files.
> 
> Start lenya with lenya.bat. At the default page, I choose New 
> Publication and named it 'test', using 'default' as a template. Log in 
> as editor.
> 
> In the authoring page, click on 'Document type examples', and watch a 
> wonderful 'Invalid byte 2 of 3-byte UTF-8 sequence' error. I've found 
> the cause of the problem: every page that has non-ASCII chars in the 
> meta information fails almost every operation.
> 
> Ok, back to the index. Go to site map. Note that 'Features' and 
> 'Document Type Examples' cannot be selected because of the previous 
> problem. Select Home, it's available in 'en' and 'de' languages. Go to 
> 'de', select File/Remove Language Version, confirm and you'll be back on 
> the english Overview, but the available languages has not changed.
> 
> Well, do Workflow/Submit on the home page for both english and german. 
> Then login as a reviewer and try to publish the home page. Publish 
> Complete Subtree (which should publish all the languages) will fail 
> with: The source 
> [lenya://lenya/pubs/test/content/authoring/index/index_de.xml] does not 
> exist!    OK, publish only the english home page (the first time I got 
> another error, but selecting another node then back to the home just 
> worked)
> 
> Well, let's test adding a new document. File/New XHTML Document (english 
> language, ID:test Navigation_title: Test, Sibling after). Good. You are 
> now in Authoring, and you see the default page text. Select Edit/With 
> Kupu. Change any text, choose save. Surprise! the default page comes 
> back and you lose your changes. OK, quit and then select Edit/With BXE. 
> This works better, Save&quit.  Workflow/Submit (if you followed me, you 
> are still logged in as a reviewer), then Workflow/Publish.
> 
> Now select File/New Language Version (Navigation_Title: German Test). 
> The english text is correctly copied to the new german page. Edit/With 
> BXE (change anything), File/Save&Quit. Uh oh, why cannot I 'Submit' this 
> page? Publish will enable by default the 'complete subtree' option, 
> let's try it. Verify with 'LIVE': Ooops, "The requested document is not 
> available for language: 'de'". Note that from now on, no further 
> revision of the 'test' document can be published, in any language.
> 
> I think that's enough for tonight.
> 
> Please beware I value your work to the maximum extent, and I know 1.4 is 
> the unstable- devel- version which is not guaranteed to work, but it's 
> really not possible to evaluate 1.4 in this condition, and I think this 
> is bad because it's not possible to get a good release unless a lot of 
> people try to use it in the early stages.
> In my opinion, it's hard to get a wide real-world test if the minimum 
> basic set of functionality (repeated submit/publish, for example) is not 
> working at least since Alpha1 (included).
> 
> Best regards,
> Angelo Turetta
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/targets/publets-build.xml
> ===================================================================
> --- src/targets/publets-build.xml	(revision 233325)
> +++ src/targets/publets-build.xml	(working copy)
> @@ -50,7 +50,7 @@
>        <isfalse value="${cocoon.xconf.isEqual}"/>
>      </condition>
>      <antcall target="copy-cocoon.xconf"/>
> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
>    </target>
>  
>    <target name="deploy-publets"
> Index: src/targets/webapp-build.xml
> ===================================================================
> --- src/targets/webapp-build.xml	(revision 233325)
> +++ src/targets/webapp-build.xml	(working copy)
> @@ -66,7 +66,7 @@
>         <isfalse value="${cocoon.xconf.isEqual}"/>
>      </condition>
>      <antcall target="copy-cocoon.xconf"/>
> -    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch"/>
> +    <delete file="${build.webapp}/WEB-INF/cocoon.xconf.ant_patch" failonerror="false"/>
>  
>      <!-- Patch web.xml -->
>      <!--
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Invalid UTF-8 error for non-ASCII meta data

Posted by Andreas Hartmann <an...@apache.org>.
Josias Thoeny wrote:
> On Mon, 2005-08-22 at 11:44 +0200, Andreas Hartmann wrote:
> 
>>Angelo Turetta wrote:
>>
>>[...]
>>
>>
>>>In the authoring page, click on 'Document type examples', and watch a 
>>>wonderful 'Invalid byte 2 of 3-byte UTF-8 sequence' error. I've found 
>>>the cause of the problem: every page that has non-ASCII chars in the 
>>>meta information fails almost every operation.
>>
>>I can't reproduce this one ...
>>How about the others?
> 
> 
> I have seen this error.
> I tried to debug this some time ago, but I didn't find out much.
> 
> To reproduce it, go to the site area of the default publication. Select
> e.g. the "Document Type Examples" page, copy it, and insert it
> somewhere.

Thanks for your comments, I can reproduce it.

I filed a bug:

http://issues.apache.org/bugzilla/show_bug.cgi?id=36341

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: Invalid UTF-8 error for non-ASCII meta data (was: Re: Reality check on 1.4x (long))

Posted by Josias Thoeny <jo...@wyona.com>.
On Mon, 2005-08-22 at 11:44 +0200, Andreas Hartmann wrote:
> Angelo Turetta wrote:
> 
> [...]
> 
> > In the authoring page, click on 'Document type examples', and watch a 
> > wonderful 'Invalid byte 2 of 3-byte UTF-8 sequence' error. I've found 
> > the cause of the problem: every page that has non-ASCII chars in the 
> > meta information fails almost every operation.
> 
> I can't reproduce this one ...
> How about the others?

I have seen this error.
I tried to debug this some time ago, but I didn't find out much.

To reproduce it, go to the site area of the default publication. Select
e.g. the "Document Type Examples" page, copy it, and insert it
somewhere.

Here is the relevant part of the stacktrace that I'm getting:

java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence.
	at org.apache.lenya.cms.metadata.MetaDataImpl.loadValues(MetaDataImpl.java:169)
	at org.apache.lenya.cms.metadata.MetaDataImpl.<init>(MetaDataImpl.java:82)
	at org.apache.lenya.cms.metadata.LenyaMetaData.<init>(LenyaMetaData.java:74)
	at org.apache.lenya.cms.metadata.MetaDataManager.getLenyaMetaData(MetaDataManager.java:80)
	at org.apache.lenya.cms.metadata.MetaDataManager.replaceMetaData(MetaDataManager.java:151)
	at org.apache.lenya.cms.repository.RepositoryManagerImpl.copy(RepositoryManagerImpl.java:40)
	... 100 more
Caused by: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte UTF-8 sequence.
	at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
	at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.apache.lenya.xml.DocumentHelper.readDocument(DocumentHelper.java:173)
	at org.apache.lenya.cms.cocoon.source.SourceUtil.readDOM(SourceUtil.java:161)
	at org.apache.lenya.cms.metadata.MetaDataImpl.getDocument(MetaDataImpl.java:260)
	at org.apache.lenya.cms.metadata.MetaDataImpl.loadValues(MetaDataImpl.java:139)
	... 105 more

Here is another way to get the same problem:
- Create a document with an umlaut in the navigation title (the umlaut
will be written into the sitetree).
- Perform an operation which changes the sitetree (e.g. create another
document)

I get the following stacktrace:
<snip/>
Caused by: java.io.UTFDataFormatException: Invalid byte 2 of 3-byte
UTF-8 sequence.
	at org.apache.xerces.impl.io.UTF8Reader.invalidByte(Unknown Source)
	at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.scanContent(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
	at org.apache.lenya.xml.DocumentHelper.readDocument(DocumentHelper.java:173)
	at org.apache.lenya.cms.cocoon.source.SourceUtil.readDOM(SourceUtil.java:161)
	at org.apache.lenya.cms.site.tree.DefaultSiteTree.<init>(DefaultSiteTree.java:83)
	... 51 more


It seems the problem occurs when lenya reads a non-ascii char from a
file and saves it again, using DocumentHelper/SourceUtil. If the special
char comes from a web-form, it seems to be saved correctly.

Can anyone else reproduce this?

I wonder if it might have something to do with the following code in
SourceUtil.java, around line 195:

    ....
    OutputStream oStream = source.getOutputStream();
    Writer writer = new OutputStreamWriter(oStream);
    DocumentHelper.writeDocument(document, writer);
    ....

The OutputStreamWriter assumes a default encoding, and does not respect
the encoding of the source. But that's just a guess, actually I'm not
sure whether it's a reading or a writing problem.

Or is something wrong with my setup?

Josias



> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Invalid UTF-8 error for non-ASCII meta data (was: Re: Reality check on 1.4x (long))

Posted by Andreas Hartmann <an...@apache.org>.
Angelo Turetta wrote:

[...]

> In the authoring page, click on 'Document type examples', and watch a 
> wonderful 'Invalid byte 2 of 3-byte UTF-8 sequence' error. I've found 
> the cause of the problem: every page that has non-ASCII chars in the 
> meta information fails almost every operation.

I can't reproduce this one ...
How about the others?

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org