RE: Connecting database and XML pages

2001-08-07 Thread Terry Paddy

Same thing happens with PostgreSQL :( but there are
lots of messages about this problem and you can see
some info in the Turbine project. The important thing
is ... its not your setup, it appears to be a bug.

=
___
Terry Paddy - Christchurch, New Zealand

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
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: Debugging Custom Generators & Transformers

2001-08-07 Thread forge



I've had this same problem before.

It has to do with the wrong jar files in the wrong directories. I believe
it's in the FAQ.
rename xerces/xalan to 1xerces/1xalan,
remove jaxp.jar and one more jar, but I can't remember which one :)

On Tue, 7 Aug 2001, Kaufman, Noah wrote:

> Folks:
> 
>   Actually, I guess I spoke too quickly before.  Although we have
> gotten the latest build of Tomcat to run under Visual Age for Java, we
> are not able to make Beta 2 of Cocoon 2 work in this configuration.
> 
>   The cocoon.log file has a lot of information in it, but the
> error can be summed up by saying that for some reason Cocoon is unable
> to locate the proper component handler to read its own sitemap.
> 
>   Has anyone had any experience with running Cocoon 2 under Tomcat
> inside of VAJ, and if so - what do we need to do to make this work
> properly.
> 
>   I have enclosed the output from the relevant section of the log
> (the tail end) after my signature.
> 
> Sincerely,
> 
> Noah Kaufman
> Metatomix, Inc.
> 
> - tail end of cocoon.log starts here --
> 
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): ComponentFactory
> creating new instance of
> org.apache.cocoon.components.source.SourceHandlerImpl.
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Getting the
> SourceFactories
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Beginning sitemap
> regeneration
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolving
> 'sitemap.xmap'
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
> file:C:\Program Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
> 'file:C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/sitemap.xmap'
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolving ''
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
> file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/
> DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
> 'file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/'
> DEBUG   99722   [cocoon  ] (Thread-17): Making URL from file:C:\Program
> Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
> DEBUG   99722   [cocoon  ] (Thread-17): UnnamedSelector:
> ComponentSelector could not find the component for hint:
> org\apache\cocoon\www\sitemap_xmap
> DEBUG   99722   [cocoon  ] (Thread-17): Could not access component for
> hint: org\apache\cocoon\www\sitemap_xmap
> DEBUG   99722   [cocoon  ] (Thread-17): The instance was not accessible,
> creating it now.
> DEBUG   99722   [cocoon  ] (Thread-17): ComponentFactory creating new
> instance of org.apache.cocoon.www.sitemap_xmap.
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand store,
> returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> url-factory, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> source-handler, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> program-generator, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand jsp-engine,
> returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> programming-languages, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> classloader, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> markup-languages, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> datasources, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> stream-pipeline, returning
> org.apache.cocoon.components.pipeline.StreamPipeline
> DEBUG   99722   [cocoon  ] (Thread-17): Adding component
> (org.apache.cocoon.components.pipeline.StreamPipeline =
> org.apache.cocoon.components.pipeline.CachingStreamPipeline)
> DEBUG   99722   [cocoon  ] (Thread-17): Attempting to get Handler for:
> org.apache.cocoon.components.pipeline.StreamPipeline
> DEBUG   99722   [cocoon  ] (Thread-17): Handler type =
> org.apache.avalon.excalibur.component.PoolableComponentHandler
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> stream-cache, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> event-pipeline, returning
> org.apache.cocoon.components.pipeline.EventPipeline
> DEBUG   99722   [cocoon  ] (Thread-17): Adding component
> (org.apache.cocoon.components.pipeline.EventPipeline =
> org.apache.cocoon.components.pipeline.CachingEventPipeline)
> DEBUG   99722   [cocoon  ] (Thread-17): Attempting to get Handler for:
> org.apache.cocoon.components.pipeline.EventPipeline
> DEBUG   99722   [cocoon  ] (Thread-17): Handler type =
> org.apache.avalon.excalibur.component.PoolableComponentHandler
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
> event-cache, returning null
> DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand sitemap

RE: Connecting database and XML pages

2001-08-07 Thread annemarie . hartvigsen

OK,

I tried to implement your example, but can't get the connection pooling to
work (I guess). It _works_ when I _don't_ use pooling, so I can't understand
what's wrong. The driver is mm.mysql 2.0.4 and is located in
TOMCAT_HOME/lib.

Below is the error message and cocoon.properties:

---

Error found handling the request.
java.lang.RuntimeException: Error opening pooled connection: annemarie:
Database type org.gjt.mm.mysql.Driver not implemented.
at
_var._tomcat._webapps._cocoon._vt._sec_sql._sec_sql.populateDocument(_sec_sq
l.java:195)
at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:527)
at org.apache.cocoon.Engine.handle(Engine.java:384)
at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)

--

>From my cocoon.properties:



# Turbine DB Connection Pool


# These are your database settings, look in the
# org.apache.turbine.util.db.pool.* package for more information.

# Inserted 01-08-2001:
processor.xsp.pool.database.annemarie.driver=org.gjt.mm.mysql.Driver
processor.xsp.pool.database.annemarie.url=jdbc:mysql://(my host
name)/annemarie
processor.xsp.pool.database.annemarie.username=(my username)
processor.xsp.pool.database.annemarie.password=(my password)
processor.xsp.pool.database.annemarie.maxConnections=5
processor.xsp.pool.database.annemarie.expiryTime=360

processor.xsp.pool.database.default.driver=oracle.jdbc.driver.OracleDriver
processor.xsp.pool.database.default.url=jdbc:oracle:thin:@localhost:1521:ORC
L
processor.xsp.pool.database.default.username=dbUser
processor.xsp.pool.database.default.password=dbPass
processor.xsp.pool.database.default.maxConnections=3
processor.xsp.pool.database.default.expiryTime=360

# These are the supported jdbc-drivers and their adaptors.
# These properties are used by the DBFactory.

#Inserted 01-08-2001:
processor.xsp.pool.database.adaptor=DBMM
processor.xsp.pool.database.adaptor.DBMM=org.gjt.mm.mysql.Driver

processor.xsp.pool.database.adaptor=DBWeblogic,DBOracle,DBInstantDB,DBPostgr
es,DBSybase,DBInformix,DBMySQL
processor.xsp.pool.database.adaptor.DBWeblogic=weblogic.jdbc.pool.Driver
processor.xsp.pool.database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver
processor.xsp.pool.database.adaptor.DBInstantDB=org.enhydra.instantdb.jdbc.i
dbDriver
processor.xsp.pool.database.adaptor.DBPostgres=postgresql.Driver
processor.xsp.pool.database.adaptor.DBInformix=com.informix.jdbc.IfxDriver
processor.xsp.pool.database.adaptor.DBSybase=com.sybase.jdbc.SybDriver
processor.xsp.pool.database.adaptor.DBMySQL=org.gjt.mm.mysql.Driver



What could be missing?

/Anne Marie


-Original Message-
From: JEULIN Olivier [mailto:[EMAIL PROTECTED]]
Sent: 31. juli 2001 13:26
To: '[EMAIL PROTECTED]'
Subject: RE: Connecting database and XML pages


As usual here, you forgot to tell which version of cocoon you're using...
Here is an (short!) example of what you can do with C1.8.2 (it may slightly
differ with C2):

http://www.apache.org/1999/XSP/Core";
xmlns:auth="http://ulim.cocoonhost.com/auth";
xmlns:request="http://www.apache.org/1999/XSP/Request";
xmlns:session="http://www.apache.org/1999/XSP/Session";
xmlns:foo="http://localhost/foo";
xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:util="http://www.apache.org/1999/XSP/Util";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xinclude="http://www.w3.org/1999/XML/xinclude";
>

[...]


foo  


  
select b.ref as ref b.quantite as nb
from basket b
where b.id = 

  

  
  




 
  

   

  




[more ...]


You can retrieve different kind of data, even XML (read the doc, and
esql.xsd in the samples/sql directory)

##

You can connect directly to the DB 

RE: Debugging Custom Generators & Transformers

2001-08-07 Thread Kaufman, Noah

Folks:

Actually, I guess I spoke too quickly before.  Although we have
gotten the latest build of Tomcat to run under Visual Age for Java, we
are not able to make Beta 2 of Cocoon 2 work in this configuration.

The cocoon.log file has a lot of information in it, but the
error can be summed up by saying that for some reason Cocoon is unable
to locate the proper component handler to read its own sitemap.

Has anyone had any experience with running Cocoon 2 under Tomcat
inside of VAJ, and if so - what do we need to do to make this work
properly.

I have enclosed the output from the relevant section of the log
(the tail end) after my signature.

Sincerely,

Noah Kaufman
Metatomix, Inc.

- tail end of cocoon.log starts here --

DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): ComponentFactory
creating new instance of
org.apache.cocoon.components.source.SourceHandlerImpl.
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Getting the
SourceFactories
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Beginning sitemap
regeneration
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolving
'sitemap.xmap'
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:C:\Program Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/sitemap.xmap'
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolving ''
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/
DEBUG   99722   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:/C:/Program Files/Jakarta Tomcat 4.0/webapps/cocoon/'
DEBUG   99722   [cocoon  ] (Thread-17): Making URL from file:C:\Program
Files\Jakarta Tomcat 4.0\webapps\cocoon\sitemap.xmap
DEBUG   99722   [cocoon  ] (Thread-17): UnnamedSelector:
ComponentSelector could not find the component for hint:
org\apache\cocoon\www\sitemap_xmap
DEBUG   99722   [cocoon  ] (Thread-17): Could not access component for
hint: org\apache\cocoon\www\sitemap_xmap
DEBUG   99722   [cocoon  ] (Thread-17): The instance was not accessible,
creating it now.
DEBUG   99722   [cocoon  ] (Thread-17): ComponentFactory creating new
instance of org.apache.cocoon.www.sitemap_xmap.
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand store,
returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
url-factory, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
source-handler, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
program-generator, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand jsp-engine,
returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
programming-languages, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
classloader, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
markup-languages, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
datasources, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
stream-pipeline, returning
org.apache.cocoon.components.pipeline.StreamPipeline
DEBUG   99722   [cocoon  ] (Thread-17): Adding component
(org.apache.cocoon.components.pipeline.StreamPipeline =
org.apache.cocoon.components.pipeline.CachingStreamPipeline)
DEBUG   99722   [cocoon  ] (Thread-17): Attempting to get Handler for:
org.apache.cocoon.components.pipeline.StreamPipeline
DEBUG   99722   [cocoon  ] (Thread-17): Handler type =
org.apache.avalon.excalibur.component.PoolableComponentHandler
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
stream-cache, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
event-pipeline, returning
org.apache.cocoon.components.pipeline.EventPipeline
DEBUG   99722   [cocoon  ] (Thread-17): Adding component
(org.apache.cocoon.components.pipeline.EventPipeline =
org.apache.cocoon.components.pipeline.CachingEventPipeline)
DEBUG   99722   [cocoon  ] (Thread-17): Attempting to get Handler for:
org.apache.cocoon.components.pipeline.EventPipeline
DEBUG   99722   [cocoon  ] (Thread-17): Handler type =
org.apache.avalon.excalibur.component.PoolableComponentHandler
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand
event-cache, returning null
DEBUG   99722   [cocoon  ] (Thread-17): looking up shorthand sitemap,
returning null
WARN99722   [cocoon  ] (Thread-17): Looking up component on an
uninitialized ComponentManager:
org.apache.cocoon.generation.GeneratorSelector
DEBUG   99722   [cocoon  ] (Thread-17): Could not find ComponentHandler,
attempting to create one for role:
org.apache.cocoon.generation.GeneratorSelector
ERROR   99722   [cocoon  ] (Thread-17): Error compiling sitemap
java.lang.InternalError: (Ex02) An error has occurred.
java.lang.Throwabl

ESQLl where condition

2001-08-07 Thread annemarie . hartvigsen



Hi,
 
I'm 
trying to run a query and it will not work properly. in mysql I have two tables 
and I run the following query:
 
mysql> select deviceID, 
description from terminal, deviceType where deviceType.deviceType = 
terminal.deviceType;+--+-+| deviceID | description 
|+--+-+| 57685251 | 
PSTN    || 57685251 | 
PSTN    || 22671300 | 
ISDN    || 90098999 | 
GSM || 95755499 | 
GSM 
|+--+-+5 rows in set (0.00 sec)
 
When I try to run it on a xsp page (see code at the bottom of the page) I 
get the following result:
 


  
  
Device ID 
Description 
  
90098999 
PSTN 
  
95755499 
PSTN 
  
57685251 
PSTN 
  
22671300 
PSTN 
  
57685251 
PSTN 
  
90098999 
ISDN 
  
95755499 
ISDN 
  
57685251 
ISDN 
  
22671300 
ISDN 
  
57685251 
ISDN 
  
90098999 
GSM 
  
95755499 
GSM 
  
57685251 
GSM 
  
22671300 
GSM 
  
57685251 
GSM 
As far as I can see 
the where condition is not working when I run it in the xsp page (as you can see 
below this is the result when the query is run without the 
condition).
 
mysql> select deviceID, 
description from terminal, deviceType;+--+-+| 
deviceID | description |+--+-+| 90098999 | 
PSTN    || 95755499 | 
PSTN    || 57685251 | 
PSTN    || 22671300 | 
PSTN    || 57685251 | 
PSTN    || 90098999 | 
ISDN    || 95755499 | 
ISDN    || 57685251 | 
ISDN    || 22671300 | 
ISDN    || 57685251 | 
ISDN    || 90098999 | 
GSM || 95755499 | 
GSM || 57685251 | 
GSM || 22671300 | 
GSM || 57685251 | 
GSM 
|+--+-+15 rows in set (0.00 
sec)
What's the problem? Is 
there something special about the esql syntax? Or is it something 
else?
 
Anybody who can figure it 
out?
 
/Anne Marie
 
 
    
  select deviceID, 
description from terminal, deviceType where deviceType.deviceType = 
terminal.deviceType;    
    
  
    These are your 
definitions:  
  
    
  
    
  
  
    
  
    
  
  
    End of 
list      
  
 

-
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: Help: C2 - Java exception

2001-08-07 Thread Dauben, Oliver

spent a day or something searching for the 42th workaround but the thuth is
in the code:

line 96 to 132 ('old obsolete method') has not been commented out from the
sources. as a result, the 'new set-based-method' looks like dead code to me.

shame on me i read the code four or five times without seeing what jumping
right into my face ;)

i suggest to remove the old but still active stuff asap.

hth and rfc...

cheers,


oLiVeR


-Original Message-
From: Matteo Villa [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 7. August 2001 09:45
To: [EMAIL PROTECTED]
Subject: Help: C2 - Java exception 


Hi everybody,

I want to emulate the example "protected" on C2 (latest CVS downloaded
on 20010806).
The example itself breaks after login (Donald Ball) with

java.lang.NullPointerException
 at
org.apache.cocoon.acting.SessionValidatorAction.act(SessionValidatorAction.j
ava:136)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.wildcardMatchN6A(sitemap_xmap.
java:584)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.process(sitemap_xmap.java:336)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.process(sitemap_xmap.java:282)

 at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
 at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN21E(sitemap_xmap.java:2871)

 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2340)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2279)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:423)
 at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:507)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
2)

 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)

 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

 at java.lang.Thread.run(Thread.java:484)

===> See also attached Cocoon.log <===

Background Infos:
C2 on WNT SP 6 with Tomcat 3.3
Oracle 8.1.5 EE on NT
Web Server is IIS 4.x
Connectivity to Oracle works

Question is: what's wrong ?

Could anyone help me ? I need the Validation stuff to work 

Another info: I got this error also with previous CVS of C2. I noticed
the source has been changed exactly at that point
(SessionValidatorAction.java:136). But still the effect (error) remains.
Maybe I am doing something wrong ?

Thanks in advance!
Cheers
Matteo Villa

-
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]>




disable-output-escaping doesn't work (:-)

2001-08-07 Thread Alex Serbinenko



Dear sir!
 
I have xml

" test "/>
In xsl I wrote 
body//@text"/>
I wont have in output html   test  , but I have exactly the 
same as is in xml plus string 
''. 
Can you help me? 
Thank you, 
Alex


Debugging Custom Generators & Transformers

2001-08-07 Thread Kaufman, Noah

Folks:

For an application that we're developing under Cocoon 2 using
IBM's Visual Age for Java v3.5.3, we are developing a couple of custom
generators and transformers.  Although we can use println to write out
debugging information, what we would really like to do is to be able to
use the integrated debugger inside of the VAJ IDE to be able to debug
our code.

Following instructions on the IBM VADD site, we've gone ahead
and gotten Tomcat and Cocoon to operate successfully within VAJ -- and
we're able to debug other servlets and JSPs in Tomcat by following the
steps outline on the VADD site.

What we can't (yet) do is set a breakpoint in a Cocoon 2
component, for example the HTMLGenerator, and then run the HTMLGenerate
example that scrapes data off of the Yahoo site and get the debugger to
break on a previously set breakpoint.

What "magic" step are we missing here that would allow us to do
this?

Sincerely,

Noah Kaufman
Metatomix, Inc.


-
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]>




JSP and cocoon

2001-08-07 Thread Bertrand Venzal

Hello

I use cocoon 1.8 with WebSphere Studio.I generate my xml pages from jsp 
pages and i want to transform them in html, how is it possible ?

regards

Bertrand Venzal

_
Téléchargez MSN Explorer gratuitement à l'adresse 
http://explorer.msn.fr/intl.asp


-
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: Quotes in query

2001-08-07 Thread Sylvain Wallez



Sébastien Lefebvre wrote:
> 
> Sylvain ,
> 
> Thank you  for your prompt answer.
> As far as I'm new to Cocoon, could you send me a piece of code ?
> It will help me very much.
> 
> Thanks again
> 
> Sébastien
> 
> >
> >Sébastien Lefebvre wrote:
> >
> >>Hi all,
> >>
> >>I have a form where I can type text.
> >>The form is submited  with post method to a xsp page.
> >>This texte can of course have quotes in it. ex:  I'd like this to work
> >>How to insert it in MySQL ?
> >>Do I have to write XSP logic in order to replace ' by \'?
> >>Or is there any other solution ?
> >>(I'd like to make the operation server side so javascript's regexp is
> >>not an issue for me).
> >>
> >>Thanks in advance
> >>Sébastien
> >>
> >Use a PreparedStatement to insert your String, the JDBC driver will take
> >care of this if needed. This will also increase the portability of your
> >code, since escaping syntax varies between databases.
> >
> 
If you're using JDBC calls, you should have a look at the dedicated
section of the excellent Java tutorial at
http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html
It is explained here certainly better than I could do !

If you're using the esql logicsheet, I cannot be of great help since I
don't use it, but Christian told that  generates
prepared statements.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

-
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]>




Tutorial

2001-08-07 Thread LeVasseur, George

I know that Cocoon 2 is not finished, but are there any good tutorials
available?

George Levasseur
Sr. Developer
R&D Group
SmartTime Software
[EMAIL PROTECTED]
PH: 508-598-3821
FX: 508-626-0638

Note: Effective April 20, 2001 we have changed our email domain to
SmartTime.com.  Please note this change in your records for further
communications.




-
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: Capturing generated XML in Action

2001-08-07 Thread Sylvain Wallez



Amal Sirvisetti wrote:
> 
> Hi,
> 
> Is it possible to capture the XML generated by an XSP page in an Action?
> For example,
> 
> a.xsp (generates XML) -> SaveXMLAction (saves that XML in a file)
> 
> Thanks,
> Amal
> 
I've written such an action, wich captures the output of an XSP or parts
of it an stores it in request attributes as XMLFragment instances.

However, there is some discussion going on on cocoon-dev on the way it
is written. So stay tuned, it will certainly be available soon in the
Coocoon 2.1 branch.
-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

-
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: [c1] xsp:logic compiling

2001-08-07 Thread Christopher Painter-Wakefield


Brent,

it sounds like you are getting there, maybe a few hints will close the gap
for you.

First off, you *can* apply multiple logicsheets to an XML document.  Use
the  processing instruction multiple times for
logicsheets that aren't associated with a namespace in the
cocoon.properties file, and declare the appropriate namespaces for all
logicsheets.  You may also use one logicsheet inside another logicsheet, as
long as you declare the namespace for the secondary logicsheet both in the
using logicsheet and in the XML file (and add the appropriate
 PI to the XML document if necessary).

The rest of your issues can be dealt with by looking at the sequence of
events when processing your XML.  First, the Cocoon processors get applied
in the order in which they are requested via 
PI's.  If you are using XSP, then that processor should *always* be first.
(In Cocoon 1, you can get away with putting an XSP processing step later,
but it can work kind of funny and it is also slow, since you get a
compilation every time the page is requested.)

When the XSP processor is applied, things happen in roughly this sequence:
1.  All logicsheets are applied to the source document using normal XSLT.
So for instance, if you use two custom logicsheets using the
 PI and also use the request logicsheet (and all
three namespaces are declared correctly), then each logicsheet will be
applied to the XML source as an XSL Transform in turn (the output of one
becomes the input of the next and so on).  I'm not sure of the exact order
in which the logicsheets will be applied, but common sense would suggest
that the order of  PI's and the order of namespace
declarations will be significant.
2.  After all logicsheets are applied, the XML is transformed into Java
code (this is also done mostly using XSLT, I believe - look for the
xsp-java.xsl file in your Cocoon src tree).
3.  The Java code is compiled.
4.  The resulting code is loaded and run to generate the XML page.

The resulting XML from this step is passed on to any other processors down
the line, including your XSLT processor.

This should explain a few things for you.  First, you can't really use the
request taglib from inside a stylesheet.  Even if the logicsheet were
applied, you'd just end up with uncompiled Java code, which won't do you
any good.  All logicsheets have to be used in the XSP step.  You can,
however, use the request logicsheet in your XSP program, storing the
results in a tag that you can later process in your stylesheet.

Second, you can't mix Java logic and XSLT logic, which is what you do when
you try to use  syntax on the result of the
.  Keep in mind that the XSLT is just what is
applied to the XML to help transform it into Java code.  The
 tag gets transformed in that way.  If you look at
the actual request.xsl logicsheet (in your src tree), you'll see that the
 tag gets transformed into something like
   XSPRequestLibrary.getParameter(
   request,
   String.valueOf("whatever"),
   "",
   document
 );

So, the request code gets run and gives you a result much later in the
process than when your  is applied.  Your  is not
turned into Java code itself, it is applied as XSLT to generate the Java
code.  This is why you can get the results of the request tag in your
output but not use the  in your logicsheet on the result.  One
is dynamic, giving a result at runtime.  The other is static, generating
code that will be compiled once and run many times.

Oh yeah, that's the other thing.  If you don't change your logicsheets or
source XML, then the next time a request is made to that XML, none of the
logicsheet application and compilation is done - the existing program is
merely re-run.

Anyway, to do what you want, you need to mix apples and apples as it were.
You can either mix Java with Java:

  if ("whatever".equals()) {

  This screen is 'whatever'!

  } else {

  Wrong screen!

  }


or mix XML with XSLT:
(in your XSP program or logicsheet)


(in your stylesheet, later in the chain)

  

    and so forth.

Finally, if all that wasn't enough, note that you can gain access to
request parameters in your stylesheet (not your logicsheet!).  Coocon does
some sort of trick to make these available.  Merely declare XSL parameters
with the same name as your request parameter at the top level of your
stylesheet, like so:

See the user guide (http://swift.mc.duke.edu/cocoon_docs/guide.html) for
more on this approach.

I hope some of this is helpful.  Good luck!

-Christopher




Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:

Subject:  Re:  [c1] xsp:logic compiling


OK - I think I see where my problem is.  I've been reading through Cocoon1
docs this whole time and didn't really see much information about
logicsheets (until following the link you sent).

Basically, what I'm trying to do is keep all database queries, all dynamic
code, everything development

cocoon

2001-08-07 Thread Pierre Kelsen

Our school's web site is implemented using Cocoon 1.8.2 (pretty much 100% of
web pages are dynamic) and Apache
Web Server:

http://www.ist.lu

Please add to list.

--
Pierre Kelsen
Assistant Professor
Department of Applied Computer Science
Luxembourg University of Applied Sciences
L-1359 Luxembourg-Kirchberg

Phone: +352-420101-284 / Fax: +352432124
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: How to getConnection in Action ?

2001-08-07 Thread Christian Haul

On 07.Aug.2001 -- 03:42 PM, Ling Kok Choon wrote:
> Hi All,
> 
>I try to use Action in the Sitemap to dinamicaly select stylesheet file  base on 
>the request 
> *.xml file. so in the Action, i need to get a connection from the connection pool to 
>connect to 
> the database. But How to get the connection ? I have read the Cocoon2 Documentation 
>( section 
> Using Databases) but the example code is wrong, i can't find the import classes 
>(e.g. 
> org.apache.avalon.ComponentManager, org.apache.avalon.ComponentSelector ) from the 
>Avalon's 
> package !
> 
>Do you have any idea ? 

Look at the Database*Actions.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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: Capturing generated XML in Action

2001-08-07 Thread Christian Haul

On 06.Aug.2001 -- 04:11 PM, Amal Sirvisetti wrote:
> Hi,
> 
> Is it possible to capture the XML generated by an XSP page in an Action?
> For example,
> 
> a.xsp (generates XML) -> SaveXMLAction (saves that XML in a file)

No, actions have a different role to fill. However, this is possible
with a transformer. See logtransformer & ReadDOMTransformer.

Chris.

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
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]>




AW: How to getConnection in Action ?

2001-08-07 Thread Max Larsson

Hi,

i am doing it that way:

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.SQLException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.ComponentSelector;
import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.Constants;
import org.apache.cocoon.Roles;
import org.apache.cocoon.acting.AbstractComplementaryConfigurableAction;
import org.apache.cocoon.environment.Redirector;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.Session;
import org.apache.cocoon.environment.SourceResolver;

public class CategoryAction extends AbstractComplementaryConfigurableAction
{
private DataSourceComponent datasource;

public void compose(ComponentManager manager) throws ComponentException {
getLogger().debug( "HelpDesk : application.CategoryAction/compose :
start" );

ComponentSelector selector = (ComponentSelector)manager.lookup(
Roles.DB_CONNECTION );
datasource = (DataSourceComponent)selector.select( "helpdesk" );

getLogger().debug( "HelpDesk : application.CategoryAction/compose :
datasource = " + datasource );
getLogger().debug( "HelpDesk : application.CategoryAction/compose :
end" );
}

public Map act( Redirector redirector,SourceResolver resolver,Map
objectModel,String source,Parameters params ) throws java.lang.Exception {
getLogger().debug( "HelpDesk : application.CategoryAction/act : start" 
);

getLogger().debug( "HelpDesk : application.CategoryAction/act : 
redirector
= " + redirector );
getLogger().debug( "HelpDesk : application.CategoryAction/act : 
resolver
= " + resolver );
getLogger().debug( "HelpDesk : application.CategoryAction/act :
objectModel = " + objectModel );
getLogger().debug( "HelpDesk : application.CategoryAction/act : source
= " + source );
getLogger().debug( "HelpDesk : application.CategoryAction/act : params
= " + params );

Map result  = new HashMap();
Request request = (Request)objectModel.get( Constants.REQUEST_OBJECT );
Session session = request.getSession( true );

String action   = request.getParameter( "action" );
String category_xpl = request.getParameter( "category_xpl" );
String category_id  = request.getParameter( "category_id" );

getLogger().debug( "HelpDesk : application.CategoryAction/act : request
= " + request );
getLogger().debug( "HelpDesk : application.CategoryAction/act : session
= " + session );
getLogger().debug( "HelpDesk : application.CategoryAction/act : action
= " + action );
getLogger().debug( "HelpDesk : application.CategoryAction/act : 
category
id = " + category_id );
getLogger().debug( "HelpDesk : application.CategoryAction/act : 
category
xpl= " + category_xpl );

if( action.startsWith( "Save" ) ) {
try {
Connection con  = datasource.getConnection();
Statement  sta  = con.createStatement();

getLogger().debug( "HelpDesk : 
application.UploadAction/act : insert
category problem relation = " + sta.execute( "INSERT INTO menu_problem_rel
( menu_ref,problem_ref ) VALUES ( " + category_id + "," +
request.getParameter( "id" ) + ")" ) );

sta.close();
con.close();
}
catch( SQLException exc ) {
getLogger().debug( "HelpDesk : 
application.UploadAction/act :
SQLException!",exc );
}
}
else if( action.startsWith( "Delete" ) ) {
Connection con  = datasource.getConnection();
Statement  sta  = con.createStatement();

getLogger().debug( "HelpDesk : 
application.UploadAction/act : insert
category problem relation = " + sta.execute( "DELETE FROM menu_problem_rel
WHERE problem_ref = " + request.getParameter( "id" ) + " AND menu_ref = " +
category_id ) );

sta.close();
con.close();
}

getLogger().debug( "HelpDesk : application.CategoryAction/act : result 
= "
+ result );
getLogger().debug( "HelpDesk 

AW: Log-Transformer

2001-08-07 Thread Carsten Ziegeler

The parameters must have the sitemap namespace, so
using "" etc
should work.

I will update the docs. Thanks.

Carsten

> -Ursprüngliche Nachricht-
> Von: Mario Brust [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 7. August 2001 11:07
> An: [EMAIL PROTECTED]
> Betreff: Log-Transformer
>
>
> hi,
>
> I tried to use the LogTransformer with Cocoon 2.0b2.
> If I use the simple form it works.
>   
> But if I try to use some parameters I get error
> "org.apache.cocoon.ProcessingException: Language
> Exception:org.apache.cocoon.components.language.LanguageException: Error
> compiling sitemap_xmap:
> Line 596, column 7:  '}' expected.".
> I don't have the error, if I don't use the parameters.
>
> The form how it is described in the documentation don't work:
> 
>   
>   
> 
>
> thx,
> cu majo
>
> ---
>
> System Development
> VIRBUS AG
> [EMAIL PROTECTED]
> www.virbus.de
>
>
>
> -
> 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]>




Session issues and Auth taglib functionality

2001-08-07 Thread Luis Gois



I've not tested this, but I have this question for 
the Auth taglib creator or anyone else that might know the answer :
 
    - How does the Auth taglib deals 
with 2 logins from the same browser (assuming HttpSession objects for management 
of the logins and that we have two windows  
of the same browser - which, from the session point of view, is the exactly same 
browser) ??? Is it able to diferentiate from the 2 windows apart?
 
tks
 
Luis Gois


How to getConnection in Action ?

2001-08-07 Thread Ling Kok Choon

Hi All,

   I try to use Action in the Sitemap to dinamicaly select stylesheet file  base on 
the request 
*.xml file. so in the Action, i need to get a connection from the connection pool to 
connect to 
the database. But How to get the connection ? I have read the Cocoon2 Documentation ( 
section 
Using Databases) but the example code is wrong, i can't find the import classes (e.g. 
org.apache.avalon.ComponentManager, org.apache.avalon.ComponentSelector ) from the 
Avalon's 
package !

   Do you have any idea ? 


Thank you.

Kok Choon.




Name: Ling Kok Choon
E-mail: Ling Kok Choon <[EMAIL PROTECTED]>
Date: 08/07/01
Time: 15:42:44

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions


-
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]>




Log-Transformer

2001-08-07 Thread Mario Brust

hi,

I tried to use the LogTransformer with Cocoon 2.0b2.
If I use the simple form it works.
  
But if I try to use some parameters I get error
"org.apache.cocoon.ProcessingException: Language
Exception:org.apache.cocoon.components.language.LanguageException: Error
compiling sitemap_xmap:
Line 596, column 7:  '}' expected.".
I don't have the error, if I don't use the parameters.

The form how it is described in the documentation don't work:

  
  


thx,
cu majo

---

System Development
VIRBUS AG
[EMAIL PROTECTED]
www.virbus.de



-
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]>




Get Connection in Action

2001-08-07 Thread Ling Kok Choon

Hi All,

   I face a problem to get database connection in Action, i followed all the step in 
the cocoon2 
documentation ( section Using Databases ), the example is not very complete( included 
below ). 
Do you know how to solve this problem, please tell me 


** Example From Cocoon2 
*

import org.apache.avalon.ComponentManager;
import org.apache.avalon.ComponentSelector;
import org.apache.cocoon.Roles;
import org.apache.cocoon.component.datasource.DataSourceComponent;

import java.sql.Connection;

//  Skip a lot of lines until we are in the method you use
//  to initialize the DataSourceComponent 

private DataSourceComponent datasource;

public void compose(ComponentManager manager) {
ComponentSelector selector = (ComponentSelector) 
manager.lookup(Roles.DB_CONNECTION);
this.datasource = (DataSourceComponent) selector.select("MyConnectionName");
}

//  Skip more lines until we actually need to use the datasource

private void meMethod() {
Connection myConnection = this.datasource.getConnection();

//  perform SQL code here

myConnection.close();
}

** End Example From Cocoon2 



Thank you.

KOk Choon.



Name: Ling Kok Choon
E-mail: Ling Kok Choon <[EMAIL PROTECTED]>
Date: 08/07/01
Time: 16:49:32

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions


-
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: Quotes in query

2001-08-07 Thread Sébastien Lefebvre

Sylvain ,

Thank you  for your prompt answer.
As far as I'm new to Cocoon, could you send me a piece of code ?
It will help me very much.

Thanks again

Sébastien

>
>Sébastien Lefebvre wrote:
>
>>Hi all,
>>
>>I have a form where I can type text.
>>The form is submited  with post method to a xsp page.
>>This texte can of course have quotes in it. ex:  I'd like this to work
>>How to insert it in MySQL ?
>>Do I have to write XSP logic in order to replace ' by \'?
>>Or is there any other solution ?
>>(I'd like to make the operation server side so javascript's regexp is
>>not an issue for me).
>>
>>Thanks in advance
>>Sébastien
>>
>Use a PreparedStatement to insert your String, the JDBC driver will take
>care of this if needed. This will also increase the portability of your
>code, since escaping syntax varies between databases.
>




-
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]>




Serving files out of a database

2001-08-07 Thread Max Larsson

Hi,

i've got the following problem:

I'm using a postgresql database. The user of my web application (C2)
cann upload files (of any kind ) into the database. Now i want to serve them
to user on request. Now i wondering how to integrate it into C2. I was
thinking about to write a specific Generator, which query the db and
pulls out the file data, but it seems for me that Generators are only used
to produce XML conform data, which will be further processed in the
pipeline.

Does anyone have a solution or any idea how to do this??

Max


-
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: [C2] How to get web.xml parameters in an XSP ... ?

2001-08-07 Thread Morrison, John

You can do something like this...

http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>


  display
  description
  
  
param1
some value here
a better description here
  
...



and access it in your xsp like

context.getInitParameter("param1")

'cause I put the code in there! ;)

J.

> -Original Message-
> From: Peter Royal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 03 August 2001 8:11 pm
> To: [EMAIL PROTECTED]
> Subject: Re: [C2] How to get web.xml parameters in an XSP ... ?
> 
> 
> At 12:05 PM 8/3/2001 -0700, Rick Tessner wrote:
> >Is there any way to grab the  parameters defined 
> in the web.xml
> >via an XSP?  Or is this be considered a big no-no?
> 
> There is not a way currently, but you could do it if you 
> wanted to dig a bit :)
> 
> Those parameters are read in the CocoonServlet class 
> (org.apache.cocoon.servlet package). Values in there are 
> stuffed into the 
> Context (an avalon context, not servlet).
> 
> You could modify that class to put those parameters into the 
> Context, but 
> then you have to get them out. AFAIK an XSP page is not 
> Contextualizable 
> (an Avalon interface). You could give it that by modifying 
> the styleshete 
> used to create the compiled XSP forms.
> 
> So yes, its possible, but it would take some legwork. It 
> might be nice to 
> have a generic way to pass parameters to an instance of 
> cocoon via web.xml, 
> maybe via the context. I'm sure if you wrote that the 
> developers would 
> consider the patch.
> -pete
> 
> -- 
> peter royal -> [EMAIL PROTECTED]
> managing partners, inc. -> http://www.managingpartners.com
> 
> 
> -
> 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]>
> 


===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

-
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]>




Help: C2 - Java exception

2001-08-07 Thread Matteo Villa

Hi everybody,

I want to emulate the example "protected" on C2 (latest CVS downloaded
on 20010806).
The example itself breaks after login (Donald Ball) with

java.lang.NullPointerException
 at
org.apache.cocoon.acting.SessionValidatorAction.act(SessionValidatorAction.java:136)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.wildcardMatchN6A(sitemap_xmap.java:584)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.process(sitemap_xmap.java:336)

 at
org.apache.cocoon.www.protected_.sitemap_xmap.process(sitemap_xmap.java:282)

 at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
 at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN21E(sitemap_xmap.java:2871)

 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2340)
 at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2279)
 at org.apache.cocoon.sitemap.Handler.process(Handler.java:160)
 at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:103)
 at org.apache.cocoon.Cocoon.process(Cocoon.java:423)
 at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:507)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)

 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)

 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)

 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)

 at java.lang.Thread.run(Thread.java:484)

===> See also attached Cocoon.log <===

Background Infos:
C2 on WNT SP 6 with Tomcat 3.3
Oracle 8.1.5 EE on NT
Web Server is IIS 4.x
Connectivity to Oracle works

Question is: what's wrong ?

Could anyone help me ? I need the Validation stuff to work 

Another info: I got this error also with previous CVS of C2. I noticed
the source has been changed exactly at that point
(SessionValidatorAction.java:136). But still the effect (error) remains.
Maybe I am doing something wrong ?

Thanks in advance!
Cheers
Matteo Villa

 Cocoon.zip

begin:vcard 
n:Villa;Matteo
tel;cell:+49 172 2521241
tel;fax:+49 228 3673 440
tel;work:+49 228 3673 140
x-mozilla-html:FALSE
url:www.prosolutions.de
org:ProSolutions GmbH
adr:;;Bürgerstrasse 12;Bonn;;53173;Germany
version:2.1
email;internet:[EMAIL PROTECTED]
title:Director
x-mozilla-cpt:;-27024
fn:Matteo Villa
end:vcard



-
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]>