Re: bad lookup of log4j.dtd

2006-03-29 Thread Fernando Mato Mira

Antonio Gallardo wrote:


[EMAIL PROTECTED] escribió:
>
> Cocoon 2.1.8 is looking for log4j.dtd in the webapp directory instead
> of the log4j jar file.
>
> 
>

Would you provide more info?

Best Regards,

Antonio Gallardo.

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



 Internal Server Error

Message: /myapp/build/cocoon/webapp/log4j.dtd (No such file or directory)

Description: org.apache.cocoon.ProcessingException: Failed to load 
sitemap from file:/myapp/build/cocoon/webapp/sitemap.xmap


Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

privapps/multi/do-login

cause

java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd (No such 
file or directory)

request-uri

/privapps/multi/do-login

full exception chain stacktrace

org.apache.cocoon.ProcessingException: Failed to load sitemap from 
file:/myapp/build/cocoon/webapp/sitemap.xmap
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:368)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.buildConcreteProcessor(TreeProcessor.java:335)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupConcreteProcessor(TreeProcessor.java:300)
at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:246)
at org.apache.cocoon.Cocoon.process(Cocoon.java:679)
at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
at 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by: java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd 
(No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at 
sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown 
Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown 
Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
at 
org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:128)
at 
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:190)
at 
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:139)
at 
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(DefaultTreeBuilder.java:361)
... 19 more

stacktrace

java.io.FileNotFoundException: /myapp/build/cocoon/webapp/log4j.dtd (No such 
file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at 
sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at 
sun.net.www.protocol.file.Fil

Re: User Roles and Flowscript

2006-03-29 Thread Derek Hohls
As always, the archives are worth searching as well ;-) e.g.

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=113769531804110&w=2

(I had a similar problem)

>>> [EMAIL PROTECTED] 2006/03/29 10:47 PM >>>
Stewart, Gary wrote:
> Hi there,
> 
> I've been working with the authentication resource for a while but I figured 
> it was about time I implemented per role pipelines (that is some pipelines 
> can only be accessed by some roles). I am using flowscript to do this but I 
> don't seem to be able to get it to work. The pipeline performs an 
> authentication check (I figure this would give me the session information; or 
> is there something I need to do in the flow?). In the Javascript I quite 
> simply have:
> 
> function administratorOnlyPage()
> {
>  var resource = cocoon.parameters.resourceRequest;
>  if(cocoon.request.isUserInRole("Administrator"))
>  {
>   cocoon.sendPage(resource);
>  }
>  else
>  {
>   cocoon.sendPage("access-denied");
>  }
> }
> 
> I've checked the user role on another page and it appears that they are an 
> administrator. Is there something I'm missing? Do I need to define the roles?
> 
> Sorry to bother and thanks,
> 
> Gary
> 
> *
> The information contained in this message may be confidential or 
> legally privileged and is intended for the addressee only. If you 
> have received this message in error or there are any problems 
> please notify the originator immediately. The unauthorised use, 
> disclosure, copying or alteration of this message is 
> strictly forbidden.
> *
> 
> 
> If you work for NHS Lothian and wish to have help to stop smoking, support is 
> available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494. 
>  For anyone else living/working in Lothian, please contact 0800 848484 for 
> your nearest NHS stop smoking service.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 
> 

Hi Gary,

this might help you:
http://wiki.apache.org/cocoon/AuthFWWithFlow 

It didn't help me. I have the same problem like in 
http://www.planetcocoon.com/node/1879 

However, you can use something like this:



when you call your javaflow function, and

var uid = cocoon.parameters["userid"];

in your javaflow.

Regards,
Wadim






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



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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



imagedirectory png width and height not generated?

2006-03-29 Thread Lincoln
The generator type "imagedirectory" doesn't appear to generate the
attributes "width" and "height" for png's. Gifs and jpg are fine.

Is there a workaround?
Am I doing something wrong?

Linc



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



Re: bad lookup of log4j.dtd

2006-03-29 Thread Antonio Gallardo

[EMAIL PROTECTED] escribió:


Cocoon 2.1.8 is looking for log4j.dtd in the webapp directory instead 
of the log4j jar file.


 


Would you provide more info?

Best Regards,

Antonio Gallardo.

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



Creating bookmarks with JavaFlow

2006-03-29 Thread Harlan Iverson

Hello,
I would like to port my javascript flow to JavaFlow, however I can't 
figure out how to create a bookmark from JavaFlow. In essense, I am 
looking for the JavaFlow equivalent of


var bookmark = cocoon.createWebContinuation();

I have searched, and this thread is all I was able to find on the 
subject: 
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109049896205583&w=2


Thanks,
Harlan Iverson


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



Re: binding framework and multivaluefields

2006-03-29 Thread Brian Maddy




Sweet, thanks Simone and Bruno!  That fixed it.

I'm sending this to the development list too in hopes that someone
there will know how to update the 'API notes' section of the following
page:
http://cocoon.apache.org/2.1/userdocs/widgets/widget_multivaluefield.html

Here's the line that ended up working for me:
var values =
java.lang.reflect.Array.newInstance(java.lang.Class.forName('java.lang.Long'),
3);

Thanks again!
Brian


Bruno Dumon wrote:

  In addition to this, since your multivaluefield uses "long" as datatype,
you should use java.lang.Long, not java.lang.Integer.

On Tue, 2006-03-28 at 22:18 +0200, Simone Gianni wrote:
  
  
Hi Brian,
i think java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 0); 
generates an array of int ( 
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#TYPE ), 
while the multivalued field probably needs an array of Integer, since 
internally it gets converted to an Object[] array. Maybe with java 1.5 
this would be managed by automatic boxing, but i would recommend to use 
an array of Integer.

This means writing something like var values = 
java.lang.reflect.Array.newInstance(java.lang.Integer.class, 0); (not 
sure this works perfectly in _javascript_, otherwise use 
Class.forName('java.lang.Integer') instead of java.lang.Integer.class).

Hope this helps,
Simone

Brian Maddy wrote:



  Does anyone know how to use the binding framework to set a 
multivaluefield?  My XML file has a string that is comma separated 
values that I need to load in, but I can't even get a simple array to 
work.  Here's what I have so far:

Form Definition:
   
   
   
   Unit Type(s):
   
   
   value 1
   
   
   value 2
   
   
   value 3
   
   
   

Form Binding:
   
   
var values = 
java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 0);
//values[0] = 1;
//values[1] = 2;
//values[2] = 3;
widget.setValue(values);
   
   

If I set the values variable to null, the form displays correctly, so 
everything else seems to be working.

Anyone know how to do this?

Thanks!
Brian
  

  
  
  





Re: User Roles and Flowscript

2006-03-29 Thread Wadim Kruse

Stewart, Gary wrote:

Hi there,

I've been working with the authentication resource for a while but I figured it 
was about time I implemented per role pipelines (that is some pipelines can 
only be accessed by some roles). I am using flowscript to do this but I don't 
seem to be able to get it to work. The pipeline performs an authentication 
check (I figure this would give me the session information; or is there 
something I need to do in the flow?). In the Javascript I quite simply have:

function administratorOnlyPage()
{
 var resource = cocoon.parameters.resourceRequest;
 if(cocoon.request.isUserInRole("Administrator"))
 {
  cocoon.sendPage(resource);
 }
 else
 {
  cocoon.sendPage("access-denied");
 }
}

I've checked the user role on another page and it appears that they are an 
administrator. Is there something I'm missing? Do I need to define the roles?

Sorry to bother and thanks,

Gary

*
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only. If you 
have received this message in error or there are any problems 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.

*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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




Hi Gary,

this might help you:
http://wiki.apache.org/cocoon/AuthFWWithFlow

It didn't help me. I have the same problem like in 
http://www.planetcocoon.com/node/1879


However, you can use something like this:

value="{session-context:authentication/authentication/ID}" />


when you call your javaflow function, and

var uid = cocoon.parameters["userid"];

in your javaflow.

Regards,
Wadim






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



Re: Cocoon + XQuery + SQLServer?

2006-03-29 Thread Lars Huttar

Lars Huttar wrote:

Hello,

Our web apps require us to get data out of SQLServer databases (in 
general, relational db's) as XML and integrate it with other XML data.
So far we've been using XSP/esql/SQLTransformer to get the data out as 
XML.
I'm pretty interested in trying out XQuery as an alternative, and I'm 
trying to find out if that's possible in Cocoon.


I see there is the eXist project with its XQueryGenerator 
(http://exist.sourceforge.net/api/org/exist/cocoon/XQueryGenerator.html), 
which looks perfect... but as far as I can tell, it will only connect 
to an eXist database (or a native XML database). Is that true?
One of the design goals of XQuery, and reasons for its success, is 
that it's aimed at integrating data from relational databases as well 
as from XML data sources.
Does anybody know whether XQueryGenerator could connect to a SQLServer 
instance that supports an XML view of its data, such as SQLServer 2000 
+ SQLXML, or SQLServer 2005?


I see also that SQLServer 2005 provides XQuery support via web 
services (SOAP); that might be our best bet for the time being. But 
I'm not sure how db-vendor-independent that would be.in the long run. 
(Also, SQLServer doesn't support all of XQuery, e.g. no "let", I'm 
told.) It does seem to make sense to have XQueries run on the db 
server in terms of network usage. I think.


My primary question, though, is: is it possible to run XQuery queries 
now in Cocoon that connect to a SQLServer database?


Thanks for any info,
Lars



No takers?
Anybody using Cocoon + XQuery + any relational database?

Lars


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



bad lookup of log4j.dtd

2006-03-29 Thread Fernando.Matomira








Cocoon 2.1.8 is looking for log4j.dtd in the webapp
directory instead of the log4j jar file.

 








User Roles and Flowscript

2006-03-29 Thread Stewart, Gary
Hi there,

I've been working with the authentication resource for a while but I figured it 
was about time I implemented per role pipelines (that is some pipelines can 
only be accessed by some roles). I am using flowscript to do this but I don't 
seem to be able to get it to work. The pipeline performs an authentication 
check (I figure this would give me the session information; or is there 
something I need to do in the flow?). In the Javascript I quite simply have:

function administratorOnlyPage()
{
 var resource = cocoon.parameters.resourceRequest;
 if(cocoon.request.isUserInRole("Administrator"))
 {
  cocoon.sendPage(resource);
 }
 else
 {
  cocoon.sendPage("access-denied");
 }
}

I've checked the user role on another page and it appears that they are an 
administrator. Is there something I'm missing? Do I need to define the roles?

Sorry to bother and thanks,

Gary

*
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only. If you 
have received this message in error or there are any problems 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*


If you work for NHS Lothian and wish to have help to stop smoking, support is 
available by contacting [EMAIL PROTECTED] or 0131 537 9494  - internal 49494.  
For anyone else living/working in Lothian, please contact 0800 848484 for your 
nearest NHS stop smoking service.


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



Accessing parameters in aggregated pipeline

2006-03-29 Thread Sanket Pattekar
Hi all,
 How is it possible to pass parameter to the aggregated pipelines

For e.g
Main pipeline








Aggregated pipeline




Basically I have a flowscriot variable that is accessible in the main
pipeline. I need to access the same in the aggregated pipeline. Any
help would be appreciated.

Sanket

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



Re: binding framework and multivaluefields

2006-03-29 Thread Bruno Dumon
In addition to this, since your multivaluefield uses "long" as datatype,
you should use java.lang.Long, not java.lang.Integer.

On Tue, 2006-03-28 at 22:18 +0200, Simone Gianni wrote:
> Hi Brian,
> i think java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 0); 
> generates an array of int ( 
> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#TYPE ), 
> while the multivalued field probably needs an array of Integer, since 
> internally it gets converted to an Object[] array. Maybe with java 1.5 
> this would be managed by automatic boxing, but i would recommend to use 
> an array of Integer.
> 
> This means writing something like var values = 
> java.lang.reflect.Array.newInstance(java.lang.Integer.class, 0); (not 
> sure this works perfectly in javascript, otherwise use 
> Class.forName('java.lang.Integer') instead of java.lang.Integer.class).
> 
> Hope this helps,
> Simone
> 
> Brian Maddy wrote:
> 
> > Does anyone know how to use the binding framework to set a 
> > multivaluefield?  My XML file has a string that is comma separated 
> > values that I need to load in, but I can't even get a simple array to 
> > work.  Here's what I have so far:
> >
> > Form Definition:
> >
> >
> >
> >Unit Type(s):
> >
> >
> >value 1
> >
> >
> >value 2
> >
> >
> >value 3
> >
> >
> >
> >
> > Form Binding:
> > > direction="load">
> >
> > var values = 
> > java.lang.reflect.Array.newInstance(java.lang.Integer.TYPE, 0);
> > //values[0] = 1;
> > //values[1] = 2;
> > //values[2] = 3;
> > widget.setValue(values);
> >
> >
> >
> > If I set the values variable to null, the form displays correctly, so 
> > everything else seems to be working.
> >
> > Anyone know how to do this?
> >
> > Thanks!
> > Brian

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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