How do I use tag libraries in XSP pages?

2002-05-06 Thread Chris . Clark

Hi

I have a JSP page from an old prototype application which used struts on
Weblogic 5.1

Is it possible to use an XSP page instead, and include the tag libraries
inside the XSP page?

How do you use external tag libraries in XSP pages?

TIA,
Chris.

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Can't get ESQL in XSP to work....

2002-05-01 Thread Chris . Clark

Hi - I tried the following XSP file...



http://apache.org/xsp";
xmlns:esql="http://apache.org/cocoon/SQL/v2";>

   
 venusPool
 
   select * from ref_country
   
 
   
   
 
   
 
   




I am using Weblogic 6.0sp2, on Solaris, and Cocoon 2.0.2,
and I cannot get this XSP to work - the connection pool is defined in the
config.xml as below:



So venusPool exists - and it's running - but when I try to run the above XSP
code, I get this rather unfriendly
and unhelpful message:


Cocoon 2 - Internal server error

type fatal
message Exception in ServerPagesGenerator.generate()
description org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException
sender org.apache.cocoon.servlet.CocoonServlet
source Cocoon servlet
stack-trace
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:272)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:251)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
at
org.apache.cocoon.www.sitemap_xmap.matchN10388(/export/weblogic_6.0/config/v
odafone/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/coco
on-files/org/apache/cocoon/www/sitemap_xmap.java:4185)
at
org.apache.cocoon.www.sitemap_xmap.process(/export/weblogic_6.0/config/vodaf
one/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/cocoon-f
iles/org/apache/cocoon/www/sitemap_xmap.java:3218)
at
org.apache.cocoon.www.sitemap_xmap.process(/export/weblogic_6.0/config/vodaf
one/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/cocoon-f
iles/org/apache/cocoon/www/sitemap_xmap.java:3091)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
java.lang.NullPointerException
at
org.apache.cocoon.components.language.markup.xsp.EsqlQuery.(EsqlQuery.java:9
0)
at
org.apache.cocoon.www.dealersite.helloworld_xsp.generate(/export/weblogic_6.
0/config/vodafone/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_c
ocoon/cocoon-files/org/apache/cocoon/www/dealersite/helloworld_xsp.java:296)
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:260)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:251)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)
at
org.apache.cocoon.www.sitemap_xmap.matchN10388(/export/weblogic_6.0/config/v
odafone/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/coco
on-files/org/apache/cocoon/www/sitemap_xmap.java:4185)
at
org.apache.cocoon.www.sitemap_xmap.process(/export/weblogic_6.0/config/vodaf
one/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/cocoon-f
iles/org/apache/cocoon/www/sitemap_xmap.java:3218)
at
org.apache.cocoon.www.sitemap_xmap.process(/export/weblogic_6.0/config/vodaf
one/applications/cocoon/WEB-INF/_tmp_war_eservices_eservices_cocoon/cocoon-f
iles/org/apache/cocoon/www/sitemap_xmap.java:3091)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.k

Yeah!!!! Got it working!!!! :-)))

2002-04-26 Thread Chris . Clark

>> Removing the packages fron the jars was how I got round my WL issues - a
>> bit of a pain - but it did the trick.

Oh? I just changed the classpath in the startWeblogic.sh script so that the
xml-apis.jar 
and xerces-?.jar where in the classpath before the weblogic.jar file, and
that stopped the
NoSuchMethod thingy. I am rather against messing with BEA JAR files (I think
it breaches
the contract doing so, and therefore no support).

I read the FAQ, and that PJA library is a godsend - because I got the
error with X11, and after installing PJA according to the FAQ, cocoon
started
without any problems at all, and now I can get going on the fun stuff! :)

Thanks for all your help folks.


Chris.



-Original Message-
From: Anthony Aldridge [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: Re: The woes of Weblogic 6.0sp2 and Cocoon - found the problem
at last :)


Removing the packages fron the jars was how I got round my WL issues - a
bit of a pain - but it did the trick.

Tony




Konstantin Piroumian <[EMAIL PROTECTED]> on 04/26/2002 02:49:06 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Re: The woes of Weblogic 6.0sp2 and Cocoon - found the problem at
  last :)


Hi
>
> good news and bad news -
>
...
>
> Note that the class expects there to be a method 'getXMLReader' available
in
> the SAXParser object (javax.xml.parsers.SAXParser) - this is logical,
> because in
> the version of Xerces Cocoon was built against, this method exists.
>
> I then looked at the structure of the SAXParser class that Weblogic 6.0
SP2
> uses, and found out that there is no 'getXMLReader' method!!!
>
> So who is to blame?
>
> Well, the offender is BEA - their JAXP API is broken, because it does
> not comply with the defacto standard, the one in the Java 1.4.0 API -
> whereas
> Avalon itself is completely justified in expecting the getXMLReader
> method, because it *should* be there according to Sun's API docs.
>
> Oh well, I'll have to work out how to bypass BEA's XML crud until a new
> service pack comes out for 6.0, I guess p

You can try to place Xerces and Xalan in weblogic6.1/lib and rename them to
something like a_xerces.jar and a_xalan.jar.

Also you can try to remove certain packages (org.apache.**) from
weblogic.jar and xmlx.jar archives.

--
Konstantin

>
> Thanks to all the folks who tried to help me with my problem :)
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>







-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: The woes of Weblogic 6.0sp2 and Cocoon - found the problem at las t :)

2002-04-26 Thread Chris . Clark

>> v6.1 is out now - and BEA are not the quickest. 

True, naturally, opensource projects are always the fastest at
adhering to standards - but my company has licenses for 6.0
only, so that is the version I have to work with.

>> You could always remove WLs version of avalon and replace it

Avalon has nothing to do with Weblogic - it is used by cocoon, and
comes distributed with it (it is a framework created by the
Apache folks).

>> What's wrong with tomcat?

Nothing at all - see first answer. Waste of money paying zillions
for weblogic licenses and then not using it at all ;-) 


Chris.


-Original Message-
From: Anthony Aldridge [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 3:40 PM
To: [EMAIL PROTECTED]
Subject: Re: The woes of Weblogic 6.0sp2 and Cocoon - found the problem
at las t :)



v6.1 is out now - and BEA are not the quickest. You could always remove WLs
version of avalon and replace it, or remove it form the system classpath
and leave only in the webapp classpath (if that's still how WL 6.0 works -
see my previous email).

Good luck,

Tony

PS What's wrong with tomcat?




[EMAIL PROTECTED] on 04/26/2002 02:33:10 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  The woes of Weblogic 6.0sp2 and Cocoon - found the problem at las
  t :)


Hi there

good news and bad news -

I have found the reason why the NoSuchMethodException is being thrown -
I first dug out the source of the Avalon class that was throwing the
exception,
to find out what method was being expected.

Here is the 'offending' method, which is found in the class
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder
(inside Avalon version 4.1.2, which is used in Cocoon 2.0.2):


public DefaultConfigurationBuilder( final boolean enableNamespaces )
{
//yaya the bugs with some compilers and final variables ..
try
{
final SAXParserFactory saxParserFactory =
SAXParserFactory.newInstance();

if ( enableNamespaces )
{
saxParserFactory.setNamespaceAware(true);
}

final SAXParser saxParser = saxParserFactory.newSAXParser();
this.setParser(saxParser.getXMLReader()); <--- THE PROBLEM
}
catch( final Exception se )
{
throw new Error( "Unable to setup SAX parser" + se );
}
}

Note that the class expects there to be a method 'getXMLReader' available
in
the SAXParser object (javax.xml.parsers.SAXParser) - this is logical,
because in
the version of Xerces Cocoon was built against, this method exists.

I then looked at the structure of the SAXParser class that Weblogic 6.0 SP2
uses, and found out that there is no 'getXMLReader' method!!!

So who is to blame?

Well, the offender is BEA - their JAXP API is broken, because it does
not comply with the defacto standard, the one in the Java 1.4.0 API -
whereas
Avalon itself is completely justified in expecting the getXMLReader
method, because it *should* be there according to Sun's API docs.

Oh well, I'll have to work out how to bypass BEA's XML crud until a new
service pack comes out for 6.0, I guess p

Thanks to all the folks who tried to help me with my problem :)

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>








-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




The woes of Weblogic 6.0sp2 and Cocoon - found the problem at last :)

2002-04-26 Thread Chris . Clark

Hi there

good news and bad news -

I have found the reason why the NoSuchMethodException is being thrown -
I first dug out the source of the Avalon class that was throwing the
exception,
to find out what method was being expected.

Here is the 'offending' method, which is found in the class
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder 
(inside Avalon version 4.1.2, which is used in Cocoon 2.0.2):


public DefaultConfigurationBuilder( final boolean enableNamespaces )
{
//yaya the bugs with some compilers and final variables ..
try
{
final SAXParserFactory saxParserFactory =
SAXParserFactory.newInstance();

if ( enableNamespaces )
{
saxParserFactory.setNamespaceAware(true);
}

final SAXParser saxParser = saxParserFactory.newSAXParser();
this.setParser(saxParser.getXMLReader()); <--- THE PROBLEM
}
catch( final Exception se )
{
throw new Error( "Unable to setup SAX parser" + se );
}
}

Note that the class expects there to be a method 'getXMLReader' available in
the SAXParser object (javax.xml.parsers.SAXParser) - this is logical,
because in
the version of Xerces Cocoon was built against, this method exists.

I then looked at the structure of the SAXParser class that Weblogic 6.0 SP2
uses, and found out that there is no 'getXMLReader' method!!!

So who is to blame?

Well, the offender is BEA - their JAXP API is broken, because it does
not comply with the defacto standard, the one in the Java 1.4.0 API -
whereas
Avalon itself is completely justified in expecting the getXMLReader
method, because it *should* be there according to Sun's API docs.

Oh well, I'll have to work out how to bypass BEA's XML crud until a new
service pack comes out for 6.0, I guess p

Thanks to all the folks who tried to help me with my problem :)

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: RE: I cannae dae it (the woes of Weblogic 6.0sp2 and Cocoon) :(

2002-04-26 Thread Chris . Clark
sages appear:



  
<[WebAppServletContext(661879,cocoon)] Error loading servlet: 'Cocoon2'
java.lang.NoSuchMethodError
at
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.

(DefaultConfigurationBuilder.java:88)
at
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.

(DefaultConfigurationBuilder.java:64)
at
org.apache.cocoon.servlet.CocoonServlet.initLogger(CocoonServlet.java:772)
at
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:241)
at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java

:638)
at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja

va:581)
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav

a:526)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:30

6)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo

ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java

:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
  
<[WebAppServletContext(661879,cocoon)] Servlet failed with ServletException
javax.servlet.ServletException: Servlet class:
'org.apache.cocoon.servlet.CocoonServlet' could not be handled by the
ClassLoader
at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav

a:560)
at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:30

6)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo

ntext.java:1265)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java

:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)




I don't know what is going on, and to be frank, I'm losing patience trying
to get this working, because the cocoon.war file, despite
being huge (because it contains 'all the classes you need'), seems to me to
be non-functional.

I am also having trouble building cocoon - but that's another story
sigh
:(

Chris Clark





-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>








-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




I cannae dae it (the woes of Weblogic 6.0sp2 and Cocoon) :(

2002-04-26 Thread Chris . Clark
vletRequestImpl.execute(ServletRequestImpl.java
:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)




I don't know what is going on, and to be frank, I'm losing patience trying
to get this working, because the cocoon.war file, despite
being huge (because it contains 'all the classes you need'), seems to me to
be non-functional.

I am also having trouble building cocoon - but that's another story sigh
:(

Chris Clark





-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>