Re: Getting started with C2.2 -- where's the exception information?

2009-02-03 Thread Andreas Hartmann

Klortho schrieb:



dhohls wrote:

That's a little harsh - although my impression is that C2.2 is
perhaps a step sideways in terms of how many things are
done... but that's just an impression from reading all the 
mailing list Q&A.  So far, I have not needed to take the plunge.



Yes, you're right ... too harsh.
I'm really just a newbie, but speaking as one, I think that 2.1 was a much
nicer experience out of the gate, which is pretty damn important for an
application to gain wider acceptance.


BTW, there's also a different viewpoint:



For us, as a project depending on Cocoon, it is crucial that Cocoon 
doesn't cling to "dead" (as in language) concepts and frameworks as XSP 
and Avalon, however proven and stable they may be. To attract new 
community members, it's very important to keep looking beyond one's own 
nose and stay in touch with current trends in the Java world. Putting 
"Based on Maven and Spring" on your homepage sounds much better at the 
moment than "Based on Ant and Avalon". And we shouldn't be afraid of 
learning – familiar concepts often seem to be easier to understand than 
new ones.




Just my $0.02.

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Getting started with C2.2 -- where's the exception information?

2009-02-03 Thread Andreas Hartmann

Hi Derek,

Derek Hohls schrieb:

[…]

I agree from a *marketing* perspective that putting buzzwords 
on your site is a way to attract new users - especially those who
might otherwise be going to .NET or Ruby-on-Rails - not that I mean 
to  imply the developers are doing this for that reason alone.  

However, there is also such a thing as a "legacy" application; 
while you (or others) might think that languages such as COBOL,
FORTRAN, Pascal etc are "dead", I can almost guarantee you 
there are millions of lines of code in those tools being written
or maintained every year (C# notwithstanding). 

There are many of us who have been using Cocoon for many 
years now, and I would really hate to think we'll just be dumped 
because some new ideas or support frameworks have emerged.


do you have the feeling that the 2.1 branch is not sufficiently 
supported anymore? If I understand Betrand correctly, it is officially 
in maintenance mode and it is not planned to cease support. We (the 
Lenya community) are certainly going to need it for another couple of 
years, so we'll be bound to maintain it.




Personally, I'd also like to see the documentation develop and
mature a little more - there are certainly *lots* of "getting started"
questions in the ML about 2.2 - and a book or half would also 
provide some reassurance that a solid new ship is ready for all

types of sailors.


+1


So yes, I am prepared to learn - no doubt I will have to - but it
does not yet feel the right time for what appears to require a 
significant upheaval.


Sorry if my mail caused any offence or could be taken personally, that 
was not my intention. I only wanted to express the viewpoint of another 
type of Cocoon user – the projects which depend on it.


Thanks for your reply!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[C2.2] StandaloneServiceSelector not found

2009-02-05 Thread Andreas Hartmann

Hi Cocooners,

when debugging in Eclipse, I get an error that some Avalon 
configurations could not be read due to the missing 
StandaloneServiceSelector class. It affects the configurations of the 
faces and taglib impl modules.


Is the configuration outdated? I couldn't find the 
StandaloneServiceSelector class anywhere. Or did I miss something?


TIA!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [C2.2] StandaloneServiceSelector not found

2009-02-06 Thread Andreas Hartmann

Hi Grzegorz,

Grzegorz Kossakowski schrieb:

Andreas Hartmann pisze:

Hi Cocooners,

when debugging in Eclipse, I get an error that some Avalon
configurations could not be read due to the missing
StandaloneServiceSelector class. It affects the configurations of the
faces and taglib impl modules.


[…]


So it looks like you are hitting something rather old that have been already 
renamed. I don't have a time to drudge Git
a little bit more but still I hope this gave you some clue how to dig into this.


thanks a lot for this info! For the moment I have removed the offending 
modules from the debugging classpath, but maybe I find the time to take 
a closer look at the issue.


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Cannot resolve reference to bean SourceResolver in unit test

2009-02-10 Thread Andreas Hartmann

Hi Cocooners,

I'm trying to get some tests to run which rely on a components which 
uses the source resolver.


The component is declared in lenya-core-ac-components.xml as follows:

  
ref="org.apache.excalibur.source.SourceResolver"/>
ref="org.apache.lenya.cms.publication.Repository"/>

  

In my (TestClassName).spring.xml I reference the bean configuration file 
like this:


  resource="classpath:META-INF/cocoon/spring/lenya-core-ac-components.xml"/>


But I get the error

Cannot resolve reference to bean 
'org.apache.excalibur.source.SourceResolver' while setting bean property 
'sourceResolver'; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
named 'org.apache.excalibur.source.SourceResolver' is defined



Could this be a problem of a missing dependency? The 
cocoon-template-impl tests seem to rely on components which use the 
source resolver as well, and I couldn't find a difference in my 
configuration.


TALIA!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [2.2] Cannot resolve reference to bean SourceResolver in unit test

2009-02-11 Thread Andreas Hartmann

Andreas Hartmann schrieb:

Hi Cocooners,

I'm trying to get some tests to run which rely on a components which 
uses the source resolver.


The component is declared in lenya-core-ac-components.xml as follows:

  
ref="org.apache.excalibur.source.SourceResolver"/>
ref="org.apache.lenya.cms.publication.Repository"/>

  

In my (TestClassName).spring.xml I reference the bean configuration file 
like this:


  resource="classpath:META-INF/cocoon/spring/lenya-core-ac-components.xml"/>


But I get the error

Cannot resolve reference to bean 
'org.apache.excalibur.source.SourceResolver' while setting bean property 
'sourceResolver'; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
named 'org.apache.excalibur.source.SourceResolver' is defined



Could this be a problem of a missing dependency? The 
cocoon-template-impl tests seem to rely on components which use the 
source resolver as well, and I couldn't find a difference in my 
configuration.


For the record, I "solved" it by adding an .xtest file with the 
declaration of the SourceResolver role and the required source 
factories. Isn't there a non-Avalon way to achieve this?


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Test configuration

2009-02-11 Thread Andreas Hartmann

Hi Cocooners,

according to http://cocoon.apache.org/636_1_1.html, for each unit test 
class one or two configuration files (.spring.xml and/or .xtest) have to 
be created. This works, but since the files contain a lot of boilerplate 
declarations (roles, source factories etc.) a lot of redundant code is 
created. At least the .spring.xml files can work with includes, so one 
can collect the declarations in a single file. But I don't know if the 
.xtest files support something simliar.


Is it really necessary to create these files for each and every test class?

TIA for any hints!

-- Andreas

--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Spring class loading issue: WebAppClassLoader vs. ResourceStoreClassLoader

2009-02-19 Thread Andreas Hartmann

Hi Cocooners,

in my C2.2 application, I have two modules "usecase" and "acusecases", 
with acusecases depending on usecase. usecase is a block, acusecases isn't.


A bean in acusecases shall get a reference to another bean defined in 
acusecases. The class of this bean is declared in usecase.


Now I get the following exception:

org.springframework.beans.TypeMismatchException: Failed to convert 
property value of type [org.apache.lenya.cms.usecase.UsecaseView] to 
required type [org.apache.lenya.cms.usecase.UsecaseView] for property 'view'


Since the class is the same, the classloader is the source of the 
problem. Using the debugger I found out that the bean (from the 
acusecases module) is loaded using a WebAppClassLoader, but the class

(from the usecase module) is loaded using a ResourceStoreClassLoader.

Firing up Jetty with 
-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true doesn't help.


Any hints how to solve this issue?

TIA!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [2.2] Spring class loading issue: WebAppClassLoader vs. ResourceStoreClassLoader

2009-02-19 Thread Andreas Hartmann

Andreas Hartmann schrieb:

Hi Cocooners,

in my C2.2 application, I have two modules "usecase" and "acusecases", 
with acusecases depending on usecase. usecase is a block, acusecases isn't.


A bean in acusecases shall get a reference to another bean defined in 
acusecases. The class of this bean is declared in usecase.


Now I get the following exception:

org.springframework.beans.TypeMismatchException: Failed to convert 
property value of type [org.apache.lenya.cms.usecase.UsecaseView] to 
required type [org.apache.lenya.cms.usecase.UsecaseView] for property 
'view'


Since the class is the same, the classloader is the source of the 
problem. Using the debugger I found out that the bean (from the 
acusecases module) is loaded using a WebAppClassLoader, but the class

(from the usecase module) is loaded using a ResourceStoreClassLoader.


The issue could be resolved by removing the usecase block from 
rcl.properties. Apparently it's not possible to mix non-RCL projects 
with RCL-enabled blocks. Is this the case?


Thanks for any comments,

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Why are some projects not installed?

2009-02-23 Thread Andreas Hartmann

Hi Cocooners,

when I build the current trunk, some projects are not installed, for 
instance


* cocoon-serializers-charsets
* cocoon-serializers-impl
* cocoon-validation-impl
* cocoon-chaperon-impl

The artifacts also don't seem to be available in the online repositories.

Since I use them in another project, I have to invoke "mvn install" in 
these individual project directories. Is this intended? If not – what 
needs to be done to solve this issue? Or is something wrong with my setup?


TIA!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [2.2] Why are some projects not installed?

2009-02-23 Thread Andreas Hartmann

Hi Grzegorz,

Grzegorz Kossakowski schrieb:

Andreas Hartmann pisze:

Hi Cocooners,

when I build the current trunk, some projects are not installed, for
instance

* cocoon-serializers-charsets
* cocoon-serializers-impl
* cocoon-validation-impl
* cocoon-chaperon-impl

The artifacts also don't seem to be available in the online repositories.

Since I use them in another project, I have to invoke "mvn install" in
these individual project directories. Is this intended? If not – what
needs to be done to solve this issue? Or is something wrong with my setup?


Hi Andreas,

Try
mvn -P allblocks

this will enable build process for all blocks. By convention blocks that are 
disabled by default are those not
officially released.


thanks a lot – one minute ago I also remembered this, but the mail was 
already on its way, sorry for the noise :)



Any help on getting more blocks released is greatly appreciated.


Is there a documentation what needs to be done? I guess it's mainly a 
matter of testing?


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] java.lang.NoClassDefFoundError: org/mozilla/javascript/continuations/Continuation

2009-02-23 Thread Andreas Hartmann

Hi Cocooners,

apparently I broke something in my application. Unfortunately I can't 
recall what I changed that could have caused this issue. It looks like 
Rhino is not on the classpath. Maybe some classloader problem? All I can 
tell is that the sitemap + flowscript already worked.


I remember adding the Spring configurator namespace to some bean 
declaration files to enable placeholder processing, but I can't imagine 
that there is a relation …


java.lang.NoClassDefFoundError: 
org/mozilla/javascript/continuations/Continuation

at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)
	at 
org.mozilla.javascript.FunctionObject.getMethodList(FunctionObject.java:268)
	at 
org.mozilla.javascript.ScriptableObject.defineClass(ScriptableObject.java:784)
	at 
org.mozilla.javascript.ScriptableObject.defineClass(ScriptableObject.java:747)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.init(FOM_Cocoon.java:210)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.initialize(FOM_JavaScriptInterpreter.java:184)
	at 
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:245)
	at 
org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:256)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

at java.security.AccessController.doPrivileged(Native Method)
	at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:238)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:238)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	at 
org.apache.cocoon.core.container.spring.avalon.AvalonServiceManager.lookup(AvalonServiceManager.java:61)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.FlowNode.service(FlowNode.java:60)
	at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:166)
	at 
org.apache.cocoon.components.LifecycleHelper.setupComponent(LifecycleHelper.java:109)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.setupNode(SitemapLanguage.java:448)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.FlowNodeBuilder.buildNode(FlowNodeBuilder.java:53)


TIA for any hints!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[Solved] [2.2] java.lang.NoClassDefFoundError: org/mozilla/javascript/continuations/Continuation

2009-02-23 Thread Andreas Hartmann

Hi Grzegorz,

thanks for your reply!

Grzegorz Kossakowski schrieb:

Andreas Hartmann pisze:

apparently I broke something in my application. Unfortunately I can't
recall what I changed that could have caused this issue. It looks like
Rhino is not on the classpath. Maybe some classloader problem? All I can
tell is that the sitemap + flowscript already worked.

I remember adding the Spring configurator namespace to some bean
declaration files to enable placeholder processing, but I can't imagine
that there is a relation …

java.lang.NoClassDefFoundError:
org/mozilla/javascript/continuations/Continuation
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)


This looks like a classpath issue but quite strange one.

How do you start your Cocoon application? With mvn jetty:run?


Yes, I'm using jetty:run. But I have now found the source of the 
problem: The offending change was enabling a block in my application 
that had a dependency to cocoon-batik-impl. This module uses Rhino 
1.5R4.1, but the flowscript module needs 1.6R7. I guess the Continuation 
class didn't exist in 1.5R4.1 yet.


Anyway, after adding the exclusion declaration to the cocoon-batik-impl 
POM to avoid the transitive dependency, it works again:



  batik
  batik-script
  

  rhino
  js

  


Shall I commit this change?

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Passing "parameters" to mounted sub-sitemaps

2009-02-26 Thread Andreas Hartmann

Hi Klortho,

Klortho schrieb:

I'm sure this is a dumb question, but I'm kind of a newbie, and have just
spent hours looking for the answer in various books, and searching this
forum, and can't find it.

I'm trying to vary the look of my final output depending on where the source
files are stored.  I have a resource-exists selector that decides whether to
mount a sub-sitemap from one location or another.  Then, I want to pass
something down to the sub-sitemap so that it can pass it along to the
stylesheets, so that I can get a different background color depending on the
source tree's physical location.

I tried pretty brain-dead ideas like using  in my
parent sitemap, and then a parameter selector in the child, but then I read
that the parameter selector is only for parameters from actions or for url
segments from matchers.

Isn't there a canned action that will just let me set a parameter of my
choosing with a value of my choosing?  Or, what's the right way to do this?


how about something like this?

Main Sitemap:


   (location)

  


  

  



  



Sub Sitemap:


  …
  
    
  
  …



-- Andreas

--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Send a parameter from a Java class to the sitemap

2009-02-26 Thread Andreas Hartmann

Magnus Haraldsen Amundsen schrieb:

Hi,



How do I send a parameter from a Java class to the sitemap?


What exactly do you mean with "send to the sitemap"? Usually the sitemap 
is the entry point into processing, so you rather pull a parameter from 
a Java class (e.g. via an InputModule.)


Or are you calling an internal pipeline from a Java class via the 
SourceResolver?


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Passing "parameters" to mounted sub-sitemaps

2009-02-26 Thread Andreas Hartmann

Klortho schrieb:

Good stuff, thanks!  You gave me the general idea -- an internal redirect
with the parameter stuffed into the internal URL.  I had to change your code
a bit to get it to work, here's what I came up with:

Main sitemap:


  

  

  
  

  
  
  

  

  

  

Sub-sitemap:

  


  


  

It's pretty ugly, though, I think.  Isn't there a (relatively) easy way to
set, say, a request parameter that would be visible in the sub-sitemap?


I don't think it's that ugly – maybe the pipeline concept just takes a 
bit getting used to when you're new to Cocoon. IMO passing parameters in 
URLs is a good practise since this way you create a "pipeline API" that 
helps others to understand the code.


Another approach would be to attach the color value to the current 
request as a request attribute. AFAIK there is an action and an input 
module for this purpose.


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: question regarding cocoon protocols (css file not found depending on match pattern)

2009-02-27 Thread Andreas Hartmann

Hi Robby,

Robby Pelssers schrieb:

[…]

Inside the page.jx (my page template) I have following reference to the 
css file.





why do you use a relative link here? Shall the CSS depend on the context?

If not, I'd rather recommend



HTH,

-- Andreas




 

The problem I am facing is that the pagetemplate is not always generated 
from the same match pattern.


 


E.g. pattern=”index.html”  or pattern=”main/released/product/xyz”

 

This causes that my css file is not found. No pipeline matched request: 
main/released/product/css/styles.css


 

 

Can’t I use some cocoon protocol that indicates that the file has to be 
searched from COB-INF as the context folder?  And if there is no such 
protocol, what is the best way to handle this issue?


 


Cheers,

Robby Pelssers

 




--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Database connectivity

2009-03-04 Thread Andreas Hartmann

Hi Krishna,

Krishna Thokala schrieb:

Hi,
I am using cocoon in lenya,when am connecting to database with oracle 
getting errors ,

it is possible or not in lenya /cocoon with oracle,please suggest me.


if you're still referring to the errors you mentioned on the Lenya 
mailing list: These are not related to your Oracle DB connection, but to 
your Cocoon sitemap setup. See Thorsten's reply.


Are you confident about the Oracle integration approach you have 
started? If not – maybe it would help if you could give some more 
details about what you want to achieve with this DB connection. Do you 
want to store Lenya documents in the DB? Do you want to display some 
data on web pages?


-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Database connectivity

2009-03-04 Thread Andreas Hartmann

Hi Krishna,

Krishna Thokala schrieb:


Yes,I want to store lenya docs in DB and display the data on web pages.


in this case this thread should be continued on the Lenya users list.

Just a short remark: Are you aware that Lenya doesn't support database 
back-ends? Are you planning to implement a DB back-end for Lenya? This 
would be a very complex task. Are there any particular benefits you are 
hoping to achieve?


-- Andreas




I configured in web.xml and cocoon.xconf require information,but i didnot
configure in sitemap ,how can i configure?

Thanks,
krishna.
-Original Message-
From: news [mailto:n...@ger.gmane.org] On Behalf Of Andreas Hartmann
Sent: Wednesday, March 04, 2009 7:17 PM
To: users@cocoon.apache.org
Subject: Re: Database connectivity

Hi Krishna,

Krishna Thokala schrieb:

Hi,
I am using cocoon in lenya,when am connecting to database with oracle 
getting errors , it is possible or not in lenya /cocoon with 
oracle,please suggest me.


if you're still referring to the errors you mentioned on the Lenya mailing
list: These are not related to your Oracle DB connection, but to your Cocoon
sitemap setup. See Thorsten's reply.

Are you confident about the Oracle integration approach you have started? If
not - maybe it would help if you could give some more details about what you
want to achieve with this DB connection. Do you want to store Lenya
documents in the DB? Do you want to display some data on web pages?

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Spring bean for action src

2009-03-04 Thread Andreas Hartmann

Hi Paul,

Schenk, Paul (SD/DS-Accenture) schrieb:

Hello,

We are trying to develop a Cocoon 2.2 application. We have developed a 
few 2.1 apps already. We are struggling with using a spring bean for an 
action.


We’d like to do something like:

(in sitemap.xmap)

  



  src="org.apache.cocoon.acting.HttpCacheAction">


  2

  

  



  

We define the bean in applicationContext.xml:




I'm not sure, but I think that has to read

class="com.gnb.forms.LinkForm">


Then you should be able to reference the action with the name "LinkForm" 
in your sitemap, without additionally declaring it in the 
 section.


-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: problem to display pdf throw the browser

2009-07-01 Thread Andreas Hartmann

Hi Luc,

Luc NADDEO schrieb:

Hello,

We've got problem when we try to display relatively big file in pdf (for 
instance 1,7Mo)


The browser/pdf displayer (acrobat) halt to load after annoncing 1/3 loaded

If we use the simple "right-click option/dowload this file", it works 
fine anf fast.


Why ?


that could be related to the byte-ranges issue (incremental loading).
Maybe this helps:

http://redarrow.textdrive.com/article/34/troubles-with-serving-pdfs

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Register cocoon:/ protocol to be accessible from Batik

2009-07-24 Thread Andreas Hartmann

Hi everyone,

I'd like to enable Batik to resolve cocoon:/ URIs in xlink references.

Just some quick questions to avoid spending time on a dead end:

* Has this been done already with Cocoon 2.2?
* Is JNet [1] the way to go?

TIA for any pointers!

[1] http://cocoon.apache.org/subprojects/jnet/1.0/1468_1_1.html

-- Andreas

--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Include additional file in block webapp

2009-08-04 Thread Andreas Hartmann

Hi everyone,

I'd like to include an additional file in my block webapp. I tried the 
following configuration:



  org.apache.cocoon
  cocoon-maven-plugin
  
…
  
  
${basedir}/src/main/webapp
  


But the file isn't copied

from  src/main/webapp/WEB-INF/
totarget/rcl/webapp/WEB-INF/

Thanks for any hints!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] LinkageError: WebAppClassLoader vs. ResourceStoreClassLoader

2009-10-28 Thread Andreas Hartmann

Hi everyone,

when using the RCL classloader I just can't get rid of this error:

java.lang.LinkageError: loader constraint violation in interface itable 
initialization: when resolving method 
"mypackage.BatchProcessManagerImpl.prepareListenerProcess(Ljava/lang/String;Lmypackage.Invoker;)Lmypackage.ListenerBatchProcess;" 
the class loader (instance of 
org/apache/commons/jci/stores/ResourceStoreClassLoader) of the current 
class, mypackage/BatchProcessManagerImpl, and the class loader (instance 
of org/mortbay/jetty/webapp/WebAppClassLoader) for interface 
mypackage/BatchProcessManager have different Class objects for the type 
mypackage/Invoker used in the signature



It occurs immediately for the first request after starting up Jetty. 
What could be the reason that the interface is loaded by the 
WebAppClassLoader and the implementation by the 
ResourceStoreClassLoader? Problably a Spring thing …


Any hints would be very welcome!

Thanks a lot in advance,

-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [2.2] LinkageError: WebAppClassLoader vs. ResourceStoreClassLoader

2009-10-28 Thread Andreas Hartmann

Andreas Hartmann schrieb:

Hi everyone,

when using the RCL classloader I just can't get rid of this error:

java.lang.LinkageError: loader constraint violation in interface itable 
initialization: when resolving method 
"mypackage.BatchProcessManagerImpl.prepareListenerProcess(Ljava/lang/String;Lmypackage.Invoker;)Lmypackage.ListenerBatchProcess;" 
the class loader (instance of 
org/apache/commons/jci/stores/ResourceStoreClassLoader) of the current 
class, mypackage/BatchProcessManagerImpl, and the class loader (instance 
of org/mortbay/jetty/webapp/WebAppClassLoader) for interface 
mypackage/BatchProcessManager have different Class objects for the type 
mypackage/Invoker used in the signature



It occurs immediately for the first request after starting up Jetty. 
What could be the reason that the interface is loaded by the 
WebAppClassLoader and the implementation by the 
ResourceStoreClassLoader? Problably a Spring thing …



I just noticed that I had a similar issue before, but back then the 
interface and implementation were located in different blocks where one 
was loaded by the RCL and the other one by the WebAppClassLoader. This 
time both interface and class are located in the same block which should 
be loaded by the RCL:


mypackage.batch.service%classes-dir=../batch/target/classes

Any suggestions are greatly appreciated.

-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] java.io.NotSerializableException: org.apache.cocoon.servletservice.ServletServiceContext

2009-11-11 Thread Andreas Hartmann

Hi everyone,

I get this error when Tomcat tries to serialize the session:

java.io.NotSerializableException: 
org.apache.cocoon.servletservice.ServletServiceContext

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
	at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)

at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
	at 
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)

at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
	at 
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1517)



Any ideas why the ServletServiceContext is attached to the session?

Thanks a lot for any hints!

-- Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



[2.2] Configure logging for tests

2009-11-23 Thread Andreas Hartmann

Hi everyone,

I'm using Cocoon 2.2.
How do I configure the logging output for my unit tests?

This tutorial helped me a lot for the web application, but it doesn't 
seem to work for the tests …

http://happygiraffe.net/blog/2008/08/27/logging-in-cocoon-22/

Thanks a lot for any hints!

Best regards,
Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: [2.2] Configure logging for tests

2009-11-23 Thread Andreas Hartmann

Hi Dominic,

thanks a lot for your reply!

Dominic Mitchell schrieb:
On Mon, Nov 23, 2009 at 3:41 PM, Andreas Hartmann <mailto:andr...@apache.org>> wrote:



I'm using Cocoon 2.2.
How do I configure the logging output for my unit tests?


[…]


* Set up maven to invoke the tests in a forked JVM, and pass in the
  log4j.configuration system property.  Look at the docs for the
  surefire plugin
  
<http://maven.apache.org/plugins/maven-surefire-plugin/examples/system-properties.html>.


I chose this option. Here's what works for me:


  
org.apache.maven.plugins
maven-surefire-plugin

  

  log4j.configuration
  file://${project.basedir}/etc/log4j.xml

  

  


Thanks again and best regards,

-- Andreas

--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Detecting mobile browsers and redirecting

2011-05-09 Thread Andreas Hartmann

Am 09.05.11 14:02, schrieb Mike Sickler:


I also posted this question to
http://stackoverflow.com/questions/5849929/how-do-i-configure-cocoon-to-redirect-mobile-browsers-to-a-mobile-site
StackOverflow :

I have two Cocoon sites: ABC and ABC-mobile.

If the user is coming from a mobile browser, then I want them redirected to
ABC-mobile. How do I accomplish this?


http://wurfl.sourceforge.net/njava/

We used this in an application based on Cocoon 2.1. The redirect is 
determined using a custom Selector. You can use the code example from 
the website.


HTH,

-- Andreas



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Cocoon caching with multiple pipelines

2011-05-09 Thread Andreas Hartmann

Hi Robin,

Am 27.04.11 12:49, schrieb Robin Taylor:

It looks like the default generator is an extension of FileGenerator
that I assume takes as input the output from the  step in the preceding pipeline.


what do you mean with "preceding pipeline"? What exactly does the custom 
FileGenerator use as the source? A hard-coded cocoon:/ call?




I also assume therefore
that the FileGenerator uses the incoming xml to build its validity
object and therefore spots that it has changed ?


No, the standard FileGenerator uses the validity of the source. The 
incoming XML cannot be used, since it would have to be re-generated to 
spot changes, which kind-of renders the caching mechanism useless. 
Typical source validities are based on last modification dates, 
expiration times and similar concepts. Example: If you pass a file URI 
to the FileGenerator, the last modification date of the file is used. If 
you pass a cocoon:/ URI to the generator, the validity of the 
corresponding SitemapSource (representing the result of the called 
pipeline) is used.


HTH,

-- Andreas




Thanks again.



On Wed, 2011-04-27 at 10:54 +0100, Thorsten Scherler wrote:

On Wed, 2011-04-27 at 09:41 +0100, Robin Taylor wrote:

Hi Thorsten,

Thanks again and apologies for drip-feeding the questions.

In the code I'm looking at it appears the second pipeline has an empty
map:generate ie.. I assume this results in the second
pipeline using the output from the first pipeline.


no, a  means cocoon uses the default generator
configured for this sitemap.

If is does not uses a src is most likely a "special" generator such as
e.g.  http://cocoon.apache.org/2.1/userdocs/request-generator.html

Using that as an example:

  
  
 
  

...


   
   


As you see the  would here generate a xml representation
of the request and not use a former match/pipeline as input.

salu2



--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: validating xml

2011-05-09 Thread Andreas Hartmann

Hi Robby,

Am 14.04.11 13:43, schrieb Robby Pelssers:

Hi all,

i've got an interesting use case where my starting point is XML data (could be 
1 single file, aggregated xml data, xquery results, ...)

 From this input I have to generate a DITA map and topics for which I have a 
map.dtd and topic.dtd which I  can use for validation purposes.


At some point in time during all transformation steps I have something like 
below simplified snippet immediately before I want to use the source-writing 
transformer.  I need to validate the map and topics before writing the files to 
disc.

   ...
   ...
   ...
   ...



I can't simply use the approach below
  (similar for map) 
since I still have an aggregated situation.

Did anyone ever have a similar situation and a solution for this?

Ideally the org.apache.cocoon.transformation.ValidatingTransformer could handle 
an optional xpath expression to specify which nodes to treat as rootnodes for 
validation.

Would this approach work?


yes, I assume that this approach would work.

A relatively simple alternative would be to modularize the page 
generation. The drawback is probably a decreased performance, especially 
when generating the initial XML is expensive.


1. Transform the initial XML data into an XML structure containing 
include tags for the single fragments which need to be validated (map, 
topic etc.)


2. The include transformation calls a separate pipeline for each 
fragment type; these pipelines contain the validation transformation 
step. Unfortunately, the initial XML needs to be re-generated in each of 
these calls.


Maybe this works for you?

Best regards,
Andreas


--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



New lists at gmane

2003-07-03 Thread Andreas Hartmann
Hi Cocoon users,

does anyone know how we can update the list address at gmane?

Andreas

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


Resolving sources relative to webapp context

2003-07-08 Thread Andreas Hartmann
Hi Cocoon users,

I'm instantiating a custom component inside an action.
In this component, I want to resolve a path to a source:
resolver = (SourceResolver)
   manager.lookup(SourceResolver.ROLE);
source = resolver.resolveURI(configurationDirectoryPath);
This way, the source is resolved relatively to the
sitemap. Is it possible to get the source relative to
the webapp context?
The configurationDirectoryPath shall be defined in
cocoon.xconf, like e.g. in the EntityResolver.
I looked into the excalibur.DefaultEntityResolver class,
but didn't find a hint how the implementation is different.
Thanks in advance!
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Resolving sources relative to webapp context

2003-07-08 Thread Andreas Hartmann
Andreas Hartmann wrote:

Is it possible to get the source relative to
the webapp context?
I found out that I can use the context:// protocol
in cocoon.xconf. This solves my problem.
Andreas

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


Re: CLI execution problem

2003-07-11 Thread Andreas Hartmann
Hassan Abolhassani wrote:

> I am trying to generate a site with Cocoon CLI. Everything is fine except I get 
> following error:
> 
> org.apache.avalon.framework.component.ComponentException: 
> UnnamedSelector: ComponentSelector could not find the component for hint []

> Environment is: Windows 2000, Tomcat 4.1, JDK 1.4.1, Cocoon 2.0.4.

I had the same problem with 2.0.4, switching to 2.1 solved it.

Andreas


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



Re: SourceResolver in Serializer

2003-07-16 Thread Andreas Hartmann
Irving Salisbury III wrote:

Any chance I can get a handle to a SourceResolver from inside a 
Serializer?  I am using cocoon-2.0.4.
Implementing Serviceable and asking the ServiceManager for a
SourceResolver should probably work (I don't know if it has to be
Composable/ComponentManager in 2.0.4).
HTH,
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect problems

2003-07-16 Thread Andreas Hartmann
Bert Van Kets wrote:

I'm using Cocoon 2.1 M3.
I've got several subdirectories in my site and would like to map the 
requests to the directory with and without a trailing slash to a 
pipeline.  The one without the slash is pretty easy, but I can't get the 
one with the trailing slash to work.
So I'd like to redirects http://mydomain/mydir/ to 
http://mydomain/mydir/index.html

When I try


[...]

to catch the "h" directory, I get a redirect to /h/h/index.html
If the URL does not start with a slash it is interpreted relatively:
h/ + h/index.html = h/h/index.html
Why don't you redirect to index.html in this case:


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


Matching cocoon protocol requests

2003-07-17 Thread Andreas Hartmann
Hi list,

is there a matcher that matches only cocoon:// requests
or can be configured to do so? Or is there a reliable
way to distinguish internal from external requests when
implementing such a matcher?
Thanks in advance!
Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Matching cocoon protocol requests

2003-07-17 Thread Andreas Hartmann
Geoff Howard wrote:

Andreas Hartmann wrote:

Hi list,

is there a matcher that matches only cocoon:// requests
or can be configured to do so? Or is there a reliable
way to distinguish internal from external requests when
implementing such a matcher?


That's what "Internal Only" pipelines are for.
Thanks! - strange that I didn't consider that.

Andreas





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


Re: Matching cocoon protocol requests

2003-07-17 Thread Andreas Hartmann
Geoff Howard wrote:

Andreas Hartmann wrote:

Hi list,

is there a matcher that matches only cocoon:// requests
or can be configured to do so? Or is there a reliable
way to distinguish internal from external requests when
implementing such a matcher?


That's what "Internal Only" pipelines are for.
Thanks! - strange that I didn't consider that.

Andreas



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


Re: [HELP]Language Exception

2003-07-23 Thread Andreas Hartmann
Geoff Howard wrote:

Nicolas Spilman wrote:
...
// start error (lines 67-67) "Default constructor cannot handle exception
type ParameterException thrown by implicit super constructor. Must 
define an
explicit constructor"
  String letter = parameters.getParameter("letter");

// end error


I think this is just because parameters.getParameter(String) throws an 
exception which you are not catching.  An alternative is to use the 
version with a default parameters.getParameter(String, String) which 
does not throw the exception.

Why it gave the specific exception you see I don't quite know.
It's because the declaration is in the class body and therefore
executed in the default constructor (which does not handle this
exception).
Andreas



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


Re: html templates - best practise

2003-10-03 Thread Andreas Hartmann
Andreas Bohnert wrote:

Hi,
 
i read a lot of tutorials and docs about cocoon and i really like it, 
but I still don't know, what's the best practise to handle html templates.
[...]

Maybe these pages could be interesting for you:

http://www.cocooncenter.org/articles/stylefree.html
http://wiki.cocoondev.org/Wiki.jsp?page=LayoutTemplatePattern
Andreas



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


Re: html templates - best practise

2003-10-03 Thread Andreas Hartmann
Bertrand Delacretaz wrote:

Le Vendredi, 3 oct 2003, à 14:41 Europe/Zurich, Derek Hohls a écrit :

...My feeling is that use of Cocoon must change some aspects
of how you work... if you do not want to change, then maybe
stick to JSP or other template-type systems?...
I didn't follow the beginning of this discussion, but wouldn't a 
technique like the "style-free XSLT" presented in 
http://www.xml.com/lpt/a/2000/07/26/xslt/xsltstyle.html allow one to 
work with "visible" HTML templates, even if doing the transformations in 
XSLT?

I haven't used this yet but the idea looks really interesting.
Actually, it is extremely useful. Some Lenya publications are using
it, and the major benefit is the separation of real XHTML layout
and presentation logic. The XSLTs become more readable and maintenance
is simplified. The cocooncenter article I mentioned in my previous
mail to this thread is based on exactly this xml.com article.
Andreas



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


Re: html templates - best practise

2003-10-03 Thread Andreas Hartmann
Derek Hohls wrote:

This is all true; but a stylesheet is still a stylesheet,
and it seems that the original poster wanted to be
able to use something very close to template-type
HTML so that the page desigers would not have to
do anything related to XML and XSL... maybe XHTML
and  statements are the way to go??
The mentioned approaches use XHTML templates with some
markup to include dynamic parts. The page designers see
nothing but XHTML. The stylesheet is only used to apply
the template.
Andreas

 
Derek

 >>> [EMAIL PROTECTED] 03/10/2003 02:58:02 >>>
Bertrand Delacretaz wrote:
 > Le Vendredi, 3 oct 2003, à 14:41 Europe/Zurich, Derek Hohls a écrit :
 >
 >> ...My feeling is that use of Cocoon must change some aspects
 >> of how you work... if you do not want to change, then maybe
 >> stick to JSP or other template-type systems?...
 >
 > I didn't follow the beginning of this discussion, but wouldn't a
 > technique like the "style-free XSLT" presented in
 > _http://www.xml.com/lpt/a/2000/07/26/xslt/xsltstyle.html_ allow one to
 > work with "visible" HTML templates, even if doing the transformations in
 > XSLT?
 >
 > I haven't used this yet but the idea looks really interesting.
Actually, it is extremely useful. Some Lenya publications are using
it, and the major benefit is the separation of real XHTML layout
and presentation logic. The XSLTs become more readable and maintenance
is simplified. The cocooncenter article I mentioned in my previous
mail to this thread is based on exactly this xml.com article.
Andreas



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

--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean.
Mailscanner thanks transtec Computers  for 
their support.


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


Re: [HELP]Could not setup pipeline in subsitemap

2003-10-05 Thread Andreas Hartmann
Marc Fasel wrote:

[...]



The attribute name should be "src".
I guess the SourceResolver tries to resolve an empty
URL string and produces the error.
Andreas



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


JenaException (encountered EOF)

2003-10-10 Thread Andreas Hartmann
Hi Cocoon users,

since we upgraded Lenya to Cocoon 2.1.2, during Tomcat startup
a lot of the JenaExceptions are thrown (you find a part of the
stack trace below).
What could this mean?

Thanks,
Andreas
-

com.hp.hpl.jena.shared.JenaException: rethrew: {E201} Syntax error when 
processi
ng .
Input to RDF parser ended prematurely. This is often related to an XML 
parser ab
ort.
Encountered  Was expecting one of:
XML ELEMENT CONTENT

start element rdf:RDF
start element rdf:Description
general start element tag
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:231)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:256)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:173)
at 
com.hp.hpl.deli.VocabularyConfig.schemaProcess(VocabularyConfig.java:
250)
at 
com.hp.hpl.deli.VocabularyConfig.(VocabularyConfig.java:105)
at com.hp.hpl.deli.Vocabulary.(Vocabulary.java:37)
at 
com.hp.hpl.deli.Workspace$1$CreateWorkspace.(Workspace.java:191
)
at com.hp.hpl.deli.Workspace.configure(Workspace.java:367)
at 
org.apache.cocoon.components.deli.DeliImpl.initialize(DeliImpl.java:1
48)
at 
org.apache.avalon.framework.container.ContainerUtil.initialize(Contai

[...]



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


Re: JenaException (encountered EOF)

2003-10-10 Thread Andreas Hartmann
Stephanie Zohner wrote:

Hi,

I have the same errors in my console but (in my case) Cocoon is still
working.
Yet I haven't found a solution. Let me know if there is one!
Yes, Cocoon is still working, also for me.
When I find a solution I'll post it to this thread.
Andreas



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


Re: multiple XML file input

2003-10-10 Thread Andreas Hartmann
Horsfield, Peter A. wrote:

I didn't actually convert XML into SVG but we did this:

  Pipeline 1Pipeline 2
  ====
  SVG Drawing  Good/Bad XML Data
|   |
\   __/
Merge XSLT
   |
   Serialize SVG/PNG
We used the document() function to read secondary XML data 
into the XSLT. Then we modified the SVG based on the data.
AFAIK it's generally not recommended to use the document()
function in Cocoon, but rather aggregation:
http://cocoon.apache.org/2.1/userdocs/concepts/sitemap.html#Aggregating

because document() breaks "Separation of Concerns"
(the XML processing setup is managed by the sitemap).
Andreas



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


Re: choose a random image

2003-10-14 Thread Andreas Hartmann
Bertrand Delacretaz wrote:

Le Mardi, 14 oct 2003, à 13:34 Europe/Zurich, Jon Evans a écrit :

...I can use a directory generator to give me a list of images, but I 
don't know how to transform that list in order to select one of them 
at random.


The easiest thing that comes to mind is an XSLT transform, using java 
extensions to call java.util.Random to generate a random selection index.
What about the RandomNumberModule?

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RandomNumberModule.html

Andreas



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


Re: choose a random image

2003-10-14 Thread Andreas Hartmann
Andreas Hartmann wrote:

Bertrand Delacretaz wrote:

Le Mardi, 14 oct 2003, à 13:34 Europe/Zurich, Jon Evans a écrit :

...I can use a directory generator to give me a list of images, but I 
don't know how to transform that list in order to select one of them 
at random.
[...]

What about the RandomNumberModule?
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RandomNumberModule.html 
Sorry for my short answer, I imagine something like


  

The min and max random number values would be configured in
cocoon.xconf.
Andreas



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


Re: choose a random image

2003-10-14 Thread Andreas Hartmann
Bertrand Delacretaz wrote:

[...]


  



Damn - how does one keep track of all what we have in here, I missed 
that one ;-)
:)
I saw it accidentally when I browsed the input modules.
I think you don't even need the redirect, this should work with map:read 
as well, shouldn't it?
Yes, of course ...

The min and max random number values would be configured in
cocoon.xconf.
That's the problem then, how do you keep track of a variable number of 
images?
OK, this is a problem.

So you might be back to java code in this case as well, or maybe:

-get the list of images (DirectoryGenerator)
-write an XSLT transform using java.util.random to select one
You could also pass a random number (e.g, [0..100]) to the stylesheet
and calculate the image number:

  


-output an HTML page with an  instead of outputting the image 
directly, to avoid the need for a redirect
Andreas



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


Re: choose a random image

2003-10-14 Thread Andreas Hartmann
Upayavira wrote:
Andreas Hartmann wrote:


The min and max random number values would be configured in
cocoon.xconf.


That's the problem then, how do you keep track of a variable number 
of images?
OK, this is a problem.
No it's not. You just define the input module as many times as you need 
with different names and different ranges, random10, random20, etc.
Yes, but I think it should be possible to select the max number
dynamically, depending on the number of images that are located
in the directory.
Andreas



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


Re: choose a random image

2003-10-14 Thread Andreas Hartmann
Upayavira wrote:

Andreas Hartmann wrote:

[...]

Yes, but I think it should be possible to select the max number
dynamically, depending on the number of images that are located
in the directory.


Fair enough. Surely it shouldn't be hard to extend the random input 
module to be able to handle {random:10} or {random:20}? Assuming someone 
needs it. Or even {random:1-20}.
This would be nice indeed.

But in this special case - how do I pass the number of the files
found by the directory generator to the input module?
I guess the XSLT calculation method is quite suitable
for this very application.
Andreas



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


FileGenerator adds XHTML namespace?

2003-10-15 Thread Andreas Hartmann
Hi Cocoon users,

I just noticed an interesting behaviour of the FileGenerator:
It transforms the source file

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

  ...

into


http://www.w3.org/1999/xhtml";
  version="-//W3C//DTD XHTML 1.1//EN">
  ...

Is this configurable and documented?
Is JTidy involved (the file ends with .xml)?
--Andreas



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


ExceptionSelector Problem: class hides its subclass

2003-10-21 Thread Andreas Hartmann
Hi Cocoon users,

I have the following problem when configuring the ExceptionSelector:

Class 'org.apache.cocoon.ProcessingException' hides its subclass 
'org.apache.cocoon.ResourceNotFoundException'

The declaration looks like:



  

  

  

  



The DocumentDoesNotExistException can appear as the cause of
either the ProcessingException or the ResourceNotFoundException.
How can I change the configuration so that both of these
exceptions are unrolled?
Thanks in advance!

-- Andreas



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


[Solution] Re: ExceptionSelector Problem: class hides its subclass

2003-10-22 Thread Andreas Hartmann
Andreas Hartmann wrote:

Hi Cocoon users,

I have the following problem when configuring the ExceptionSelector:

[...]

The DocumentDoesNotExistException can appear as the cause of
either the ProcessingException or the ResourceNotFoundException.
How can I change the configuration so that both of these
exceptions are unrolled?
It seems to work when I declare only the ProcessingException.
I thought I tried this before posting, but obviously I did
something wrong.
-- Andreas



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


Using the context:// protocol in ExcaliburTest

2003-11-04 Thread Andreas Hartmann
Hi Cocoon community,

I want to test some components with an ExcaliburTest
subclass.
Resolving a source using the context:// protocol
does not work - the returned source is not valid.
What can I do to solve this problem?
Thanks in advance!

-- Andreas

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


Re: Homepage-Devlopment

2003-11-06 Thread Andreas Hartmann
Dr. med. Elieser Rosenberg wrote:

Do You now some Cocoon-users in Switzerland or near regions?
In Zurich, there are Giacomo Pati and Massimo Sonego from
Otego (http://www.otego.com) and some people from Wyona
(http://www.wyona.com) including Michael Wechner (the founder
of the Lenya Project) and me.
AFAIK Bertrand Delacretaz (http://www.codeconsult.ch/bertrand/)
also lives in Switzerland.
It was planned to establish a cocoon users group in
switzerland (www.cocoon-users.ch) but this plan wasn't
put into practice by now.
Maybe some of us could meet - e.g., at a dinner - to share
our experiences, get more insight into recent developments
etc. and talk about the users group again.
What do you think?
-- Andreas

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


Re: trying to generate the SRC attribute of element b ased on XML returned by generator.

2003-11-06 Thread Andreas Hartmann
Igor Galperin wrote:

Hi!

I am trying to dynamically create the URL which will be set as a value 
of "SRC" attribute of  element.
The dynamic parts of the URL are some of the elements of XML returned
by generator.

May be somebody knows the way how to retrieve the elements of XML 
returned by generator and then use them
to generate URL for transformer.
There's a problem about this approach:
It's all about SAX, so the transformation already starts when
your generator is still working. So you have to know the URL
for the transformer before the generator is able to generate
the XML data that you want to use for the transformer URL.
-- Andreas

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


Re: trying to generate the SRC attribute of element b ased on XML returned by generator.

2003-11-07 Thread Andreas Hartmann
Justin Fagnani-Bell wrote:

Only actions can set sitemap parameters, which is how you would set the 
src attribute. If you can write a simple action that will create your 
URL and place it in the sitemap parameters then you should try that. I 
don't know another way to do it. I've never used flowscript, but maybe 
it's possible that way as well.
The problem here is that the action can't access the SAX stream.
You could factor out the code which produces the XML fragments that
are used for the URL from the generator. Then you can use this
code in the action as well as in the generator and compute
your URL.
-- Andreas

-Justin

On Thursday, November 6, 2003, at 09:15 AM, Igor Galperin wrote:

Hi!

I am trying to dynamically create the URL which will be set as a
value of "SRC" attribute of  element.
The dynamic parts of the URL are some of the elements of XML returned
by generator.
May be somebody knows the way how to retrieve the elements of XML
returned by generator and then use them
to generate URL for transformer.
Help me please.

Thank you.
Igor.


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


Re: Insert an image

2003-12-01 Thread Andreas Hartmann
Josep Riudavets wrote:

Hi all ...
 
How can I do for inserting an image into an XSL stylesheet???
Could you be more specific here?
Inserting the  element is one of the most
basic XSLT tasks ... What is the problem?
-- Andreas

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


Re: Relative Path Grist (An FAQ I'm sure.)

2003-12-08 Thread Andreas Hartmann
Alain Javier Guarnieri del Gesu wrote:

Sorry to bother you with this but...

Is there an InputModule that will give me the path I need to to find
the root of the cocoon context? (If BaseLink is what I need, then
the documentation for BaseLink is not very helpful.) I've got a site
map that has a pipeline that matches say a/b/c.html as **/*.html.
I'd like to let my stylesheet know that it can use ../../ to go back up.
I can do this in xslt I think, or I could create a pipeline for
*/*.html and one for */*/*.html and so on. Suggestions? Thank you. 
We (the Lenya community) recently discussed to write a
Lenya-specific InputModule for this purpose. But it could
really make sense to make it generic, e.g.,
{path-to-context:{1}/{2}.html}

But this would require that sitemap parameters are expanded
inside input module calls (I don't know if this works).
Another possibility would be

{path-to-context:sitemap}

which would compute the relative path based on the
current sitemap URI (the URI as processed by the current
sitemap).
-- Andreas

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


[Flowscript] Obtaining servlet context directory

2003-12-10 Thread Andreas Hartmann
Hi Cocoon users,

I'm looking for an easy way to obtain the directory
of the servlet context in a flowscript. Is there any
reason why context.getRealPath() in FOM_Cocoon is not
(yet?) implemented?
By now I'm doing

var sourceResolver = cocoon.getComponent(
Packages.org.apache.excalibur.source.SourceResolver.ROLE);
var source = sourceResolver.resolveURI("context:///");
var sourceFile =
Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
var contextPath = sourceFile.getAbsolutePath();
sourceResolver.release(source);
cocoon.releaseComponent(sourceResolver);
Is there something shorter and more elegant?

Thanks in advance,
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Flowscript] Obtaining servlet context directory

2003-12-10 Thread Andreas Hartmann
Joe Latty wrote:
In your pipeline

In flowscript
var contextPath = cocoon.parameters["context-path"];
Thanks for your answer, but I don't mean the context
path of the request but the absolute filesystem path
to the web application directory.
-- Andreas

- Original Message - 
From: "Peter Velychko" <[EMAIL PROTECTED]>
To: "Andreas Hartmann" <[EMAIL PROTECTED]>
Sent: Wednesday, December 10, 2003 11:49 PM
Subject: Re: [Flowscript] Obtaining servlet context directory



Hi,

Excuse me I don't know about better way.
But my question is about context directory in case of application
works from WAR-archive.
In that case if I have
var sourceFile =
Packages.org.apache.excalibur.source.SourceUtil.getFile(source);

the "sourceFile" is null.

Could anyone advice right way?

Thanks a lot in advance.

Andreas wrote:

AH> Hi Cocoon users,

AH> I'm looking for an easy way to obtain the directory
AH> of the servlet context in a flowscript. Is there any
AH> reason why context.getRealPath() in FOM_Cocoon is not
AH> (yet?) implemented?
AH> By now I'm doing

AH> var sourceResolver = cocoon.getComponent(
AH>  Packages.org.apache.excalibur.source.SourceResolver.ROLE);
AH> var source = sourceResolver.resolveURI("context:///");
AH> var sourceFile =
AH>  Packages.org.apache.excalibur.source.SourceUtil.getFile(source);
AH> var contextPath = sourceFile.getAbsolutePath();
AH> sourceResolver.release(source);
AH> cocoon.releaseComponent(sourceResolver);
AH> Is there something shorter and more elegant?

AH> Thanks in advance,
AH> -- Andreas
AH> -
AH> To unsubscribe, e-mail: [EMAIL PROTECTED]
AH> For additional commands, e-mail: [EMAIL PROTECTED]
Best regards,
Peter Velychko
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


[Flow] Function "javascript:foo()" not found

2004-01-22 Thread Andreas Hartmann
Hi Cocoon users,

sometimes I get a

   ResourceNotFoundException:
   Function "javascript:foo()" not found
when I work with FlowScript.

I think it appears when I call the same script
function several times. Does anyone know what
could be the reason for this?
Thanks in advance!

-- Andreas

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


TransformerFactory and enable-inlining

2004-01-28 Thread Andreas Hartmann
Hi Cocoon users,

I'm experiencing the

  org.apache.bcel.generic.ClassGenException:
  Branch target offset too large for short
with my stylesheets. In a Xalan bug report, it
is mentioned to set the disable-inlining (which
has been replaced by enable-inlining) parameter:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11432

Does anyone know how to do this with Cocoon 2.1.*?

Thanks!

-- Andreas

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


Re: [Solved] [Flow] Function "javascript:foo()" not found

2004-01-28 Thread Andreas Hartmann
Andreas Hartmann wrote:

Hi Cocoon users,

sometimes I get a

   ResourceNotFoundException:
   Function "javascript:foo()" not found
when I work with FlowScript.

I think it appears when I call the same script
function several times. Does anyone know what
could be the reason for this?
By analyzing stack traces and re-Engineering the Rhino
sources I found out that I assigned a value to a global
(non-declared) variable in my FlowScript. Removing the
assignment solved the problem.
-- Andreas

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


Re: Question about my Transformer

2004-01-29 Thread Andreas Hartmann
Jorg Heymans wrote:

Is there any particular reason why you want to implement this as a 
transformer? A stylesheet seems to be easier in this case IMHO.
I talked to Han some days ago, this transformer is just an
example to get started.
> If you extend abstractdomtransformer you have access to the Document
> instance, but i don't know if that makes your problem any easier.
This is a good idea. It would make it easier, but slower
(depending on the processing - I don't know if this is
important for your application).
If you want to use SAX, you could do the following:

(1) A method for each element:

if (localName.equals(ELEMENT_ADDRESS)) {
startElementAddress(...)
}
else if (localName.equals(ELEMENT_NAME)) {
startElementName(...)
}
else if ...
(2) You could implement a set of handlers (ContentHandler
or a simplier interface) and register them for the
element names:
public void startElement(String namespaceURI, String localName,
String qualifiedName, Attributes attributes) {
handlers(localName).startElement(...);
}
public void endElement(String namespaceURI, String localName,
String qualifiedName) {
handlers(localName).endElement(...);
}
HTH,
-- Andreas
Jorg

Han Jon Theus wrote:

Hello
I just implemented a simple transformer with the start method below:
public void startElement(String namespaceURI, String localName, 
String qualifiedName, Attributes attributes)
throws SAXException {
   
String newLocalName = localName;
String newQualifiedName = qualifiedName;
   
//System.out.println(localName);
   
if (localName.equals(ELEMENT_ADDRESS)) {
newLocalName = "nickname";
String[] parts = qualifiedName.split(":");
   
if (parts.length == 2) {
newQualifiedName = parts[0] + ":" + newLocalName;
}
else
{
newQualifiedName = newLocalName;   
}
   
}
   
super.startElement(namespaceURI, newLocalName, 
newQualifiedName, attributes);
}

The transformer changes the local name "firstname" into "nickname". I 
would like to extend this transformer: it should be able to rename all 
xml tags. do i have to program a loop? do i have to implement multiple 
startElement()-methodes ?

Thx for you help

Han J. Theus-Student




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


Re: Question about my Transformer

2004-01-30 Thread Andreas Hartmann
Bruno Dumon wrote:

[...]

> If you extend abstractdomtransformer you have access to the Document
> instance, but i don't know if that makes your problem any easier.
This is a good idea. It would make it easier,
Actually, I think it would make it a lot harder.
Yes, as far as this example is concerned, SAX is more than
sufficient.
But when the tree model fits your needs, you don't need
to build your own object model. Han is not yet very
familiar with processing XML, and I think for most newbies
it is easier to "think DOM" than to "think SAX". But of
course I could be wrong :)
-- Andreas

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


Re: A notebook for Cocoon development

2004-02-03 Thread Andreas Hartmann
mirko wrote:

Hi,
I just need a notebook that will be sufficient to make my work in Cocoon 
(besides of my primary desktop computer) when I'm outside (spring is 
comming :) ).
Will a PIII 500, 128MB notebook be OK for this?
If you don't persist on a PC - here are some Cocoon-Devs
discussing their Mac laptops:
http://marc.theaimsgroup.com/?t=10707956252&r=1&w=2

-- Andreas

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


Re: Using different transformers

2004-02-06 Thread Andreas Hartmann
Polymorphic wrote:

Hi all,

I am a new user of Cocoon and planning to migrate a couple of sites. I
read the book "Cocoon Developers handbook", look through the wiki and
mailing list archives but was unable to find a solution to what I am
attempting - sorry if it's something that I have missed.
I would like to have a pipeline use different xsl transformers depending
on the xml document that is requested. I would prefer not to do this by
URI match, or anything visible to the end user, but only depending on how
the xml document is structured. The reason is this - I will have several
different xml documents containing the content, which in turn means that I
need different xslt documents for them. A URI match solution would works,
but is not really elegant.
Forrest's sourcetype action could help you to setup the
pipeline according to the generated XML:
http://xml.apache.org/forrest/cap.html

-- Andreas

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


[Flow] Releasing components

2004-02-21 Thread Andreas Hartmann
Hi Cocoon community,

I just took a look at the cron block sample.
It obtains a component:
cocoon.getComponent(Packages.org.apache.cocoon.components.cron.JobScheduler.ROLE);

but I can't find the place where it is released.
Is this done automatically now?
Thanks in advance!

-- Andreas

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


Re: Map return type in action

2004-02-21 Thread Andreas Hartmann
Anna Bikkina wrote:

Hi,

I just a need a gory detail I am not able to find. When I write my own action 
file and its returns a map. How can I use the map in my xsp which gets 
executed when my action is succesful. 

Something like getParamter etc... can someone please write the syntax to get 
the Map details from a action.

Thanks,
Anna.


Action:
---
map.put("foo", "bar");
return map;
Sitemap:


  

  

XSP:

try {
String foo = parameters.getParameter("foo");
}
catch (ParameterException e) {
throw new ProcessingException(e);
}
HTH,
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


build.webapp.loglevel does not affect block categories

2004-02-24 Thread Andreas Hartmann
Hi Cocoon community,

it seems that the log level set in build.webapp.loglevel
does not apply to custom block categories. E.g., in the
cron block, the log level is hard-coded:








Should I file a bug?

-- Andreas

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


Re: build.webapp.loglevel does not affect block categories

2004-02-25 Thread Andreas Hartmann
Joerg Heinicke wrote:

[...]

Have you tried replacing INFO with @loglevel@ as in main logkit.xconf. 
Does this work or is the value not replaced?
I just tried it, it is not replaced. The filter seems
to be applied before logkit.xconf is patched. I think
this an enhancement bug, isn't it?
-- Andreas

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


Re: [Flow] How to know the called uri in flow?

2004-02-27 Thread Andreas Hartmann
Antonio Gallardo wrote:

Hi:

Is this a way to retrieve the called URI in Flowscript? If yes, how? :-D
AFAIK this is not possible. You can use a helper class
to get the request object from the FOM_Cocoon object
and ask it for its URL. But this is not enabled in
FOM intentionally.
-- Andreas

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


Re: Modify some parameters in the parameterize method

2004-02-27 Thread Andreas Hartmann
Lionel Crine wrote:

Hi,
I'd like to set the parameters in the method parameterize.
How can I do that ?
What do you mean? Passing parameters to sitemap
components?
-- Andreas

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


[Flow] Input modules in view pipeline

2004-04-08 Thread Andreas Hartmann
Hi Cocoon users,

[Setup: Cocoon 2.1.5-dev from CVS]

I'm using an input module (page-envelope) in a pipeline
of a flowscript view:

  ...
  


  
  ...

The problem is that the module gets a request object with
the view URI:
   /lenya2/mypub/form-select.xml
Some weeks ago it used to be the browser URI:
   /lenya2/mypub/authoring/foo/bar/baz.html
Sylvain made some changes to the AbstractInterpreter, is it
possible that they cause this behaviour?
Thanks in advance!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Select with xPath Expression

2004-04-14 Thread Andreas Hartmann
Nils Köster wrote:


How could it spell "<" in other ways???
<

-- Andreas

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


Re: XSP: cinclude and map:parameters problem

2004-04-21 Thread Andreas Hartmann
olivier demah wrote:

[...]

So i thought ; i had to do something to pass parameters from xsp to xsp 
because i "call" news.xsp with cinclude.
This does not work. Your compiled XSP is executed _before_ the
CInclude transformation, so "including another XSP" is not possible
this way.
-- Andreas

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


Re: XSP: cinclude and map:parameters problem

2004-04-21 Thread Andreas Hartmann
olivier demah wrote:

Andreas Hartmann a e'crit :

olivier demah wrote:

[...]

So i thought ; i had to do something to pass parameters from xsp to 
xsp because i "call" news.xsp with cinclude.


This does not work. Your compiled XSP is executed _before_ the
CInclude transformation, so "including another XSP" is not possible
this way.


at least its clear :)
You might consider a logicsheet or a helper class for code
reuse in XSPs.
-- Andreas

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


Re: Lenya Forms best practice

2004-05-10 Thread Andreas Hartmann
dave- wrote:

What is the current status of forms in Lenya?
 
Is there an established best practice?
 
Is there anything new on the horizon?


You should ask your question on the lenya-users list:

http://cocoon.apache.org/lenya/community/mailing-lists.html

-- Andreas

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


Re: OutOfMemoryError

2004-04-30 Thread Andreas Hartmann
Johnson wrote:

> Hi!
> 
> I'm trying to build the latest cocoon (cocoon-2.1_20040428041256.tar.gz),
> my computer has 756MB RAM,and the system is winXP,j2sdk1.4.2-04
> when the build go to cocoon-block-serializers-compile,after prompt
> "compiling 95 source files to dest
> the error happended
> The system is out of resources.
> Consult the following stack trace for details.
> java.lang.OutOfMemoryError

Excluding the block works for the Ant build, but
what can I do about the OOMError in Eclipse?

-- Andreas


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



Re: OutOfMemoryError

2004-04-30 Thread Andreas Hartmann
Andreas Hartmann wrote:

Johnson wrote:


Hi!

I'm trying to build the latest cocoon (cocoon-2.1_20040428041256.tar.gz),
my computer has 756MB RAM,and the system is winXP,j2sdk1.4.2-04
when the build go to cocoon-block-serializers-compile,after prompt
"compiling 95 source files to dest
the error happended
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError


Excluding the block works for the Ant build, but
what can I do about the OOMError in Eclipse?
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=108330884830238&w=2

-- Andreas

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


IE does not reload updated javascript

2004-05-18 Thread Andreas Hartmann
Hi Cocoon community,
I'm using a javascript tree widget which is embedded
in a page ().
When a node is moved in the tree and a redirect to the
original page is invoked, the javascript is not reloaded
in IE 6.0. It works fine with Mozilla, and it works in IE
when I turn off the browser cache.
Does anyone know how to get IE to check the javascript
for changes on every page visit?
Thanks in advance!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: IE does not reload updated javascript

2004-05-19 Thread Andreas Hartmann
Johannes Textor wrote:
Hi Andreas,
I guess you can enforce script reloading by appending a random
get parameter to the script URL, i.e.

or something like that. (I know that's ugly brute force ...)
Thanks!
But I noticed that the actual problem was that IE cached the
whole HTML page. I'm currently experimenting with the
Cache-Control header, it looks promising.
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Flowscript] Obtaining servlet context directory

2004-05-21 Thread Andreas Hartmann
David Leangen wrote:
Is anybody able to tell me how to get the context path from flowscript?
I noticed some threads on the subject, but wasn't able to find any
answers...
For example: http://marc.theaimsgroup.com/?t=10710482681&r=1&w=2
I'd like to be able to access a file from within my webapp, but I keep
getting a "FileNotFoundException" because I'm not able to get the context
from within flowscript.
I think you could obtain a SourceResolver and resolve
the URI "context:///".
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Has anyone tried to generate the sitemap.xmap via WebGUI ?

2004-05-28 Thread Andreas Hartmann
Andreas Schmid wrote:
I am currently developing a CMS based on Cocoon 2.1.4
The thing is changing contents is no problem.. but our users also want 
to add or delete pages on their webpage.

So i thought it would be great to create an sub sitemap which holds the 
pages for the webpage.
You mean you want to define single pages in a Cocoon sitemap?
Could you explain why this approach is reasonable in your
usecase?
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [GetTogether] Madrid, 21/22.06.04, Spain

2004-06-07 Thread Andreas Hartmann
Thorsten Scherler wrote:
Hello everyone,
we finally have a room for the GetTogether.
We will have a Meeting about cocoon and lenya in Madrid, Spain.
It will last 2 days: 21/22.06.04.
We have 15 places with computer in total.
6 places are already taken so 9 are still aviable.
Note:
We are trying to invite somebody from *Wyona* to attend the GetTogether.
We can offer him/her to pay the cost for the travel.
*If* somebody from wyona is willing to come, the price for the 
GetTogether will be *around* 20-30€ for 2 days workshop and 
presentation. This money will hopefully cover the expenses for our guest 
;-).

So please hurry up and register now!
I would like to join you (added myself to the Wiki page).
So I'm afraid you have to speak English :)
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


causes exception

2004-06-18 Thread Andreas Hartmann
Hi Cocoon community,
what's wrong with this XSP snippet?

  foo
  list

It causes a ProcessingException in ServerPagesGenerator.setup().
-
It seems like the stylesheet terminated with a message
( in logicsheet-util.xsl)
javax.xml.transform.TransformerException: Stylesheet führte zu Beendigung
at org.apache.xalan.templates.ElemMessage.execute(ElemMessage.java:162)
How to find out this message?
-
Thanks in advance!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: causes exception

2004-06-18 Thread Andreas Hartmann
Andreas Hartmann wrote:
Hi Cocoon community,
what's wrong with this XSP snippet?

  foo
  list

It causes a ProcessingException in ServerPagesGenerator.setup().
BTW, applying the input.xsl logicsheet by hand worked
fine:
this._xsp_module_helper.getAttribute(objectModel, 
"list","foo","")

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


Re: causes exception

2004-06-18 Thread Andreas Hartmann
Klaus Bertram wrote:
Hi Andreas,
is the namespace for input: at the xsp:page ?
xmlns:input="http://whatever";
This would have pointed me to the solution (duplicate
namespace declaration). But I already found it (see my
other reply).
Thanks a lot!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[Solution] Re: causes exception

2004-06-18 Thread Andreas Hartmann
Andreas Hartmann wrote:
Hi Cocoon community,
what's wrong with this XSP snippet?

  foo
  list

It causes a ProcessingException in ServerPagesGenerator.setup().
The logicsheet contained an additional declaration of the
input module namespace before the used declaration:
  xmlns:xsp-input="http://apache.org/cocoon/xsp/input/1.0";
  [...]
  xmlns:input="http://apache.org/cocoon/xsp/input/1.0";
The first one was matched by the "get-namespace-prefix" template
in logicsheet-util.xsl. Because no appropriate parameter tag
was found, the stylesheet terminated.
BTW, I consider this as a Cocoon bug, because using namespace
prefixes to resolve anything in XML is not useful. Isn't it
possible to rely just on namespace URIs in logicsheet-util.xsl?
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [Solution] Re: causes exception

2004-06-18 Thread Andreas Hartmann
Klaus Bertram wrote:
Ups,
I thought that the declaration for a logic sheet must only match to the 
cocoon.xconf

could it be that xsp-input was in ver 2.04
and now only input is valid
If this is true, it is very strange ...
IMO there shouldn't be any restrictions/rules regarding the
namespace prefix, only the URI should matter.
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


TextSerializer and UTF-8

2005-03-10 Thread Andreas Hartmann
Hi Cocoon community,
when I use the text serializer with UTF-8 encoding, Internet Explorer
does not recognize the encoding and screws up the umlauts.
With the XML serializers from the serializers block, the problem
does not appear. Is there any workaround for the text serializer?
Setting the Content-Type header using the HttpHeaderAction does
not work, I guess it is overridden by the serializer:
   
 
   
Thanks in advance!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: TextSerializer and UTF-8

2005-03-11 Thread Andreas Hartmann
Geert Josten wrote:
Hi,
I'm not certain whether it really works, but TextSerializer and 
XmlSerializer are very much similar. Ever tried to define a new 
TextSerializer with the encoding explicitly set to utf-8?


  src="org.apache.cocoon.serialization.TextSerializer">
  UTF-8


Yes, I'm using this configuration, but unfortunately it doesn't
change anything.
Thanks for your help!
-- Andreas
Cheers,
Geert
Andreas Hartmann wrote:
Hi Cocoon community,
when I use the text serializer with UTF-8 encoding, Internet Explorer
does not recognize the encoding and screws up the umlauts.
With the XML serializers from the serializers block, the problem
does not appear. Is there any workaround for the text serializer?
Setting the Content-Type header using the HttpHeaderAction does
not work, I guess it is overridden by the serializer:
   
 
   

Thanks in advance!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


Re: TextSerializer and UTF-8

2005-03-11 Thread Andreas Hartmann
Gregor J. Rothfuss wrote:
Andreas Hartmann wrote:
Hi Cocoon community,
when I use the text serializer with UTF-8 encoding, Internet Explorer
does not recognize the encoding and screws up the umlauts.
With the XML serializers from the serializers block, the problem
does not appear. Is there any workaround for the text serializer?

just use the xml serializer?
OK, I'll try that.
or do


Can I combine this with the cocoon:// protocol? My text file
is dynamically generated.
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: TextSerializer and UTF-8

2005-03-11 Thread Andreas Hartmann
Geert Josten wrote:

  src="org.apache.cocoon.serialization.TextSerializer">
  UTF-8



Yes, I'm using this configuration, but unfortunately it doesn't
change anything.

Really ought to work. XMLSerializer and TextSerializer both extend the 
AbstractTextSerializer
Actually the XMLSerializer (I'm using the serializers block) extends
the EncodingSerializer, which extends Object and implements Serializer.
I guess I'd need a TextSerializer based on the EncodingSerializer.
and that one contains:
if (encoding != null) {
format.put(OutputKeys.ENCODING, encoding);
buffer.append(";encoding=").append(encoding);
}
But isn't this just used for the caching key?
I didn't find any code which attaches the encoding information
to the HTTP header.
I suspect that the trouble is caused by something else...
The browser perhaps? :-P
Yes, it is definitely the browser, but nevertheless I have to find
a solution ... :|
Thanks for your time!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: TextSerializer and UTF-8

2005-03-11 Thread Andreas Hartmann
Andreas Hartmann wrote:
Geert Josten wrote:
[...]
I guess I'd need a TextSerializer based on the EncodingSerializer.
I implemented it, seems to work fine.
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Cron + HSQLDB: Unexpected token: in statement [SELECT 1]

2005-03-15 Thread Andreas Hartmann
Hi all,
I'm trying to run the cron block with the TX job store and the
built-in HSQL DB. My configurations:

  LenyaScheduler


  

jdbc:hsqldb:hsql://localhost:9002
sa

  

I added the Quartz tables to cocoondb.script. When I start Jetty, I can
connect to the DB with the org.hsqldb.util.DatabaseManager browse the tables.
But during the cron block startup, I get the following exception:
main WARN  lenya.scheduler - Could not prepare test statement, connection 
recycled on basis of time.
java.sql.SQLException: Unexpected token:  in statement [SELECT 1]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
...

It looks like a test statement is created, but HSQL couldn't parse it and
threw an exception. I found the following message in a forum:
>>DriverManager.getConnection("jdbc:hsqldb:hsql://localhost")
>>  trying driver[className=org.hsqldb.jdbcDriver,[EMAIL PROTECTED]
>>getConnection returning
>>driver[className=org.hsqldb.jdbcDriver,[EMAIL PROTECTED]
>>SQLException: SQLState(37000) vendor code(-11)
>>java.sql.SQLException: Unexpected token: 37000 Unexpected token:  in statement
>>[SELECT 1]
>>
>>
>
>The SQL is correct. Yet another SQL incompatibility in HSQL.
This seems to be a known issue with HSQL. Updating to the newest
version (1.8.0-RC9) didn't solve the problem.
Is there anything I can do about it?
Thanks a lot!
-- Andreas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   >