You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by JD <la...@gmail.com> on 2007/03/13 13:27:16 UTC
XHTML Serialization error
Hello,
this is my first post to the list. I have this error:
Caused by: org.apache.cocoon.components.serializers.encoding.CharsetFactory$CharsetFactoryException:
Unable to access JAR "jar:file:/C:/Program Files/jboss- 4.0.3
/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/lib/cocoon-
serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class
"
Is there a solution to this?
JD
Re: XHTML Serialization error
Posted by Jason Johnston <co...@lojjic.net>.
I've got it running successfully in Tomcat 5.5, JDK 1.5. Cocoon 2.1.8
though so it's not exactly comparable.
Andrew Madu wrote:
> No, no joy here either. Would it be possible for anyone else who is
> using xhtml serialization to say whether they are experiencing this
> issue and what application server/container they are using? Two of us
> are using Jboss AS and experiencing this problem, so maybe it's a Jboss
> 4.0.3 issue?!
>
> Many thanks in advance.
>
> --
> Regards
>
> Andrew
>
> On 13/03/07, *JD* <lancasteruni01@gmail.com
> <ma...@gmail.com>> wrote:
>
> Hello Jason,
> thanks for the quick reply. Unfortunately it did not work. There is
> another xhtml serialiser I have been using but this does not format
> the document as a true xhtml document. Maybe I should stick with
> that instead?
>
> JD
>
>
> On 13/03/07, *Jason Johnston* < cocoon@lojjic.net
> <ma...@lojjic.net>> wrote:
>
> Just a wild-guess thing to try:
>
> Replace the 2 jars
> cocoon-serializers-block.jar and
> cocoon-serializers-charsets-0.2.jar
>
> with the single jar from the Cocoon 2.2 snapshot:
>
> http://people.apache.org/maven-snapshot-repository/org/apache/cocoon/cocoon-serializers-impl/1.0.0-SNAPSHOT/cocoon-serializers-impl-1.0.0-20060729.043836-4.jar
>
> The latter has all the classes in a single jar, compiled
> together at the
> same time. AFAIK it should be compatible with 2.1.
>
> --Jason
>
>
>
> Andrew Madu wrote:
> > Hi JD,
> > wish I could help. I have exactly the same problem and have
> not yet
> > found a solution for it.
> >
> > One of the more knowledgeable Java chaps may be able to
> resolve this for
> > you.
> >
> > --
> > Regards
> >
> > Andrew
> >
> > On 13/03/07, *JD* < lancasteruni01@gmail.com
> <ma...@gmail.com>
> > <mailto:lancasteruni01@gmail.com
> <ma...@gmail.com>>> wrote:
> >
> > Hello,
> > this is my first post to the list. I have this error:
> >
> > Caused by: org.apache.cocoon.components
> >
> .serializers.encoding.CharsetFactory$CharsetFactoryException: Unable
> > to access JAR "jar:file:/C:/Program Files/jboss-
> > 4.0.3
> /server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/lib/cocoon-serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class"
> >
> > Is there a solution to this?
> >
> > JD
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> <ma...@cocoon.apache.org>
> For additional commands, e-mail: users-help@cocoon.apache.org
> <ma...@cocoon.apache.org>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
No, no joy here either. Would it be possible for anyone else who is using
xhtml serialization to say whether they are experiencing this issue and what
application server/container they are using? Two of us are using Jboss AS
and experiencing this problem, so maybe it's a Jboss 4.0.3 issue?!
Many thanks in advance.
--
Regards
Andrew
On 13/03/07, JD <la...@gmail.com> wrote:
>
> Hello Jason,
> thanks for the quick reply. Unfortunately it did not work. There is
> another xhtml serialiser I have been using but this does not format the
> document as a true xhtml document. Maybe I should stick with that instead?
>
> JD
>
> On 13/03/07, Jason Johnston <co...@lojjic.net> wrote:
> >
> > Just a wild-guess thing to try:
> >
> > Replace the 2 jars
> > cocoon-serializers-block.jar and
> > cocoon-serializers-charsets-0.2.jar
> >
> > with the single jar from the Cocoon 2.2 snapshot:
> >
> >
> > http://people.apache.org/maven-snapshot-repository/org/apache/cocoon/cocoon-serializers-impl/1.0.0-SNAPSHOT/cocoon-serializers-impl-1.0.0-20060729.043836-4.jar
> >
> > The latter has all the classes in a single jar, compiled together at the
> >
> > same time. AFAIK it should be compatible with 2.1.
> >
> > --Jason
> >
> >
> >
> > Andrew Madu wrote:
> > > Hi JD,
> > > wish I could help. I have exactly the same problem and have not yet
> > > found a solution for it.
> > >
> > > One of the more knowledgeable Java chaps may be able to resolve this
> > for
> > > you.
> > >
> > > --
> > > Regards
> > >
> > > Andrew
> > >
> > > On 13/03/07, *JD* < lancasteruni01@gmail.com
> > > <ma...@gmail.com>> wrote:
> > >
> > > Hello,
> > > this is my first post to the list. I have this error:
> > >
> > > Caused by: org.apache.cocoon.components
> > > .serializers.encoding.CharsetFactory$CharsetFactoryException:
> > Unable
> > > to access JAR "jar:file:/C:/Program Files/jboss-
> > > 4.0.3 /server/default/deploy/jbossweb-tomcat55.sar
> > /ROOT.war/WEB-INF/lib/cocoon-
> > serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class
> > "
> > >
> > > Is there a solution to this?
> > >
> > > JD
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
>
Re: XHTML Serialization error
Posted by JD <la...@gmail.com>.
Hello Jason,
thanks for the quick reply. Unfortunately it did not work. There is another
xhtml serialiser I have been using but this does not format the document as
a true xhtml document. Maybe I should stick with that instead?
JD
On 13/03/07, Jason Johnston <co...@lojjic.net> wrote:
>
> Just a wild-guess thing to try:
>
> Replace the 2 jars
> cocoon-serializers-block.jar and
> cocoon-serializers-charsets-0.2.jar
>
> with the single jar from the Cocoon 2.2 snapshot:
>
>
> http://people.apache.org/maven-snapshot-repository/org/apache/cocoon/cocoon-serializers-impl/1.0.0-SNAPSHOT/cocoon-serializers-impl-1.0.0-20060729.043836-4.jar
>
> The latter has all the classes in a single jar, compiled together at the
> same time. AFAIK it should be compatible with 2.1.
>
> --Jason
>
>
>
> Andrew Madu wrote:
> > Hi JD,
> > wish I could help. I have exactly the same problem and have not yet
> > found a solution for it.
> >
> > One of the more knowledgeable Java chaps may be able to resolve this for
> > you.
> >
> > --
> > Regards
> >
> > Andrew
> >
> > On 13/03/07, *JD* <lancasteruni01@gmail.com
> > <ma...@gmail.com>> wrote:
> >
> > Hello,
> > this is my first post to the list. I have this error:
> >
> > Caused by: org.apache.cocoon.components
> > .serializers.encoding.CharsetFactory$CharsetFactoryException: Unable
> > to access JAR "jar:file:/C:/Program Files/jboss-
> > 4.0.3/server/default/deploy/jbossweb-tomcat55.sar
> /ROOT.war/WEB-INF/lib/cocoon-
> serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class
> "
> >
> > Is there a solution to this?
> >
> > JD
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
Re: XHTML Serialization error
Posted by Jason Johnston <co...@lojjic.net>.
Just a wild-guess thing to try:
Replace the 2 jars
cocoon-serializers-block.jar and
cocoon-serializers-charsets-0.2.jar
with the single jar from the Cocoon 2.2 snapshot:
http://people.apache.org/maven-snapshot-repository/org/apache/cocoon/cocoon-serializers-impl/1.0.0-SNAPSHOT/cocoon-serializers-impl-1.0.0-20060729.043836-4.jar
The latter has all the classes in a single jar, compiled together at the
same time. AFAIK it should be compatible with 2.1.
--Jason
Andrew Madu wrote:
> Hi JD,
> wish I could help. I have exactly the same problem and have not yet
> found a solution for it.
>
> One of the more knowledgeable Java chaps may be able to resolve this for
> you.
>
> --
> Regards
>
> Andrew
>
> On 13/03/07, *JD* <lancasteruni01@gmail.com
> <ma...@gmail.com>> wrote:
>
> Hello,
> this is my first post to the list. I have this error:
>
> Caused by: org.apache.cocoon.components
> .serializers.encoding.CharsetFactory$CharsetFactoryException: Unable
> to access JAR "jar:file:/C:/Program Files/jboss-
> 4.0.3/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/lib/cocoon-serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class"
>
> Is there a solution to this?
>
> JD
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
Hi JD,
wish I could help. I have exactly the same problem and have not yet found a
solution for it.
One of the more knowledgeable Java chaps may be able to resolve this for
you.
--
Regards
Andrew
On 13/03/07, JD <la...@gmail.com> wrote:
>
> Hello,
> this is my first post to the list. I have this error:
>
> Caused by: org.apache.cocoon.components.serializers.encoding.CharsetFactory$CharsetFactoryException:
> Unable to access JAR "jar:file:/C:/Program Files/jboss- 4.0.3
> /server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/lib/cocoon-
> serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class
> "
>
> Is there a solution to this?
>
> JD
>
>
Re: XHTML Serialization error
Posted by JD <la...@gmail.com>.
Hello Andrew,
'WARNING:_editor_url is not set! You should set this variable to the editor
> files path; it should preferably be an absolute path, like in '/htmlarea',
> but it can be relative if you prefer. Further we will try to load the editor
> files correctly but we'll probably fail.'
>
Yes, I have this. Should this be reported as a bug with the xhtml
serializer?
JD
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
Hi,
I will bring the whole Jboss application one level (directory) up and see if
> that helps!!
>
Well well well, that was it!! It initially didn't work with the all in one
serialization jar as that doesn't have all the required charset classes. So
stick with the two serializer.jar format.
Saying all of that though, I am now getting a very strange alert when
loading my login page which says:
'WARNING:_editor_url is not set! You should set this variable to the editor
files path; it should preferably be an absolute path, like in '/htmlarea',
but it can be relative if you prefer. Further we will try to load the editor
files correctly but we'll probably fail.'
It would seem that this error is tied in with this snippet of javascript in
the browser output:
<script type="text/javascript">
_editor_url = "resources/forms/htmlarea/";
_editor_lang = "en";
</script>
If you are using FireFox, in my case 1.5.0, and have debugging on you will
see 4 generated javascript errors, which are:
dojo.require("cocoon.forms.*");
forms_calendar.setCssPrefix("forms_");
_editor_url = "resources/forms/htmlarea/";
cocoon.forms has no properties
Looks like the xhtml serialization process is breaking dojo as the page
completely reloads if you submit the empty form (all the fields are
required). Feel free to take a look by going to www.beyarecords.com.
So far so good. Thank you so much for your all of your help and patience on
this issue. Much appreciated.
--
Regards
Andrew
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
Hi,
> I am in the process of migrating to Jboss AS 4.0.5 to ascertain whether
> there is an issue with 'loading' in 4.0.3. I will report back with my
> findings.
>
no change here! Migrating to 4.0.5 did not alter the situation. So I think
Bertrand has a very valid point about "Program Files" being the possible
cause of contention here. I will bring the whole Jboss application one level
(directory) up and see if that helps!!
--
Regards
Andrew
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
Hi Jörg,
One issue you might have both with JBoss 4.0.3 is either a strange class
> loader
I am in the process of migrating to Jboss AS 4.0.5 to ascertain whether
there is an issue with 'loading' in 4.0.3. I will report back with my
findings.
or the fact that you both have spaces in your path ("Program
> Files"). I assume .sar and .war or only directories, not zipped files,
> aren't they?
>
Yes this is correct. They are both 'file folders' and not zipped files as
you rightly mention.
--
Regards
Andrew
Re: XHTML Serialization error
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 3/14/07, Joerg Heinicke <jo...@gmx.de> wrote:
> ...What's the status on this? I got the feeling that such spaces are no
> longer a problem in the Java world (but avoided them though)...
Same here, I'm working in multi-platform environments all the time,
and "unsafe" filenames are bound to cause problems at some point
(like, once you have forgotten that you have them) even though
officially they should be ok.
It's even worse in countries like mine where people tend to put
accented characters in filenames.
Last time I remember actually seeing such a problem was with the JEdit
editor (or one of its plugins), so I'm sure it's not only Cocoon
that's at fault.
-Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XHTML Serialization error
Posted by Joerg Heinicke <jo...@gmx.de>.
On 14.03.2007 07:50, Bertrand Delacretaz wrote:
>> One issue you might have both with JBoss 4.0.3 is either a strange class
>> loader or the fact that you both have spaces in your path ("Program
>> Files")....
>
> I'd be ready to bet a beverage of your choice on the latter...whoever
> invented the "Program Files" folder name should have their computer
> driving licence revoked immediately ;-)
LOL.
What's the status on this? I got the feeling that such spaces are no
longer a problem in the Java world (but avoided them though). But from a
look into the code with the exception messages provided it should be
"new ZipFile(file)" (with file being the full path of the jar) failing
with an IOException, so I'm quite sure it's the space. Now I wonder why
it didn't happen to me lately. Is the Cocoon resource handling so special?
It might be better to rewrite the code in CharSetFactory anyway, it's
quite awkward. First an instance variable is initialized on loading the
class. Then on newInstance() this instance is returned after a
known-to-be-not-working double check locking and null check while it
never can be null.
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XHTML Serialization error
Posted by Andrew Madu <an...@gmail.com>.
Hi Bertrand,
>
> I'd be ready to bet a beverage of your choice on the latter...whoever
> invented the "Program Files" folder name should have their computer
> driving licence revoked immediately ;-)
hehehehe...very good ;-)
But now you mention it, it would not surprise me in the least if "Program
Files" is the source of all the problems here!!
--
Regards
Andrew
Re: XHTML Serialization error
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 3/13/07, Joerg Heinicke <jo...@gmx.de> wrote:
> One issue you might have both with JBoss 4.0.3 is either a strange class
> loader or the fact that you both have spaces in your path ("Program
> Files")....
I'd be ready to bet a beverage of your choice on the latter...whoever
invented the "Program Files" folder name should have their computer
driving licence revoked immediately ;-)
-Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XHTML Serialization error
Posted by Joerg Heinicke <jo...@gmx.de>.
On 13.03.2007 13:27, JD wrote:
> Hello,
> this is my first post to the list. I have this error:
>
> Caused by:
> org.apache.cocoon.components.serializers.encoding.CharsetFactory$CharsetFactoryException:
>
> Unable to access JAR "jar:file:/C:/Program Files/jboss- 4.0.3
> /server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/WEB-INF/lib/cocoon-
> serializers-charsets-0.2.jar!/org/apache/cocoon/components/serializers/encoding/cs_US_ASCII.class
>
> Is there a solution to this?
I wrote a test case as simple as that:
package org.apache.cocoon.components.serializers.encoding;
import junit.framework.TestCase;
public class CharsetFactoryTestCase extends TestCase {
public void testInitialization() throws Exception {
CharsetFactory.newInstance().getCharset("UTF-8");
}
}
and it works for me. From Andrew's stacktrace I know it's just the
loading of the class that fails, so which method is accessed has no
influence.
One issue you might have both with JBoss 4.0.3 is either a strange class
loader or the fact that you both have spaces in your path ("Program
Files"). I assume .sar and .war or only directories, not zipped files,
aren't they?
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org