Re: Fwd: Updating to latest JARs, runtime problem
Sasvata Chatterjee <[email protected]> Sat, 17 Dec 2005 11:07:07 -0600
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0362361643==
Content-Type: multipart/alternative;
boundary="----=_Part_18160_11832814.1134839227209"
------=_Part_18160_11832814.1134839227209
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have been fighting this all morning. Definitely running into the
"Premature end of file" problem. Premature anything, when it comes to SAX,
is not funny!! Ahem!
I think with the latest set of dependency JARs, and maybe ordering of JARs,
somehow the SAX parser is being set to validate with a schema, and since we
dont define a schema, it's bombing out. I tried setting the
DocumentBuilderFactory to setValidating(true), which supposedly verifies th=
e
doc structure, but not against a schema, and that works (for
KeelContainerFactory.verifyConfiguration(...)).
However, later in KeelContainerFactory.buildConfigs(...), when we use
DefaultConfigurationBuilder from Avalon Framework impl., it uses a SAX
parser which again results in the schema check and failure. I tried doing
this:
SAXParserFactory spf =3D SAXParserFactory.newInstance();
spf.setValidating(true);
XMLReader parser =3D null;
try {
parser =3D spf.newSAXParser().getXMLReader();
parser.setFeature("
http://apache.org/xml/features/validation/schema", false);
} catch (ParserConfigurationException e) {
throw new ConfigurationException("Unable to load XML parser - "
+ e.getMessage());
}
DefaultConfigurationBuilder builder =3D new
DefaultConfigurationBuilder(parser);
builder.build(...);
But that does not work: Got:
org.xml.sax.SAXParseException: Document root element "logkit", must match
DOCTYPE root "null".
(this is for logkit.xconf, similar error for roles.xconf, system.xconf,
whichever happens to be parsed first).
BTW, I have tried eliminating Xerces, and just use JDK-1.5's built in SAX
parser, and that shows the same problem as well.
Shash
On 12/16/05, Gene McCullough <[email protected]> wrote:
>
> I've been hard pressed to sit down and work on this since my last
> post, but will tonight and more this weekend. If you have anything,
> that would be great.
>
> Thanks,
> gene
>
> On 12/16/05, Sasvata Chatterjee <[email protected]> wrote:
> > Gene,
> >
> > As of about two weeks or so ago, I had a version with the latest
> > dependencies that was working. I'll try the default deployment tomorro=
w
> > sometime and post what I find, unless you find a solution by then
> anyway.
> >
> > Shash
> >
> >
> > On 12/15/05, Gene McCullough <[email protected]> wrote:
> > > No joy. Changed role-list to roles, and also tried creating a parent
> > > roles element. Same error.
> > > I'll try some debugging.
> > >
> > > btw, windows xp, tomcat 5.5.12, sun jdk1.5.0_06
> > > got same message on redhat es ws3, tomcat 5.5.10, sun jdk1.5.0
> > > thanks,
> > > gene
> > >
> > > On 12/15/05, Michael Nash <[email protected]> wrote:
> > > > Gene:
> > > >
> > > > I'm not 100% sure, but doesn't the roles file need to start with
> > > > <roles>
> > > >
> > > > </roles>
> > > >
> > > > ...
> > > >
> > > > Mike
> > > >
> > > > On Thu, 2005-12-15 at 11:05, mcpadawan wrote:
> > > > > Built the default project, same outcome. However, on closer
> > inspection of logs:
> > > > > -----------------------------------------
> > > > > org.xml.sax.SAXParseException: Premature end of file.
> > > > > at
> > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> > Source)
> > > > > at
> >
> org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.bui=
ld
> (DefaultConfigurationBuilder.java:223)
> > > > > at
> >
> org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.bui=
ld
> (DefaultConfigurationBuilder.java
> > :192)
> > > > > at
> > org.keel.core.container.KeelContainerFactory.buildConfigs(
> KeelContainerFactory.java:379)
> > > > >
> > > > > That line 379 in KeelContainerFactory is reading in
> conf/roles.xconf.
> > > > > I verified that it is in the default-keel-config.jar, (code
> already
> > > > > checks for that), and it looks valid:
> > > > >
> > > > > <!-- Merged Role Configuration-->
> > > > >
> > > > >
> > > > > <role-list>
> > > > > <role name=3D"
> > org.apache.avalon.excalibur.datasource.DataSourceComponent">
> > > > > <component shorthand=3D"jdbc"
> > > > >
> > handler=3D"
> org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler
> > "
> > > > >
> > class=3D"
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource"/>
> > > > > </role>
> > > > > <role
> > name=3D"org.apache.avalon.excalibur.datasource.ids.IdGenerator
> > ">
> > > > > <component shorthand=3D"table"
> > > > >
> > handler=3D"
> org.apache.avalon.fortress.impl.handler.ThreadSafeComponentHandler"
> > > > >
> > class=3D"org.apache.avalon.excalibur.datasource.ids.TableIdGenerator
> > "/>
> > > > > </role>
> > > > > </role-list>
> > > > >
> > > > > Thanks for looking at that
> > > > > --
> > > > > Gene McCullough
> > > > > http://keelframework.org/documentation.shtml
> > > > > keelgroup mailing list
> > > > > [email protected]
> > > > >
> > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
> > > >
> > > > http://keelframework.org/documentation.shtml
> > > > keelgroup mailing list
> > > > [email protected]
> > > >
> > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
> > > >
> > >
> > >
> > > --
> > > Gene McCullough
> > > http://keelframework.org/documentation.shtml
> > > keelgroup mailing list
> > > [email protected]
> > >
> > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
> > >
> >
> >
> > http://keelframework.org/documentation.shtml
> > keelgroup mailing list
> > [email protected]
> > http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
> >
> >
> >
>
>
> --
> Gene McCullough
> http://keelframework.org/documentation.shtml
> keelgroup mailing list
> [email protected]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
>
------=_Part_18160_11832814.1134839227209
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have been fighting this all morning. Definitely running into
the "Premature end of file" problem. Premature anything, wh=
en it
comes to SAX, is not funny!! Ahem!<br>
<br>
I think with the latest set of dependency JARs, and maybe ordering of
JARs, somehow the SAX parser is being set to validate with a schema,
and since we dont define a schema, it's bombing out. I tried
setting the DocumentBuilderFactory to setValidating(true), which
supposedly verifies the doc structure, but not against a schema, and
that works (for KeelContainerFactory.verifyConfiguration(...)).<br>
<br>
However, later in KeelContainerFactory.buildConfigs(...), when we use
DefaultConfigurationBuilder from Avalon Framework impl., it uses a SAX
parser which again results in the schema check and failure. I
tried doing this:<br>
SAXParserFactory spf =3D SAXPars=
erFactory.newInstance();<br>
spf.setValidating(true);<br>
XMLReader parser =3D null;<br>
try {<br>
pa=
rser =3D spf.newSAXParser().getXMLReader();<br>
parser.setFeature("<a href=3D"http://apache.org/xml/features/validatio=
n/schema">http://apache.org/xml/features/validation/schema</a>",
false);<br>
} catch (ParserConfigurationExce=
ption e) {<br>
throw new ConfigurationException("Unable to load XML parser - " +
e.getMessage());<br>
}<br>
<br>
DefaultConfigurationBuilder buil=
der =3D new DefaultConfigurationBuilder(parser);<br>
builder.build(...);<br>
<br>
But that does not work: Got:<br>
<br>
org.xml.sax.SAXParseException: Document root element "logkit", mu=
st match DOCTYPE root "null".<br>
<br>
(this is for logkit.xconf, similar error for roles.xconf, system.xconf, whi=
chever happens to be parsed first).<br>
<br>
BTW, I have tried eliminating Xerces, and just use JDK-1.5's built in SAX p=
arser, and that shows the same problem as well.<br>
<br>
Shash<br><br><div><span class=3D"gmail_quote">On 12/16/05, <b class=3D"gmai=
l_sendername">Gene McCullough</b> <<a href=3D"mailto:gene.mccullough@fs-=
ok.com">[email protected]</a>> wrote:</span><blockquote class=3D=
"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0=
pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've been hard pressed to sit down and work on this since my last<br>post, =
but will tonight and more this weekend. If you have anything,<br=
>that would be great.<br><br>Thanks,<br>gene<br><br>On 12/16/05, Sasvata Ch=
atterjee <
<a href=3D"mailto:[email protected]">[email protected]=
m</a>> wrote:<br>> Gene,<br>><br>> As of about two w=
eeks or so ago, I had a version with the latest<br>> dependencies that w=
as working. I'll try the default deployment tomorrow
<br>> sometime and post what I find, unless you find a solution by then =
anyway.<br>><br>> Shash<br>><br>><br>> On 12/15/0=
5, Gene McCullough <<a href=3D"mailto:[email protected]">gene.mc=
[email protected]
</a>> wrote:<br>> > No joy. Changed role-list to roles,=
and also tried creating a parent<br>> > roles element. Sa=
me error.<br>> > I'll try some debugging.<br>> ><br>> > b=
tw, windows xp, tomcat=20
5.5.12, sun jdk1.5.0_06<br>> > got same message on redhat es ws3, tom=
cat 5.5.10, sun jdk1.5.0<br>> > thanks,<br>> > gene<br>> >=
;<br>> > On 12/15/05, Michael Nash <<a href=3D"mailto:mnash@jgloba=
l.com">
[email protected]</a>> wrote:<br>> > > Gene:<br>> > ><=
br>> > > I'm not 100% sure, but doesn't the roles file need to sta=
rt with<br>> > > <roles><br>> > ><br>> > >=
</roles>
<br>> > ><br>> > > ...<br>> > ><br>> > >=
; Mike<br>> > ><br>> > > On Thu, 2005-12-15 at 11:05, mcp=
adawan wrote:<br>> > > > Built the default project, same outcom=
e. However, on closer
<br>> inspection of logs:<br>> > > > -----------------------=
------------------<br>> > > > org.xml.sax.SAXParseException: Pr=
emature end of file.<br>> > > > &n=
bsp; at<br>> org.apache.xerces.parsers.AbstractSAXParser.par=
se
(Unknown<br>> Source)<br>> > > > &nbs=
p; at<br>> org.apache.avalon.framework.configuration.D=
efaultConfigurationBuilder.build(DefaultConfigurationBuilder.java:223)<br>&=
gt; > > > at<br>&g=
t;=20
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.build=
(DefaultConfigurationBuilder.java<br>> :192)<br>> > > > =
; at<br>> org.keel.core.contai=
ner.KeelContainerFactory.buildConfigs
(KeelContainerFactory.java:379)<br>> > > ><br>> > > &g=
t; That line 379 in KeelContainerFactory is reading in conf/roles.xconf.<br=
>> > > > I verified that it is in the default-keel-config.jar
, (code already<br>> > > > checks for that), and it looks valid=
:<br>> > > ><br>> > > > <!-- Merged Role Configu=
ration--><br>> > > ><br>> > > ><br>> > >=
; > <role-list>
<br>> > > > <role name=3D"<br>&=
gt; org.apache.avalon.excalibur.datasource.DataSourceComponent"><br=
>> > > > <component shor=
thand=3D"jdbc"<br>> > > ><br>
> handler=3D"org.apache.avalon.fortress.impl.handler.ThreadSafeComp=
onentHandler<br>> "<br>> > > ><br>> class=3D"or=
g.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource"/&=
gt;
<br>> > > > </role><br>> > =
> > <role<br>> name=3D"org.apache.=
avalon.excalibur.datasource.ids.IdGenerator<br>> "><br>> >=
> > <component shorthand=3D&q=
uot;table"
<br>> > > ><br>> handler=3D"org.apache.avalon.fortress.=
impl.handler.ThreadSafeComponentHandler"<br>> > > ><br>>=
; class=3D"org.apache.avalon.excalibur.datasource.ids.TableIdGenerator
<br>> "/><br>> > > > </ro=
le><br>> > > > </role-list><br>> > &=
gt; ><br>> > > > Thanks for looking at that<br>> > >=
; > --<br>> > > > Gene McCullough
<br>> > > > <a href=3D"http://keelframework.org/documentation.s=
html">http://keelframework.org/documentation.shtml</a><br>> > > &g=
t; keelgroup mailing list<br>> > > > <a href=3D"mailto:keelgrou=
[email protected]">
[email protected]</a><br>> > > ><br>> <a hre=
f=3D"http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.co=
m">http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
</a><br>> > ><br>> > > <a href=3D"http://keelframework.or=
g/documentation.shtml">http://keelframework.org/documentation.shtml</a><br>=
> > > keelgroup mailing list<br>> > > <a href=3D"mailto:k=
[email protected]">
[email protected]</a><br>> > ><br>> <a href=3D"=
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com">ht=
tp://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com</a>
<br>> > ><br>> ><br>> ><br>> > --<br>> > G=
ene McCullough<br>> > <a href=3D"http://keelframework.org/documentati=
on.shtml">http://keelframework.org/documentation.shtml</a><br>> > kee=
lgroup mailing list
<br>> > <a href=3D"mailto:[email protected]">keelgrou=
[email protected]</a><br>> ><br>> <a href=3D"http://lists.=
keelframework.com/listinfo.cgi/keelgroup-keelframework.com">http://lists.ke=
elframework.com/listinfo.cgi/keelgroup-keelframework.com
</a><br>> ><br>><br>><br>> <a href=3D"http://keelframework.o=
rg/documentation.shtml">http://keelframework.org/documentation.shtml</a><br=
>> keelgroup mailing list<br>> <a href=3D"mailto:keelgroup-rI8AND0JKYMYZaMpoT/[email protected]=
framework.com">
[email protected]</a><br>> <a href=3D"http://lists.keelf=
ramework.com/listinfo.cgi/keelgroup-keelframework.com">http://lists.keelfra=
mework.com/listinfo.cgi/keelgroup-keelframework.com</a><br>><br>><br>
><br><br><br>--<br>Gene McCullough<br><a href=3D"http://keelframework.or=
g/documentation.shtml">http://keelframework.org/documentation.shtml</a><br>=
keelgroup mailing list<br><a href=3D"mailto:[email protected]=
om">
[email protected]</a><br><a href=3D"http://lists.keelframew=
ork.com/listinfo.cgi/keelgroup-keelframework.com">http://lists.keelframewor=
k.com/listinfo.cgi/keelgroup-keelframework.com</a><br></blockquote></div>
<br>
------=_Part_18160_11832814.1134839227209--
--===============0362361643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
http://keelframework.org/documentation.shtml
keelgroup mailing list
[email protected]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
--===============0362361643==--