You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gelo1234 <ge...@gmail.com> on 2013/06/20 20:00:24 UTC

XSLT import/include errors

It looks like XSLT also got cut in functionality in C3. I tried to rerun
old XSL stylesheets with new C3 and gave up.

The error says nothing meaningful:

<exception-report class="org.apache.cocoon.pipeline.SetupException"
timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
exception</message><cause>Could not compile
stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
Could not compile stylesheet
    at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
Source)
    at
org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
    at
org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
    at
org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
    at
org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
    at

It looks like there is a problem with xsl:import/xsl:include from the main
xsl stylesheet.
Moreover I found that when <xsl:template match="RootElement" is not in the
main XSL stylesheet the same error appears.

Can we switch on more debugging info what is wrong ?

Greetings,
Greg

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Resolved the issue with NullPointerException during Tomcat deploy process.
It seems like putting too many files/directories in WEB-INF/classes/COB-INF
makes Tomcat fail to deploy C3 app.

I moved block root context from: context-path="classpath:/classes/COB-INF/
to some other place:
context-path="file:/anythingNotWithingCLASSPATH/COB-INF/"

And now Tomcat deploys C3 app without problems.

Greetings,
Greg




2013/6/20 gelo1234 <ge...@gmail.com>

> OK, resolved the issue. Deleted xslt/ directory :/ and now its starting.
> STRANGE!!
>
> And also found that more detailed error info about not being able to
> compile XSLT stylesheet was in Tomcat log.
>
> It seems that with C3 <xsl:variables../> cannot be inherited. The error
> said about the same <xsl:variable .../> being defined in 2 different places
> :/
> One place - in main XSL file and other one - in imported XSL file.
>
> While it worked fine in C2.1. I use extensively <xsl:template /> and
> <xsl:variable ../> inheritance, now in C3 it makes XSLT not being compiled
> :/
>
> Greetings,
> Greg
>
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
>>
>> Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
>> doesn't help. I tried to clean work directory, and still
>> NullPointerException.
>>
>> Any idea what might be wrong ?
>> And how to switch off imported xslt caching ?
>>
>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
>> cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory
>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>> cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
>> addChildInternal
>> SEVERE: ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>     at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>     at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>     at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>     at
>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>     at
>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>     at java.lang.Thread.run(Unknown Source)
>> Caused by: java.lang.NullPointerException
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
>>     at
>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>>     at
>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>>     at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>     at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>     at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
>>     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>     ... 11 more
>>
>> cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> SEVERE: Error deploying web application directory
>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>> java.lang.IllegalStateException: ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>     at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>>     at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>     at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>     at
>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>     at
>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>     at java.lang.Thread.run(Unknown Source)
>>
>> Greetings,
>> Greg
>>
>>
>>
>> 2013/6/20 Javier Puerto <jp...@gmail.com>
>>
>>> Hi Greg,
>>>
>>> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>>>
>>> >
>>> >
>>> > It looks like XSLT also got cut in functionality in C3. I tried to
>>> rerun old XSL stylesheets with new C3 and gave up.
>>> >
>>> > The error says nothing meaningful:
>>> >
>>> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
>>> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
>>> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
>>> exception</message><cause>Could not compile
>>> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
>>> Could not compile stylesheet
>>> >     at
>>> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
>>> Source)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>>> >     at
>>> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>>> >     at
>>> >
>>> > It looks like there is a problem with xsl:import/xsl:include from the
>>> main xsl stylesheet.
>>>
>>> You are right, seems to be a problem with the imports. I've used Imports
>>> and includes with cocoo3 without problems, except that imported files are
>>> cached and doesn't update running in RCL. The xslt engine is still xalan so
>>> the templates should work like before except for the sources with cocoon:/
>>> protocol that aren't supported.
>>>
>>> > Moreover I found that when <xsl:template match="RootElement" is not in
>>> the main XSL stylesheet the same error appears.
>>>
>>> Could you send an example block to reproduce the issue?
>>>
>>> >
>>> > Can we switch on more debugging info what is wrong ?
>>>
>>> You can edit the logback.xml file and set level to debug but the
>>> exception comes from xalan. I suggest to look for sources loaded with
>>> cocoon:/ in your code and substitute by servlet:/.
>>>
>>> >
>>> > Greetings,
>>> > Greg
>>>
>>> Salu2.
>>>
>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Yes, it must be that "problem" with current Xalan.

Strange thing is that some XSLT variables are predefined like: requestURI
(?!).

So I cannot use:
<xsl:param name="requestURI"/> in stylesheet file.xsl even though Ive got:

<map:transformer src="file.xsl">
     <map:parameter name="requestURI" value="...."/>
</map:transformer>

in sitemap.xmap. So requestURI is some GLOBAL variable ?

Greetings,
Greg

2013/6/20 Javier Puerto <jp...@gmail.com>

>
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
> What version of C2.1 did you use? Maybe old Xalan? I've found the
> following note in the Xalan documentation [1]:
>
> "Note that all top-level parameters and variables from all imported and
> included stylesheets will be placed as direct children of the top-level
> stylesheet in the AST. This done to make global variables truly global and
> not just global in the stylesheet where it was declared."
>
> You should avoid duplicate variable declarations, at the end of the page
> it's explained how the forward references works. You could extract some
> common variables to a XSLT template so you can use several templates
> without collision.
>
>  [1]: http://xml.apache.org/xalan-j/xsltc/xsl_variable_design.html
>
>

Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Am 04.07.2013 08:16, schrieb Francesco Chicchiriccò:
> On 03/07/2013 20:40, Piratenvisier wrote:
>> Where do I find your workaround instructions ?
>
> At [1], in the "Maven 2 archetypes" section (you might need to clear 
> your browser's cache):
>
> Some issues were identified in the 3.0.0-alpha-3 artifacts that 
> prevent the generated projects to work properly; as a temporary 
> workaround, you will need to apply the following changes to the 
> generated pom.xml files:
>
> 1. replace any 3.0.0-alpha-3-SNAPSHOT occurrency with 3.0.0-alpha-3
>
> 2. add <version>1.0.0</version> right below 
> <artifactId>cocoon-maven-plugin</artifactId>
>
> Regards.
Thank you I got it.
I was an adherent of cocoon from the beginning.
But with the upcoming AJAX I felt that for dynamic web it was not the 
rightt solution.
So I stopped to use it.I started my project again because thanks to 
cocoon's hompage I
noticed the upcoming wicket.
Wicket brought a new dynamic in my project there were only two use-cases 
for which I preferred cocoon.
For PDF generation and email-transport. I used flow :cocoon-protocol fop-ng
But this services could not be upgraded from cocoon 2.2.0 to 3.
Meanwhile I use hibernate and spring 3.1 and I would prefer to use the 
hibernate ojb-part with annotations in cocoon.
but in cocoon 3 first flow and cocoon-protokol is missing and I can not 
use spring 3.1
So the situation becomes worse and worse for me. So I am looking how to 
escape from cocoon
with flyingsaucer and an own email adaption maybe as soap-application.
Best regards
Heiner

>
>> Am 03.07.2013 10:12, schrieb Francesco Chicchiriccò:
>>> On 03/07/2013 08:37, Piratenvisier wrote:
>>>> When i create the mysample block with the atchetype as described on 
>>>> the cocoon 3.0
>>>> homepage maven first complains that there is no cocoon-optional 
>>>> 3.0.0-alpha-3-SNAPSHOT dependency.
>>>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I 
>>>> start jetty
>>>> java.lang.NoClassDefFoundError: 
>>>> org/springframework/core/env/Environment
>>>> what is the problem
>>>> when I want to use the cocoon pipeline in my wicket application
>>>> I have a dependency problem between flyingsaucer and
>>>> org.apache.xmlgraphics fop 1.0
>>>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>>>
>>> Hi,
>>> it seems there are some issues with 3.0.0-alpha-3 maven archetypes: 
>>> I have updated [1] with some workaround instructions that should fix 
>>> your issues.
>>>
>>> Regards.
>>>
>>> [1] http://cocoon.apache.org/3.0/download.html
>


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


Re: using maven archetypes

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/07/2013 20:40, Piratenvisier wrote:
> Where do I find your workaround instructions ?

At [1], in the "Maven 2 archetypes" section (you might need to clear 
your browser's cache):

Some issues were identified in the 3.0.0-alpha-3 artifacts that prevent 
the generated projects to work properly; as a temporary workaround, you 
will need to apply the following changes to the generated pom.xml files:

1. replace any 3.0.0-alpha-3-SNAPSHOT occurrency with 3.0.0-alpha-3

2. add <version>1.0.0</version> right below 
<artifactId>cocoon-maven-plugin</artifactId>

Regards.

> Am 03.07.2013 10:12, schrieb Francesco Chicchiriccò:
>> On 03/07/2013 08:37, Piratenvisier wrote:
>>> When i create the mysample block with the atchetype as described on 
>>> the cocoon 3.0
>>> homepage maven first complains that there is no cocoon-optional 
>>> 3.0.0-alpha-3-SNAPSHOT dependency.
>>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I 
>>> start jetty
>>> java.lang.NoClassDefFoundError: 
>>> org/springframework/core/env/Environment
>>> what is the problem
>>> when I want to use the cocoon pipeline in my wicket application
>>> I have a dependency problem between flyingsaucer and
>>> org.apache.xmlgraphics fop 1.0
>>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>>
>> Hi,
>> it seems there are some issues with 3.0.0-alpha-3 maven archetypes: I 
>> have updated [1] with some workaround instructions that should fix 
>> your issues.
>>
>> Regards.
>>
>> [1] http://cocoon.apache.org/3.0/download.html

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Where do I find your workaround instructions ?

Am 03.07.2013 10:12, schrieb Francesco Chicchiriccò:
> On 03/07/2013 08:37, Piratenvisier wrote:
>> When i create the mysample block with the atchetype as described on 
>> the cocoon 3.0
>> homepage maven first complains that there is no cocoon-optional 
>> 3.0.0-alpha-3-SNAPSHOT dependency.
>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I 
>> start jetty
>> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
>> what is the problem
>> when I want to use the cocoon pipeline in my wicket application
>> I have a dependency problem between flyingsaucer and
>> org.apache.xmlgraphics fop 1.0
>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>
> Hi,
> it seems there are some issues with 3.0.0-alpha-3 maven archetypes: I 
> have updated [1] with some workaround instructions that should fix 
> your issues.
>
> Regards.
>
> [1] http://cocoon.apache.org/3.0/download.html
>


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


Re: using maven archetypes

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 03/07/2013 08:37, Piratenvisier wrote:
> When i create the mysample block with the atchetype as described on 
> the cocoon 3.0
> homepage maven first complains that there is no cocoon-optional 
> 3.0.0-alpha-3-SNAPSHOT dependency.
> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I 
> start jetty
> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
> what is the problem
> when I want to use the cocoon pipeline in my wicket application
> I have a dependency problem between flyingsaucer and
> org.apache.xmlgraphics fop 1.0
> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT

Hi,
it seems there are some issues with 3.0.0-alpha-3 maven archetypes: I 
have updated [1] with some workaround instructions that should fix your 
issues.

Regards.

[1] http://cocoon.apache.org/3.0/download.html

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Am 04.07.2013 15:04, schrieb Thorsten Scherler:
> Please do not crosspost but stay in the original thread.
>
> On 07/03/2013 08:37 AM, Piratenvisier wrote:
>> When i create the mysample block with the atchetype as described on
>> the cocoon 3.0
>> homepage maven first complains that there is no cocoon-optional
>> 3.0.0-alpha-3-SNAPSHOT dependency.
>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I
>> start jetty
>> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
>> what is the problem
>> when I want to use the cocoon pipeline in my wicket application
>> I have a dependency problem between flyingsaucer and
>> org.apache.xmlgraphics fop 1.0
>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>>
> On 07/04/2013 01:57 PM, Piratenvisier wrote:
>> Thank you I got it.
>> I was an adherent of cocoon from the beginning.
>> But with the upcoming AJAX I felt that for dynamic web it was not the
> rightt solution.
>> So I stopped to use it.I started my project again because thanks to
> cocoon's hompage I
>> noticed the upcoming wicket.
>> Wicket brought a new dynamic in my project there were only two
> use-cases for which I preferred cocoon.
>> For PDF generation and email-transport. I used flow :cocoon-protocol
> fop-ng
>> But this services could not be upgraded from cocoon 2.2.0 to 3.
>> Meanwhile I use hibernate and spring 3.1 and I would prefer to use the
> hibernate ojb-part with annotations in cocoon.
>> but in cocoon 3 first flow and cocoon-protokol is missing and I can
> not use spring 3.1
>> So the situation becomes worse and worse for me. So I am looking how
> to escape from cocoon
>> with flyingsaucer and an own email adaption maybe as soap-application.
>
> I do not really understand your problems. c3 is using
> <spring.version>3.2.2.RELEASE</spring.version>
> why can you use that but are bound to 3.1?
>
> Regarding the dep conflict you have I recommend to use the pom view of
> eclipse and there the dep hierarchy, where you can exclude certain deps
> directly.
>
> Regarding the sending mail, in one of our deployments we are using c3 to
> create the eMails in 2 different formats (html and plain text) and
> attach pdfs that we as well generate via fo from a pipeline. Further the
> solution is based on JMS to make it async and it works like a charm to
> invoke a cocoon java pipeline via JMSListener.
is your email solution part of the latest distrbution ?
When yes where can I find it ?

> Further c3 is designed to be integrated painlessly in whatever, meaning
> you can have a my faces app and some business code can call c3 pipelines
> to get data processed, so IMO it is now time to get into cocoon again.
>
> salu2
>


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


Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Hello Thorsten,

I got cocoon running under the latest wicket application.
Most time I spend because of the low degree of documentation.
The email adaption you spoke of is there some public access to it.
How can I transfer the content of a bean in the pipline, as I could do
it before with flowscript ?




Am 04.07.2013 15:04, schrieb Thorsten Scherler:
> Please do not crosspost but stay in the original thread.
>
> On 07/03/2013 08:37 AM, Piratenvisier wrote:
>> When i create the mysample block with the atchetype as described on
>> the cocoon 3.0
>> homepage maven first complains that there is no cocoon-optional
>> 3.0.0-alpha-3-SNAPSHOT dependency.
>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I
>> start jetty
>> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
>> what is the problem
>> when I want to use the cocoon pipeline in my wicket application
>> I have a dependency problem between flyingsaucer and
>> org.apache.xmlgraphics fop 1.0
>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>>
> On 07/04/2013 01:57 PM, Piratenvisier wrote:
>> Thank you I got it.
>> I was an adherent of cocoon from the beginning.
>> But with the upcoming AJAX I felt that for dynamic web it was not the
> rightt solution.
>> So I stopped to use it.I started my project again because thanks to
> cocoon's hompage I
>> noticed the upcoming wicket.
>> Wicket brought a new dynamic in my project there were only two
> use-cases for which I preferred cocoon.
>> For PDF generation and email-transport. I used flow :cocoon-protocol
> fop-ng
>> But this services could not be upgraded from cocoon 2.2.0 to 3.
>> Meanwhile I use hibernate and spring 3.1 and I would prefer to use the
> hibernate ojb-part with annotations in cocoon.
>> but in cocoon 3 first flow and cocoon-protokol is missing and I can
> not use spring 3.1
>> So the situation becomes worse and worse for me. So I am looking how
> to escape from cocoon
>> with flyingsaucer and an own email adaption maybe as soap-application.
>
> I do not really understand your problems. c3 is using
> <spring.version>3.2.2.RELEASE</spring.version>
> why can you use that but are bound to 3.1?
>
> Regarding the dep conflict you have I recommend to use the pom view of
> eclipse and there the dep hierarchy, where you can exclude certain deps
> directly.
>
> Regarding the sending mail, in one of our deployments we are using c3 to
> create the eMails in 2 different formats (html and plain text) and
> attach pdfs that we as well generate via fo from a pipeline. Further the
> solution is based on JMS to make it async and it works like a charm to
> invoke a cocoon java pipeline via JMSListener.
>
> Further c3 is designed to be integrated painlessly in whatever, meaning
> you can have a my faces app and some business code can call c3 pipelines
> to get data processed, so IMO it is now time to get into cocoon again.
>
> salu2
>


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


Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Where should I look for a replacement of the jx Generator which reads 
out a Pojo.
Where is the replacement for the good old cocoon protocol.
How the Pojo is delivered to the pipeline instead of the javascript flow?

Am 04.07.2013 18:13, schrieb Thorsten Scherler:
> On 07/04/2013 05:47 PM, Piratenvisier wrote:
>> Because I wanted to reduce my software engagement I didn't look in the
>> source trunk.
>> I only used the official maven archetypes.
>> I checked the source trunk out.
>> I will evaluate its state.
> It is much better then the alpha and we are close to release. I highly
> recommend it over the alpha.
>
> However I meant the pom.xml the archetypes creates on your project, the
> one that declared the dependencies.
>
> salu2
>


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


cocoon 3.0.0-beta-1-SNAPSHOT in wicket 6.9.0

Posted by Piratenvisier <ha...@yahoo.de>.
I tried to integrate cocoon 3.0.0-beta-1-SNAPSHOT
in wicket  6.9.0
as I have done it in wicket 6.3.0-beta-1-SNAPSHOT and cocoon 3.0.0-alpha-3
But my proprietary Mapper-adaption doesn't work.
I try now to use the original Mapper bat no success.
Is my configuration ok?
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:configurator="http://cocoon.apache.org/schema/configurator"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://cocoon.apache.org/schema/configurator 
http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd"
        default-lazy-init="true">
<!--xmlns:configurator="http://cocoon.apache.org/schema/configurator"-->
<!-- 
http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd-->
     <!-- Activates scanning of @Autowired -->
     <context:annotation-config/>

     <!-- Activates scanning of @Repository and @Service -->
     <context:component-scan base-package="braunimmobilien"/>

     <!-- Add new DAOs here -->

     <!-- Add new Managers here -->


  <!-- Add Cocoon here -->

<configurator:settings/>
  <import 
resource="classpath:META-INF/cocoon/spring-optional/cocoon-optional-fop.xml" 
/>
  <import 
resource="classpath:META-INF/cocoon/spring-optional/cocoon-optional-serializers.xml" 
/>
<!-- <bean name="transformer:sql" 
class="braunimmobilien.cocoon.sax.component.SQLTransformer" 
scope="prototype" />-->
</beans>

and do I use the right mapper

package org.apache.wicket.examples.cocoonobjectapproach.common.web;
//import braunimmobilien.cocoon.wicket.mapper.CocoonSitemapMapper;
import org.apache.cocoon.wicket.request.CocoonSitemapRequestMapper;
import org.apache.wicket.Page;
import org.apache.wicket.examples.WicketExampleApplication;

/**
  * Application class for the dates example.
  */
public class CocoonObjectApproachApplication extends 
WicketExampleApplication
{
     /**
      * Constructor.
      */
     public CocoonObjectApproachApplication()
     {
     }
@Override
     public void init()
     {
         super.init();
      this.mount(new CocoonSitemapRequestMapper("/sitemap", 
"/sitemap.xmap.xml"));
     }
     /**
      * @see org.apache.wicket.Application#getHomePage()
      */
     @Override
     public Class< ? extends Page> getHomePage()
     {
         return CocoonObjectApproachPage.class;
     }
}


Am 04.07.2013 18:13, schrieb Thorsten Scherler:
> On 07/04/2013 05:47 PM, Piratenvisier wrote:
>> Because I wanted to reduce my software engagement I didn't look in the
>> source trunk.
>> I only used the official maven archetypes.
>> I checked the source trunk out.
>> I will evaluate its state.
> It is much better then the alpha and we are close to release. I highly
> recommend it over the alpha.
>
> However I meant the pom.xml the archetypes creates on your project, the
> one that declared the dependencies.
>
> salu2
>


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


Re: using maven archetypes

Posted by Thorsten Scherler <sc...@gmail.com>.
On 07/04/2013 05:47 PM, Piratenvisier wrote:
> Because I wanted to reduce my software engagement I didn't look in the
> source trunk.
> I only used the official maven archetypes.
> I checked the source trunk out.
> I will evaluate its state.

It is much better then the alpha and we are close to release. I highly
recommend it over the alpha.

However I meant the pom.xml the archetypes creates on your project, the
one that declared the dependencies.

salu2

-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/


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


Re: using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
Because I wanted to reduce my software engagement I didn't look in the
source trunk.
I only used the official maven archetypes.
I checked the source trunk out.
I will evaluate its state.

Am 04.07.2013 15:04, schrieb Thorsten Scherler:
> Please do not crosspost but stay in the original thread.
>
> On 07/03/2013 08:37 AM, Piratenvisier wrote:
>> When i create the mysample block with the atchetype as described on
>> the cocoon 3.0
>> homepage maven first complains that there is no cocoon-optional
>> 3.0.0-alpha-3-SNAPSHOT dependency.
>> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I
>> start jetty
>> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
>> what is the problem
>> when I want to use the cocoon pipeline in my wicket application
>> I have a dependency problem between flyingsaucer and
>> org.apache.xmlgraphics fop 1.0
>> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>>
> On 07/04/2013 01:57 PM, Piratenvisier wrote:
>> Thank you I got it.
>> I was an adherent of cocoon from the beginning.
>> But with the upcoming AJAX I felt that for dynamic web it was not the
> rightt solution.
>> So I stopped to use it.I started my project again because thanks to
> cocoon's hompage I
>> noticed the upcoming wicket.
>> Wicket brought a new dynamic in my project there were only two
> use-cases for which I preferred cocoon.
>> For PDF generation and email-transport. I used flow :cocoon-protocol
> fop-ng
>> But this services could not be upgraded from cocoon 2.2.0 to 3.
>> Meanwhile I use hibernate and spring 3.1 and I would prefer to use the
> hibernate ojb-part with annotations in cocoon.
>> but in cocoon 3 first flow and cocoon-protokol is missing and I can
> not use spring 3.1
>> So the situation becomes worse and worse for me. So I am looking how
> to escape from cocoon
>> with flyingsaucer and an own email adaption maybe as soap-application.
>
> I do not really understand your problems. c3 is using
> <spring.version>3.2.2.RELEASE</spring.version>
> why can you use that but are bound to 3.1?
>
> Regarding the dep conflict you have I recommend to use the pom view of
> eclipse and there the dep hierarchy, where you can exclude certain deps
> directly.
>
> Regarding the sending mail, in one of our deployments we are using c3 to
> create the eMails in 2 different formats (html and plain text) and
> attach pdfs that we as well generate via fo from a pipeline. Further the
> solution is based on JMS to make it async and it works like a charm to
> invoke a cocoon java pipeline via JMSListener.
>
> Further c3 is designed to be integrated painlessly in whatever, meaning
> you can have a my faces app and some business code can call c3 pipelines
> to get data processed, so IMO it is now time to get into cocoon again.
>
> salu2
>


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


Re: using maven archetypes

Posted by Thorsten Scherler <sc...@gmail.com>.
Please do not crosspost but stay in the original thread.

On 07/03/2013 08:37 AM, Piratenvisier wrote:
> When i create the mysample block with the atchetype as described on
> the cocoon 3.0
> homepage maven first complains that there is no cocoon-optional
> 3.0.0-alpha-3-SNAPSHOT dependency.
> when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I
> start jetty
> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
> what is the problem
> when I want to use the cocoon pipeline in my wicket application
> I have a dependency problem between flyingsaucer and
> org.apache.xmlgraphics fop 1.0
> or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT
>

On 07/04/2013 01:57 PM, Piratenvisier wrote:
> Thank you I got it.
> I was an adherent of cocoon from the beginning.
> But with the upcoming AJAX I felt that for dynamic web it was not the
rightt solution.
> So I stopped to use it.I started my project again because thanks to
cocoon's hompage I
> noticed the upcoming wicket.
> Wicket brought a new dynamic in my project there were only two
use-cases for which I preferred cocoon.
> For PDF generation and email-transport. I used flow :cocoon-protocol
fop-ng
> But this services could not be upgraded from cocoon 2.2.0 to 3.
> Meanwhile I use hibernate and spring 3.1 and I would prefer to use the
hibernate ojb-part with annotations in cocoon.
> but in cocoon 3 first flow and cocoon-protokol is missing and I can
not use spring 3.1
> So the situation becomes worse and worse for me. So I am looking how
to escape from cocoon
> with flyingsaucer and an own email adaption maybe as soap-application.


I do not really understand your problems. c3 is using
<spring.version>3.2.2.RELEASE</spring.version>
why can you use that but are bound to 3.1?

Regarding the dep conflict you have I recommend to use the pom view of
eclipse and there the dep hierarchy, where you can exclude certain deps
directly.

Regarding the sending mail, in one of our deployments we are using c3 to
create the eMails in 2 different formats (html and plain text) and
attach pdfs that we as well generate via fo from a pipeline. Further the
solution is based on JMS to make it async and it works like a charm to
invoke a cocoon java pipeline via JMSListener.

Further c3 is designed to be integrated painlessly in whatever, meaning
you can have a my faces app and some business code can call c3 pipelines
to get data processed, so IMO it is now time to get into cocoon again.

salu2

-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/


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


using maven archetypes

Posted by Piratenvisier <ha...@yahoo.de>.
When i create the mysample block with the atchetype as described on the 
cocoon 3.0
homepage maven first complains that there is no cocoon-optional 
3.0.0-alpha-3-SNAPSHOT dependency.
when I ask for cocoon-optional 3.0.0-alpha-3 I get the error when I 
start jetty
java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
what is the problem
when I want to use the cocoon pipeline in my wicket application
I have a dependency problem between flyingsaucer and
org.apache.xmlgraphics fop 1.0
or org.apache.cocoon cocoon-fop-ng-impl 1.0.0-SNAPSHOT

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


Re: Cocoon-3.0.0-alpha-3 and spring

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 22/06/2013 16:32, Piratenvisier wrote:
> When Il install cocoon by the sample archetype
> and start jetty after installation I get the error
> java.lang.NoClassDefFoundError: org/springframework/core/env/Environment.
> What is the reason ?
> Does cocoon-3.0.0-alpha-3 work with spring 3.1.3

Hi,
Cocoon 3.0 alpha 3 was released with Spring 3.0.5, according to its 
parent POM [1]: I wouldn't move away from it.

Regards.

[1] 
http://repo1.maven.org/maven2/org/apache/cocoon/parent/cocoon-parent/3.0.0-alpha-3/cocoon-parent-3.0.0-alpha-3.pom

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Re: XSLT import/include errors

Posted by Jos Snellings <jo...@upperware.biz>.
OK, having a short look for:
<configurator:settings>
        <configurator:property
name="org.apache.cocoon.sax.lrucache-enabled" value="true"/>
later today



On Mon, Jun 24, 2013 at 10:05 AM, Francesco Chicchiriccò <
ilgrosso@apache.org> wrote:

>  On 24/06/2013 09:57, Jos Snellings wrote:
>
>    Hi Francesco et al,
>
>  Good idea. Where would you put the lever to switch LRU cache on/off?
>  - sitemap?
>  - cocoon spring configuration files?
>
>
> +1 for settings - as currently done for sitemap reload, for example.
>
> Regards.
>
>
>   So, the context is limited to developers who want to keep seeing
> instant results ...
>
> Cheers,
>  Jos
>
>  On Mon, Jun 24, 2013 at 9:43 AM, Francesco Chicchiriccò <
> ilgrosso@apache.org> wrote:
>
>> On 22/06/2013 11:25, gelo1234 wrote:
>>
>>>  And of course I'm using noncaching pipeline :)
>>>
>>> When I make a change in the main XSL file (that from sitemap), the
>>> change is visible.
>>> When I make a change in any of the imported/included (from main XSL) XSL
>>> file, the change is not visible. Cocoon serves
>>>  the Content from cache.-- Francesco Chicchiriccò ASF Member, Apache
>>> Syncope PMC chair, Apache Cocoon PMC Member
>>> http://people.apache.org/~ilgrosso/
>>>
>>
>> Hi,
>> this has nothing to do with pipeline caching: with pipeline caching, the
>> whole pipeline execution is cached (in memory, by default) and thus
>> subsequent calls to the same pipeline won't trigger any pipeline component
>> execution.
>>
>> What is causing you headaches (same did to me) is a local LRU cache
>> managed by some SAX components, including the XSLTTransformer [1]; as you
>> can see from the load() method, in fact, only the last modified timestamp
>> of the main XSLT file is taken into account for deciding whether the cached
>> template should be read.
>>
>> The local LRU cache is very useful in production but very annoying during
>> development: I guess it should stay enabled by default - as currently - but
>> also given the possibility to switch it off via some configuration
>> parameter: who wants to file an issue on JIRA and provide a patch? ;-)
>>
>> Regards.
>>
>> [1]
>> http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java
>>
>    --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Memberhttp://people.apache.org/~ilgrosso/
>
>


-- 
We should be careful to get out of an experience only the wisdom that is
in it - and stay there, lest we be like the cat that sits down on a hot
stove-lid.  She will never sit down on a hot stove-lid again - and that
is well; but also she will never sit down on a cold one any more.
        -- Mark Twain
 <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>

Re: XSLT import/include errors

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 24/06/2013 09:57, Jos Snellings wrote:
> Hi Francesco et al,
>
> Good idea. Where would you put the lever to switch LRU cache on/off?
> - sitemap?
> - cocoon spring configuration files?

+1 for settings - as currently done for sitemap reload, for example.

Regards.

> So, the context is limited to developers who want to keep seeing 
> instant results ...
>
> Cheers,
> Jos
>
> On Mon, Jun 24, 2013 at 9:43 AM, Francesco Chicchiriccò 
> <ilgrosso@apache.org <ma...@apache.org>> wrote:
>
>     On 22/06/2013 11:25, gelo1234 wrote:
>
>         And of course I'm using noncaching pipeline :)
>
>         When I make a change in the main XSL file (that from sitemap),
>         the change is visible.
>         When I make a change in any of the imported/included (from
>         main XSL) XSL file, the change is not visible. Cocoon serves
>         the Content from cache.-- Francesco Chicchiriccò ASF Member,
>         Apache Syncope PMC chair, Apache Cocoon PMC Member
>         http://people.apache.org/~ilgrosso/
>         <http://people.apache.org/%7Eilgrosso/>
>
>
>     Hi,
>     this has nothing to do with pipeline caching: with pipeline
>     caching, the whole pipeline execution is cached (in memory, by
>     default) and thus subsequent calls to the same pipeline won't
>     trigger any pipeline component execution.
>
>     What is causing you headaches (same did to me) is a local LRU
>     cache managed by some SAX components, including the
>     XSLTTransformer [1]; as you can see from the load() method, in
>     fact, only the last modified timestamp of the main XSLT file is
>     taken into account for deciding whether the cached template should
>     be read.
>
>     The local LRU cache is very useful in production but very annoying
>     during development: I guess it should stay enabled by default - as
>     currently - but also given the possibility to switch it off via
>     some configuration parameter: who wants to file an issue on JIRA
>     and provide a patch? ;-)
>
>     Regards.
>
>     [1]
>     http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java
>
-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: XSLT import/include errors

Posted by Jos Snellings <jo...@upperware.biz>.
Hi Francesco et al,

Good idea. Where would you put the lever to switch LRU cache on/off?
- sitemap?
- cocoon spring configuration files?

So, the context is limited to developers who want to keep seeing instant
results ...

Cheers,
Jos




On Mon, Jun 24, 2013 at 9:43 AM, Francesco Chicchiriccò <ilgrosso@apache.org
> wrote:

> On 22/06/2013 11:25, gelo1234 wrote:
>
>> And of course I'm using noncaching pipeline :)
>>
>> When I make a change in the main XSL file (that from sitemap), the change
>> is visible.
>> When I make a change in any of the imported/included (from main XSL) XSL
>> file, the change is not visible. Cocoon serves
>> the Content from cache.-- Francesco Chicchiriccò ASF Member, Apache
>> Syncope PMC chair, Apache Cocoon PMC Member http://people.apache.org/~**
>> ilgrosso/ <http://people.apache.org/~ilgrosso/>
>>
>
> Hi,
> this has nothing to do with pipeline caching: with pipeline caching, the
> whole pipeline execution is cached (in memory, by default) and thus
> subsequent calls to the same pipeline won't trigger any pipeline component
> execution.
>
> What is causing you headaches (same did to me) is a local LRU cache
> managed by some SAX components, including the XSLTTransformer [1]; as you
> can see from the load() method, in fact, only the last modified timestamp
> of the main XSLT file is taken into account for deciding whether the cached
> template should be read.
>
> The local LRU cache is very useful in production but very annoying during
> development: I guess it should stay enabled by default - as currently - but
> also given the possibility to switch it off via some configuration
> parameter: who wants to file an issue on JIRA and provide a patch? ;-)
>
> Regards.
>
> [1] http://svn.apache.org/repos/**asf/cocoon/cocoon3/trunk/**
> cocoon-sax/src/main/java/org/**apache/cocoon/sax/component/**
> XSLTTransformer.java<http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java>
>
> --
> Francesco Chicchiriccò
>
> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.**apache.org<us...@cocoon.apache.org>
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
We should be careful to get out of an experience only the wisdom that is
in it - and stay there, lest we be like the cat that sits down on a hot
stove-lid.  She will never sit down on a hot stove-lid again - and that
is well; but also she will never sit down on a cold one any more.
        -- Mark Twain
 <http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html>

Re: XSLT import/include errors

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 22/06/2013 11:25, gelo1234 wrote:
> And of course I'm using noncaching pipeline :)
>
> When I make a change in the main XSL file (that from sitemap), the 
> change is visible.
> When I make a change in any of the imported/included (from main XSL) 
> XSL file, the change is not visible. Cocoon serves
> the Content from cache.-- Francesco Chicchiriccò ASF Member, Apache 
> Syncope PMC chair, Apache Cocoon PMC Member 
> http://people.apache.org/~ilgrosso/

Hi,
this has nothing to do with pipeline caching: with pipeline caching, the 
whole pipeline execution is cached (in memory, by default) and thus 
subsequent calls to the same pipeline won't trigger any pipeline 
component execution.

What is causing you headaches (same did to me) is a local LRU cache 
managed by some SAX components, including the XSLTTransformer [1]; as 
you can see from the load() method, in fact, only the last modified 
timestamp of the main XSLT file is taken into account for deciding 
whether the cached template should be read.

The local LRU cache is very useful in production but very annoying 
during development: I guess it should stay enabled by default - as 
currently - but also given the possibility to switch it off via some 
configuration parameter: who wants to file an issue on JIRA and provide 
a patch? ;-)

Regards.

[1] 
http://svn.apache.org/repos/asf/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/XSLTTransformer.java

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


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


Cocoon-3.0.0-alpha-3 and spring

Posted by Piratenvisier <ha...@yahoo.de>.
When Il install cocoon by the sample archetype
and start jetty after installation I get the error
java.lang.NoClassDefFoundError: org/springframework/core/env/Environment.
What is the reason ?
Does cocoon-3.0.0-alpha-3 work with spring 3.1.3

Thanks for your help


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


Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
And of course I'm using noncaching pipeline :)

When I make a change in the main XSL file (that from sitemap), the change
is visible.
When I make a change in any of the imported/included (from main XSL) XSL
file, the change is not visible. Cocoon serves
the Content from cache.

Greetings,
Greg


2013/6/22 gelo1234 <ge...@gmail.com>

> The same problem appears with Saxon (any version).
>
> I think its rather C3 issue not XSLT engine.
>
> Greetings,
> Greg
>
>
>
> 2013/6/22 Javier Puerto <jp...@gmail.com>
>
>> Hi Greg,
>>
>> Did you tried yourself with Saxon? I had caching issues with Xalan but
>> never tried with Saxon before.
>>
>> Salu2.
>> El 22/06/2013 10:34, "gelo1234" <ge...@gmail.com> escribió:
>>
>> Now when everything is up and working fine, the really ennoying part of
>>> C3 is caching imported/included XSL files.
>>>
>>> Is there any way to invalidate that cache ? Or to turn if off ?
>>>
>>> I wouldn't like to restart the application server every time I make a
>>> small change inside imported/included XSL file :(
>>>
>>> Greetings,
>>> Greg
>>>
>>>
>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>
>>>> Solution: If you want to call Java functions freely from C3 XSLT, use
>>>> older Saxon implementation.
>>>> Version 9.1 works perfectly!
>>>>
>>>> Greetings,
>>>> Greg
>>>>
>>>>
>>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>>
>>>>> Looks like Saxon-HE doesn't support anymore calling Java functions
>>>>> that way:
>>>>>
>>>>>
>>>>> http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html
>>>>>
>>>>> But there are available in PE and EE versions, huh
>>>>>
>>>>> Greetings,
>>>>> Greg
>>>>>
>>>>>
>>>>>
>>>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>>>
>>>>>> Thanks for the tip. Unfortunately it doesn't work with:
>>>>>> Saxon-HE-9.5.0.2.jar :(
>>>>>>
>>>>>> Greetings,
>>>>>> Greg
>>>>>>
>>>>>>
>>>>>> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>>>>>>
>>>>>>>  That is possible but the how-to part depends on the Saxon version
>>>>>>> you are using.  You will need to dive into how to write extension functions
>>>>>>> for that particular implementation.
>>>>>>>
>>>>>>>  I used it a number of times with Saxon 8.7
>>>>>>>
>>>>>>>
>>>>>>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>>>>>>
>>>>>>>
>>>>>>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>>>>>>
>>>>>>>  But i never tried with the latest version of Saxon which works
>>>>>>> differently.
>>>>>>>
>>>>>>>  Robby
>>>>>>>  ------------------------------
>>>>>>> *Van:* gelo1234 [gelo1234@gmail.com]
>>>>>>> *Verzonden:* vrijdag 21 juni 2013 15:23
>>>>>>> *To:* Cocoon Users
>>>>>>> *Onderwerp:* Re: XSLT import/include errors
>>>>>>>
>>>>>>>      OK, one more question. Is it possible with Saxon/Xalan in C3
>>>>>>> to invoke external Java function ?
>>>>>>> I can't get it working:
>>>>>>>
>>>>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>>>> version="1.0"
>>>>>>>         xmlns:utils="java:org.example.Utils"
>>>>>>>         exclude-result-prefixes="utils">
>>>>>>>
>>>>>>>          <xsl:template match="Page">
>>>>>>>
>>>>>>>                       <xsl:variable name="fileName" select="file"/>
>>>>>>>
>>>>>>>                       <Root>
>>>>>>>                             <xsl:value-of
>>>>>>> select="utils:exists($fileName)"/>
>>>>>>>                       </Root>
>>>>>>>          </xsl:template>
>>>>>>>
>>>>>>>  </xsl:stylesheet>
>>>>>>>
>>>>>>>  Tried Xalan, tried Saxon. Both generates some strange errors with
>>>>>>> XML Document.
>>>>>>>
>>>>>>>  Greetings,
>>>>>>> Greg
>>>>>>>
>>>>>>>
>>>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>>>
>>>>>>>>  The latest Saxon got the same _global_ variable context scope and
>>>>>>>> doesn't allow overriding xsl:variables.
>>>>>>>>  OK, I will fix that :)
>>>>>>>>
>>>>>>>>  Greetings,
>>>>>>>> Greg
>>>>>>>>
>>>>>>>>
>>>>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thank you! I will try to bring back Saxon :)
>>>>>>>>>
>>>>>>>>>  Greetings,
>>>>>>>>> Greg
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    This was discused before in the mailing list [1], it's a two
>>>>>>>>>> step process
>>>>>>>>>>
>>>>>>>>>> * Add saxon dependency to pom file. [2]
>>>>>>>>>>
>>>>>>>>>>  I think it's better to try Saxon directly if you used to work
>>>>>>>>>> with it. Xalan is usually faster but as you have to migrate already made
>>>>>>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>>>>>>
>>>>>>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>>>>>>> [2]
>>>>>>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>      *The Future Group, dé maat in ondernemen*
>>>>>>>
>>>>>>>
>>>>>>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>>>>>>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>>>>>>> Mobiel nummer] 06 15879926  [image: Web-site]
>>>>>>> http://www.the-future-group.com [image: E-mail adres]
>>>>>>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31
>>>>>>> (0)79 - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>>>>>>>   http://twitter.com/futuregroup
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
The same problem appears with Saxon (any version).

I think its rather C3 issue not XSLT engine.

Greetings,
Greg



2013/6/22 Javier Puerto <jp...@gmail.com>

> Hi Greg,
>
> Did you tried yourself with Saxon? I had caching issues with Xalan but
> never tried with Saxon before.
>
> Salu2.
> El 22/06/2013 10:34, "gelo1234" <ge...@gmail.com> escribió:
>
> Now when everything is up and working fine, the really ennoying part of C3
>> is caching imported/included XSL files.
>>
>> Is there any way to invalidate that cache ? Or to turn if off ?
>>
>> I wouldn't like to restart the application server every time I make a
>> small change inside imported/included XSL file :(
>>
>> Greetings,
>> Greg
>>
>>
>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>
>>> Solution: If you want to call Java functions freely from C3 XSLT, use
>>> older Saxon implementation.
>>> Version 9.1 works perfectly!
>>>
>>> Greetings,
>>> Greg
>>>
>>>
>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>
>>>> Looks like Saxon-HE doesn't support anymore calling Java functions that
>>>> way:
>>>>
>>>>
>>>> http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html
>>>>
>>>> But there are available in PE and EE versions, huh
>>>>
>>>> Greetings,
>>>> Greg
>>>>
>>>>
>>>>
>>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>>
>>>>> Thanks for the tip. Unfortunately it doesn't work with:
>>>>> Saxon-HE-9.5.0.2.jar :(
>>>>>
>>>>> Greetings,
>>>>> Greg
>>>>>
>>>>>
>>>>> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>>>>>
>>>>>>  That is possible but the how-to part depends on the Saxon version
>>>>>> you are using.  You will need to dive into how to write extension functions
>>>>>> for that particular implementation.
>>>>>>
>>>>>>  I used it a number of times with Saxon 8.7
>>>>>>
>>>>>>
>>>>>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>>>>>
>>>>>>
>>>>>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>>>>>
>>>>>>  But i never tried with the latest version of Saxon which works
>>>>>> differently.
>>>>>>
>>>>>>  Robby
>>>>>>  ------------------------------
>>>>>> *Van:* gelo1234 [gelo1234@gmail.com]
>>>>>> *Verzonden:* vrijdag 21 juni 2013 15:23
>>>>>> *To:* Cocoon Users
>>>>>> *Onderwerp:* Re: XSLT import/include errors
>>>>>>
>>>>>>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
>>>>>> invoke external Java function ?
>>>>>> I can't get it working:
>>>>>>
>>>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>>> version="1.0"
>>>>>>         xmlns:utils="java:org.example.Utils"
>>>>>>         exclude-result-prefixes="utils">
>>>>>>
>>>>>>          <xsl:template match="Page">
>>>>>>
>>>>>>                       <xsl:variable name="fileName" select="file"/>
>>>>>>
>>>>>>                       <Root>
>>>>>>                             <xsl:value-of
>>>>>> select="utils:exists($fileName)"/>
>>>>>>                       </Root>
>>>>>>          </xsl:template>
>>>>>>
>>>>>>  </xsl:stylesheet>
>>>>>>
>>>>>>  Tried Xalan, tried Saxon. Both generates some strange errors with
>>>>>> XML Document.
>>>>>>
>>>>>>  Greetings,
>>>>>> Greg
>>>>>>
>>>>>>
>>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>>
>>>>>>>  The latest Saxon got the same _global_ variable context scope and
>>>>>>> doesn't allow overriding xsl:variables.
>>>>>>>  OK, I will fix that :)
>>>>>>>
>>>>>>>  Greetings,
>>>>>>> Greg
>>>>>>>
>>>>>>>
>>>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>>>
>>>>>>>>
>>>>>>>> Thank you! I will try to bring back Saxon :)
>>>>>>>>
>>>>>>>>  Greetings,
>>>>>>>> Greg
>>>>>>>>
>>>>>>>>
>>>>>>>>    This was discused before in the mailing list [1], it's a two
>>>>>>>>> step process
>>>>>>>>>
>>>>>>>>> * Add saxon dependency to pom file. [2]
>>>>>>>>>
>>>>>>>>>  I think it's better to try Saxon directly if you used to work
>>>>>>>>> with it. Xalan is usually faster but as you have to migrate already made
>>>>>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>>>>>
>>>>>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>>>>>> [2]
>>>>>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>      *The Future Group, dé maat in ondernemen*
>>>>>>
>>>>>>
>>>>>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>>>>>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>>>>>> Mobiel nummer] 06 15879926  [image: Web-site]
>>>>>> http://www.the-future-group.com [image: E-mail adres]
>>>>>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31
>>>>>> (0)79 - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>>>>>>   http://twitter.com/futuregroup
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>

Re: XSLT import/include errors

Posted by Javier Puerto <jp...@gmail.com>.
Hi Greg,

Did you tried yourself with Saxon? I had caching issues with Xalan but
never tried with Saxon before.

Salu2.
El 22/06/2013 10:34, "gelo1234" <ge...@gmail.com> escribió:

> Now when everything is up and working fine, the really ennoying part of C3
> is caching imported/included XSL files.
>
> Is there any way to invalidate that cache ? Or to turn if off ?
>
> I wouldn't like to restart the application server every time I make a
> small change inside imported/included XSL file :(
>
> Greetings,
> Greg
>
>
> 2013/6/21 gelo1234 <ge...@gmail.com>
>
>> Solution: If you want to call Java functions freely from C3 XSLT, use
>> older Saxon implementation.
>> Version 9.1 works perfectly!
>>
>> Greetings,
>> Greg
>>
>>
>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>
>>> Looks like Saxon-HE doesn't support anymore calling Java functions that
>>> way:
>>>
>>>
>>> http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html
>>>
>>> But there are available in PE and EE versions, huh
>>>
>>> Greetings,
>>> Greg
>>>
>>>
>>>
>>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>>
>>>> Thanks for the tip. Unfortunately it doesn't work with:
>>>> Saxon-HE-9.5.0.2.jar :(
>>>>
>>>> Greetings,
>>>> Greg
>>>>
>>>>
>>>> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>>>>
>>>>>  That is possible but the how-to part depends on the Saxon version
>>>>> you are using.  You will need to dive into how to write extension functions
>>>>> for that particular implementation.
>>>>>
>>>>>  I used it a number of times with Saxon 8.7
>>>>>
>>>>>
>>>>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>>>>
>>>>>
>>>>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>>>>
>>>>>  But i never tried with the latest version of Saxon which works
>>>>> differently.
>>>>>
>>>>>  Robby
>>>>>  ------------------------------
>>>>> *Van:* gelo1234 [gelo1234@gmail.com]
>>>>> *Verzonden:* vrijdag 21 juni 2013 15:23
>>>>> *To:* Cocoon Users
>>>>> *Onderwerp:* Re: XSLT import/include errors
>>>>>
>>>>>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
>>>>> invoke external Java function ?
>>>>> I can't get it working:
>>>>>
>>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>>> version="1.0"
>>>>>         xmlns:utils="java:org.example.Utils"
>>>>>         exclude-result-prefixes="utils">
>>>>>
>>>>>          <xsl:template match="Page">
>>>>>
>>>>>                       <xsl:variable name="fileName" select="file"/>
>>>>>
>>>>>                       <Root>
>>>>>                             <xsl:value-of
>>>>> select="utils:exists($fileName)"/>
>>>>>                       </Root>
>>>>>          </xsl:template>
>>>>>
>>>>>  </xsl:stylesheet>
>>>>>
>>>>>  Tried Xalan, tried Saxon. Both generates some strange errors with XML
>>>>> Document.
>>>>>
>>>>>  Greetings,
>>>>> Greg
>>>>>
>>>>>
>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>
>>>>>>  The latest Saxon got the same _global_ variable context scope and
>>>>>> doesn't allow overriding xsl:variables.
>>>>>>  OK, I will fix that :)
>>>>>>
>>>>>>  Greetings,
>>>>>> Greg
>>>>>>
>>>>>>
>>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>>
>>>>>>>
>>>>>>> Thank you! I will try to bring back Saxon :)
>>>>>>>
>>>>>>>  Greetings,
>>>>>>> Greg
>>>>>>>
>>>>>>>
>>>>>>>    This was discused before in the mailing list [1], it's a two
>>>>>>>> step process
>>>>>>>>
>>>>>>>> * Add saxon dependency to pom file. [2]
>>>>>>>>
>>>>>>>>  I think it's better to try Saxon directly if you used to work
>>>>>>>> with it. Xalan is usually faster but as you have to migrate already made
>>>>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>>>>
>>>>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>>>>> [2]
>>>>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>      *The Future Group, dé maat in ondernemen*
>>>>>
>>>>>
>>>>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>>>>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>>>>> Mobiel nummer] 06 15879926  [image: Web-site]
>>>>> http://www.the-future-group.com [image: E-mail adres]
>>>>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31
>>>>> (0)79 - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>>>>> http://twitter.com/futuregroup
>>>>>
>>>>
>>>>
>>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Now when everything is up and working fine, the really ennoying part of C3
is caching imported/included XSL files.

Is there any way to invalidate that cache ? Or to turn if off ?

I wouldn't like to restart the application server every time I make a small
change inside imported/included XSL file :(

Greetings,
Greg


2013/6/21 gelo1234 <ge...@gmail.com>

> Solution: If you want to call Java functions freely from C3 XSLT, use
> older Saxon implementation.
> Version 9.1 works perfectly!
>
> Greetings,
> Greg
>
>
> 2013/6/21 gelo1234 <ge...@gmail.com>
>
>> Looks like Saxon-HE doesn't support anymore calling Java functions that
>> way:
>>
>>
>> http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html
>>
>> But there are available in PE and EE versions, huh
>>
>> Greetings,
>> Greg
>>
>>
>>
>> 2013/6/21 gelo1234 <ge...@gmail.com>
>>
>>> Thanks for the tip. Unfortunately it doesn't work with:
>>> Saxon-HE-9.5.0.2.jar :(
>>>
>>> Greetings,
>>> Greg
>>>
>>>
>>> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>>>
>>>>  That is possible but the how-to part depends on the Saxon version you
>>>> are using.  You will need to dive into how to write extension functions for
>>>> that particular implementation.
>>>>
>>>>  I used it a number of times with Saxon 8.7
>>>>
>>>>
>>>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>>>
>>>>
>>>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>>>
>>>>  But i never tried with the latest version of Saxon which works
>>>> differently.
>>>>
>>>>  Robby
>>>>  ------------------------------
>>>> *Van:* gelo1234 [gelo1234@gmail.com]
>>>> *Verzonden:* vrijdag 21 juni 2013 15:23
>>>> *To:* Cocoon Users
>>>> *Onderwerp:* Re: XSLT import/include errors
>>>>
>>>>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
>>>> invoke external Java function ?
>>>> I can't get it working:
>>>>
>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>> version="1.0"
>>>>         xmlns:utils="java:org.example.Utils"
>>>>         exclude-result-prefixes="utils">
>>>>
>>>>          <xsl:template match="Page">
>>>>
>>>>                       <xsl:variable name="fileName" select="file"/>
>>>>
>>>>                       <Root>
>>>>                             <xsl:value-of
>>>> select="utils:exists($fileName)"/>
>>>>                       </Root>
>>>>          </xsl:template>
>>>>
>>>>  </xsl:stylesheet>
>>>>
>>>>  Tried Xalan, tried Saxon. Both generates some strange errors with XML
>>>> Document.
>>>>
>>>>  Greetings,
>>>> Greg
>>>>
>>>>
>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>
>>>>>  The latest Saxon got the same _global_ variable context scope and
>>>>> doesn't allow overriding xsl:variables.
>>>>>  OK, I will fix that :)
>>>>>
>>>>>  Greetings,
>>>>> Greg
>>>>>
>>>>>
>>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>>
>>>>>>
>>>>>> Thank you! I will try to bring back Saxon :)
>>>>>>
>>>>>>  Greetings,
>>>>>> Greg
>>>>>>
>>>>>>
>>>>>>    This was discused before in the mailing list [1], it's a two step
>>>>>>> process
>>>>>>>
>>>>>>> * Add saxon dependency to pom file. [2]
>>>>>>>
>>>>>>>  I think it's better to try Saxon directly if you used to work with
>>>>>>> it. Xalan is usually faster but as you have to migrate already made
>>>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>>>
>>>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>>>> [2]
>>>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>      *The Future Group, dé maat in ondernemen*
>>>>
>>>>
>>>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>>>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>>>> Mobiel nummer] 06 15879926  [image: Web-site]
>>>> http://www.the-future-group.com [image: E-mail adres]
>>>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31
>>>> (0)79 - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>>>> http://twitter.com/futuregroup
>>>>
>>>
>>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Solution: If you want to call Java functions freely from C3 XSLT, use older
Saxon implementation.
Version 9.1 works perfectly!

Greetings,
Greg


2013/6/21 gelo1234 <ge...@gmail.com>

> Looks like Saxon-HE doesn't support anymore calling Java functions that
> way:
>
>
> http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html
>
> But there are available in PE and EE versions, huh
>
> Greetings,
> Greg
>
>
>
> 2013/6/21 gelo1234 <ge...@gmail.com>
>
>> Thanks for the tip. Unfortunately it doesn't work with:
>> Saxon-HE-9.5.0.2.jar :(
>>
>> Greetings,
>> Greg
>>
>>
>> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>>
>>>  That is possible but the how-to part depends on the Saxon version you
>>> are using.  You will need to dive into how to write extension functions for
>>> that particular implementation.
>>>
>>>  I used it a number of times with Saxon 8.7
>>>
>>>
>>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>>
>>>
>>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>>
>>>  But i never tried with the latest version of Saxon which works
>>> differently.
>>>
>>>  Robby
>>>  ------------------------------
>>> *Van:* gelo1234 [gelo1234@gmail.com]
>>> *Verzonden:* vrijdag 21 juni 2013 15:23
>>> *To:* Cocoon Users
>>> *Onderwerp:* Re: XSLT import/include errors
>>>
>>>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
>>> invoke external Java function ?
>>> I can't get it working:
>>>
>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>> version="1.0"
>>>         xmlns:utils="java:org.example.Utils"
>>>         exclude-result-prefixes="utils">
>>>
>>>          <xsl:template match="Page">
>>>
>>>                       <xsl:variable name="fileName" select="file"/>
>>>
>>>                       <Root>
>>>                             <xsl:value-of
>>> select="utils:exists($fileName)"/>
>>>                       </Root>
>>>          </xsl:template>
>>>
>>>  </xsl:stylesheet>
>>>
>>>  Tried Xalan, tried Saxon. Both generates some strange errors with XML
>>> Document.
>>>
>>>  Greetings,
>>> Greg
>>>
>>>
>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>
>>>>  The latest Saxon got the same _global_ variable context scope and
>>>> doesn't allow overriding xsl:variables.
>>>>  OK, I will fix that :)
>>>>
>>>>  Greetings,
>>>> Greg
>>>>
>>>>
>>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>>
>>>>>
>>>>> Thank you! I will try to bring back Saxon :)
>>>>>
>>>>>  Greetings,
>>>>> Greg
>>>>>
>>>>>
>>>>>    This was discused before in the mailing list [1], it's a two step
>>>>>> process
>>>>>>
>>>>>> * Add saxon dependency to pom file. [2]
>>>>>>
>>>>>>  I think it's better to try Saxon directly if you used to work with
>>>>>> it. Xalan is usually faster but as you have to migrate already made
>>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>>
>>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>>> [2]
>>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>      *The Future Group, dé maat in ondernemen*
>>>
>>>
>>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>>> Mobiel nummer] 06 15879926  [image: Web-site]
>>> http://www.the-future-group.com [image: E-mail adres]
>>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31
>>> (0)79 - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>>> http://twitter.com/futuregroup
>>>
>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Looks like Saxon-HE doesn't support anymore calling Java functions that way:

http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/XSLT-2-0-Saxon-9-HE-and-call-java-functions-td4347.html

But there are available in PE and EE versions, huh

Greetings,
Greg



2013/6/21 gelo1234 <ge...@gmail.com>

> Thanks for the tip. Unfortunately it doesn't work with:
> Saxon-HE-9.5.0.2.jar :(
>
> Greetings,
> Greg
>
>
> 2013/6/21 Robby Pelssers <ro...@the-future-group.com>
>
>>  That is possible but the how-to part depends on the Saxon version you
>> are using.  You will need to dive into how to write extension functions for
>> that particular implementation.
>>
>>  I used it a number of times with Saxon 8.7
>>
>>
>> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>>
>>
>> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>>
>>  But i never tried with the latest version of Saxon which works
>> differently.
>>
>>  Robby
>>  ------------------------------
>> *Van:* gelo1234 [gelo1234@gmail.com]
>> *Verzonden:* vrijdag 21 juni 2013 15:23
>> *To:* Cocoon Users
>> *Onderwerp:* Re: XSLT import/include errors
>>
>>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
>> invoke external Java function ?
>> I can't get it working:
>>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> version="1.0"
>>         xmlns:utils="java:org.example.Utils"
>>         exclude-result-prefixes="utils">
>>
>>          <xsl:template match="Page">
>>
>>                       <xsl:variable name="fileName" select="file"/>
>>
>>                       <Root>
>>                             <xsl:value-of
>> select="utils:exists($fileName)"/>
>>                       </Root>
>>          </xsl:template>
>>
>>  </xsl:stylesheet>
>>
>>  Tried Xalan, tried Saxon. Both generates some strange errors with XML
>> Document.
>>
>>  Greetings,
>> Greg
>>
>>
>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>
>>>  The latest Saxon got the same _global_ variable context scope and
>>> doesn't allow overriding xsl:variables.
>>>  OK, I will fix that :)
>>>
>>>  Greetings,
>>> Greg
>>>
>>>
>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>
>>>>
>>>> Thank you! I will try to bring back Saxon :)
>>>>
>>>>  Greetings,
>>>> Greg
>>>>
>>>>
>>>>    This was discused before in the mailing list [1], it's a two step
>>>>> process
>>>>>
>>>>> * Add saxon dependency to pom file. [2]
>>>>>
>>>>>  I think it's better to try Saxon directly if you used to work with
>>>>> it. Xalan is usually faster but as you have to migrate already made
>>>>> templates from Saxon IMO it's better to switch the engine.
>>>>>
>>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>>> [2]
>>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>      *The Future Group, dé maat in ondernemen*
>>
>>
>>   [image: The Future Group] <http://www.the-future-group.com> [image:
>> The Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
>> Mobiel nummer] 06 15879926  [image: Web-site]
>> http://www.the-future-group.com [image: E-mail adres]
>> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31 (0)79
>> - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
>> http://twitter.com/futuregroup
>>
>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Thanks for the tip. Unfortunately it doesn't work with:
Saxon-HE-9.5.0.2.jar :(

Greetings,
Greg


2013/6/21 Robby Pelssers <ro...@the-future-group.com>

>  That is possible but the how-to part depends on the Saxon version you
> are using.  You will need to dive into how to write extension functions for
> that particular implementation.
>
>  I used it a number of times with Saxon 8.7
>
>
> http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html
>
>
> http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html
>
>  But i never tried with the latest version of Saxon which works
> differently.
>
>  Robby
>  ------------------------------
> *Van:* gelo1234 [gelo1234@gmail.com]
> *Verzonden:* vrijdag 21 juni 2013 15:23
> *To:* Cocoon Users
> *Onderwerp:* Re: XSLT import/include errors
>
>      OK, one more question. Is it possible with Saxon/Xalan in C3 to
> invoke external Java function ?
> I can't get it working:
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0"
>         xmlns:utils="java:org.example.Utils"
>         exclude-result-prefixes="utils">
>
>          <xsl:template match="Page">
>
>                       <xsl:variable name="fileName" select="file"/>
>
>                       <Root>
>                             <xsl:value-of
> select="utils:exists($fileName)"/>
>                       </Root>
>          </xsl:template>
>
>  </xsl:stylesheet>
>
>  Tried Xalan, tried Saxon. Both generates some strange errors with XML
> Document.
>
>  Greetings,
> Greg
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
>>  The latest Saxon got the same _global_ variable context scope and
>> doesn't allow overriding xsl:variables.
>>  OK, I will fix that :)
>>
>>  Greetings,
>> Greg
>>
>>
>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>
>>>
>>> Thank you! I will try to bring back Saxon :)
>>>
>>>  Greetings,
>>> Greg
>>>
>>>
>>>    This was discused before in the mailing list [1], it's a two step
>>>> process
>>>>
>>>> * Add saxon dependency to pom file. [2]
>>>>
>>>>  I think it's better to try Saxon directly if you used to work with
>>>> it. Xalan is usually faster but as you have to migrate already made
>>>> templates from Saxon IMO it's better to switch the engine.
>>>>
>>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>>> [2]
>>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>>
>>>>
>>>>
>>>
>>
>      *The Future Group, dé maat in ondernemen*
>
>
>   [image: The Future Group] <http://www.the-future-group.com> [image: The
> Future Group kantoor]   Röntgenlaan 27 | 2719 DX Zoetermeer [image:
> Mobiel nummer] 06 15879926  [image: Web-site]
> http://www.the-future-group.com [image: E-mail adres]
> robby.pelssers@the-future-group.com  [image: Telefoonnummer]   +31 (0)79
> - 363 2905 [image: LinkedIn account]   [image: Twitteraccount]
> http://twitter.com/futuregroup
>

RE: XSLT import/include errors

Posted by Robby Pelssers <ro...@the-future-group.com>.
That is possible but the how-to part depends on the Saxon version you are using.  You will need to dive into how to write extension functions for that particular implementation.

I used it a number of times with Saxon 8.7

http://robbypelssers.blogspot.nl/2012/10/creating-unix-timestamp-with-xslt20.html

http://robbypelssers.blogspot.nl/2011/09/power-of-apache-cocoon-xquery-and-xslt.html

But i never tried with the latest version of Saxon which works differently.

Robby
________________________________
Van: gelo1234 [gelo1234@gmail.com]
Verzonden: vrijdag 21 juni 2013 15:23
To: Cocoon Users
Onderwerp: Re: XSLT import/include errors

OK, one more question. Is it possible with Saxon/Xalan in C3 to invoke external Java function ?
I can't get it working:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
        xmlns:utils="java:org.example.Utils"
        exclude-result-prefixes="utils">

        <xsl:template match="Page">

                     <xsl:variable name="fileName" select="file"/>

                     <Root>
                           <xsl:value-of select="utils:exists($fileName)"/>
                     </Root>
        </xsl:template>

</xsl:stylesheet>

Tried Xalan, tried Saxon. Both generates some strange errors with XML Document.

Greetings,
Greg


2013/6/20 gelo1234 <ge...@gmail.com>>
The latest Saxon got the same _global_ variable context scope and doesn't allow overriding xsl:variables.
OK, I will fix that :)

Greetings,
Greg


2013/6/20 gelo1234 <ge...@gmail.com>>

Thank you! I will try to bring back Saxon :)

Greetings,
Greg


This was discused before in the mailing list [1], it's a two step process

* Add saxon dependency to pom file. [2]

I think it's better to try Saxon directly if you used to work with it. Xalan is usually faster but as you have to migrate already made templates from Saxon IMO it's better to switch the engine.

[1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
[2] http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results






The Future Group, dé maat in ondernemen



[The Future Group]<www.the-future-group.com>    [The Future Group kantoor]              Röntgenlaan 27 | 2719 DX Zoetermeer     [Mobiel nummer]                 06 15879926
[Web-site]              http://www.the-future-group.com [E-mail adres]          robby.pelssers@the-future-group.com
[Telefoonnummer]                +31 (0)79 - 363 2905    [LinkedIn account]
[Twitteraccount]                http://twitter.com/futuregroup



Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
OK, one more question. Is it possible with Saxon/Xalan in C3 to invoke
external Java function ?
I can't get it working:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
        xmlns:utils="java:org.example.Utils"
        exclude-result-prefixes="utils">

        <xsl:template match="Page">

                     <xsl:variable name="fileName" select="file"/>

                     <Root>
                           <xsl:value-of select="utils:exists($fileName)"/>
                     </Root>
        </xsl:template>

</xsl:stylesheet>

Tried Xalan, tried Saxon. Both generates some strange errors with XML
Document.

Greetings,
Greg


2013/6/20 gelo1234 <ge...@gmail.com>

> The latest Saxon got the same _global_ variable context scope and doesn't
> allow overriding xsl:variables.
> OK, I will fix that :)
>
> Greetings,
> Greg
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
>>
>> Thank you! I will try to bring back Saxon :)
>>
>> Greetings,
>> Greg
>>
>>
>> This was discused before in the mailing list [1], it's a two step process
>>>
>>> * Add saxon dependency to pom file. [2]
>>>
>>> I think it's better to try Saxon directly if you used to work with it.
>>> Xalan is usually faster but as you have to migrate already made templates
>>> from Saxon IMO it's better to switch the engine.
>>>
>>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>>> [2]
>>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>>
>>>
>>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
The latest Saxon got the same _global_ variable context scope and doesn't
allow overriding xsl:variables.
OK, I will fix that :)

Greetings,
Greg


2013/6/20 gelo1234 <ge...@gmail.com>

>
> Thank you! I will try to bring back Saxon :)
>
> Greetings,
> Greg
>
>
> This was discused before in the mailing list [1], it's a two step process
>>
>> * Add saxon dependency to pom file. [2]
>>
>> I think it's better to try Saxon directly if you used to work with it.
>> Xalan is usually faster but as you have to migrate already made templates
>> from Saxon IMO it's better to switch the engine.
>>
>> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
>> [2]
>> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>>
>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Thank you! I will try to bring back Saxon :)

Greetings,
Greg


This was discused before in the mailing list [1], it's a two step process
>
> * Add saxon dependency to pom file. [2]
>
> I think it's better to try Saxon directly if you used to work with it.
> Xalan is usually faster but as you have to migrate already made templates
> from Saxon IMO it's better to switch the engine.
>
> [1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
> [2]
> http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results
>
>
>

Re: XSLT import/include errors

Posted by Javier Puerto <jp...@gmail.com>.
2013/6/20 gelo1234 <ge...@gmail.com>

> Right, it was NOT Xalan, I used Saxon in my old config. Where could we
> change Xalan to Saxon in C3 ?
>

This was discused before in the mailing list [1], it's a two step process

* Add saxon dependency to pom file. [2]
* Create file META-INF/services/javax.xml.transform.TransformerFactory with
content:

net.sf.saxon.TransformerFactoryImpl

But you can't use both engines at the same time.


>
> Now I've got another "strange" XSL error:
> XML document structures must start and end within the same entity.
>
> What could that mean??? :)
>
> That Xalan is making me scratching my head against the wall :)
>

I think it's better to try Saxon directly if you used to work with it.
Xalan is usually faster but as you have to migrate already made templates
from Saxon IMO it's better to switch the engine.

[1] http://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE
[2]
http://cocoon.markmail.org/message/mjuftsfwdxmnc5fn?q=saxon#query:saxon+page:1+mid:fe2faygf7jdfrzb3+state:results


> Greetings,
> Greg
>
>
> 2013/6/20 Javier Puerto <jp...@gmail.com>
>
>>
>>
>>
>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>
>>> OK, resolved the issue. Deleted xslt/ directory :/ and now its starting.
>>> STRANGE!!
>>>
>>
>> Yeah, computer's stuff. :)
>>
>>
>>>
>>> And also found that more detailed error info about not being able to
>>> compile XSLT stylesheet was in Tomcat log.
>>>
>>> It seems that with C3 <xsl:variables../> cannot be inherited. The error
>>> said about the same <xsl:variable .../> being defined in 2 different places
>>> :/
>>> One place - in main XSL file and other one - in imported XSL file.
>>>
>>> While it worked fine in C2.1. I use extensively <xsl:template /> and
>>> <xsl:variable ../> inheritance, now in C3 it makes XSLT not being compiled
>>> :/
>>>
>>
>> What version of C2.1 did you use? Maybe old Xalan? I've found the
>> following note in the Xalan documentation [1]:
>>
>> "Note that all top-level parameters and variables from all imported and
>> included stylesheets will be placed as direct children of the top-level
>> stylesheet in the AST. This done to make global variables truly global and
>> not just global in the stylesheet where it was declared."
>>
>> You should avoid duplicate variable declarations, at the end of the page
>> it's explained how the forward references works. You could extract some
>> common variables to a XSLT template so you can use several templates
>> without collision.
>>
>>  [1]: http://xml.apache.org/xalan-j/xsltc/xsl_variable_design.html
>>
>>
>>> Greetings,
>>> Greg
>>>
>>>
>>>
>>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>>
>>>>
>>>> Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
>>>> doesn't help. I tried to clean work directory, and still
>>>> NullPointerException.
>>>>
>>>> Any idea what might be wrong ?
>>>> And how to switch off imported xslt caching ?
>>>>
>>>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
>>>> cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
>>>> deployDirectory
>>>> INFO: Deploying web application directory
>>>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>>>> cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
>>>> addChildInternal
>>>> SEVERE: ContainerBase.addChild: start:
>>>> org.apache.catalina.LifecycleException: Failed to start component
>>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>>>     at
>>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>>>     at
>>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>>>     at
>>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>>>     at
>>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>>>     at
>>>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>>>     at
>>>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>>>> Source)
>>>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>>> Source)
>>>>     at java.lang.Thread.run(Unknown Source)
>>>> Caused by: java.lang.NullPointerException
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>>>>     at
>>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>>>>     at
>>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>>     at
>>>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>>>     at
>>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
>>>>     at
>>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>>>     ... 11 more
>>>>
>>>> cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
>>>> deployDirectory
>>>> SEVERE: Error deploying web application directory
>>>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>>>> java.lang.IllegalStateException: ContainerBase.addChild: start:
>>>> org.apache.catalina.LifecycleException: Failed to start component
>>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>>>     at
>>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>>>>     at
>>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>>>     at
>>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>>>     at
>>>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>>>     at
>>>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>>>> Source)
>>>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>>>> Source)
>>>>     at java.lang.Thread.run(Unknown Source)
>>>>
>>>> Greetings,
>>>> Greg
>>>>
>>>>
>>>>
>>>> 2013/6/20 Javier Puerto <jp...@gmail.com>
>>>>
>>>>> Hi Greg,
>>>>>
>>>>> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>>>>>
>>>>> >
>>>>> >
>>>>> > It looks like XSLT also got cut in functionality in C3. I tried to
>>>>> rerun old XSL stylesheets with new C3 and gave up.
>>>>> >
>>>>> > The error says nothing meaningful:
>>>>> >
>>>>> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
>>>>> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
>>>>> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see
>>>>> nested exception</message><cause>Could not compile
>>>>> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
>>>>> Could not compile stylesheet
>>>>> >     at
>>>>> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
>>>>> Source)
>>>>> >     at
>>>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>>>>> >     at
>>>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>>>>> >     at
>>>>> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>>>>> >     at
>>>>> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>>>>> >     at
>>>>> >
>>>>> > It looks like there is a problem with xsl:import/xsl:include from
>>>>> the main xsl stylesheet.
>>>>>
>>>>> You are right, seems to be a problem with the imports. I've used
>>>>> Imports and includes with cocoo3 without problems, except that imported
>>>>> files are cached and doesn't update running in RCL. The xslt engine is
>>>>> still xalan so the templates should work like before except for the sources
>>>>> with cocoon:/ protocol that aren't supported.
>>>>>
>>>>> > Moreover I found that when <xsl:template match="RootElement" is not
>>>>> in the main XSL stylesheet the same error appears.
>>>>>
>>>>> Could you send an example block to reproduce the issue?
>>>>>
>>>>> >
>>>>> > Can we switch on more debugging info what is wrong ?
>>>>>
>>>>> You can edit the logback.xml file and set level to debug but the
>>>>> exception comes from xalan. I suggest to look for sources loaded with
>>>>> cocoon:/ in your code and substitute by servlet:/.
>>>>>
>>>>> >
>>>>> > Greetings,
>>>>> > Greg
>>>>>
>>>>> Salu2.
>>>>>
>>>>
>>>>
>>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Right, it was NOT Xalan, I used Saxon in my old config. Where could we
change Xalan to Saxon in C3 ?

Now I've got another "strange" XSL error:
XML document structures must start and end within the same entity.

What could that mean??? :)

That Xalan is making me scratching my head against the wall :)

Greetings,
Greg


2013/6/20 Javier Puerto <jp...@gmail.com>

>
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
>> OK, resolved the issue. Deleted xslt/ directory :/ and now its starting.
>> STRANGE!!
>>
>
> Yeah, computer's stuff. :)
>
>
>>
>> And also found that more detailed error info about not being able to
>> compile XSLT stylesheet was in Tomcat log.
>>
>> It seems that with C3 <xsl:variables../> cannot be inherited. The error
>> said about the same <xsl:variable .../> being defined in 2 different places
>> :/
>> One place - in main XSL file and other one - in imported XSL file.
>>
>> While it worked fine in C2.1. I use extensively <xsl:template /> and
>> <xsl:variable ../> inheritance, now in C3 it makes XSLT not being compiled
>> :/
>>
>
> What version of C2.1 did you use? Maybe old Xalan? I've found the
> following note in the Xalan documentation [1]:
>
> "Note that all top-level parameters and variables from all imported and
> included stylesheets will be placed as direct children of the top-level
> stylesheet in the AST. This done to make global variables truly global and
> not just global in the stylesheet where it was declared."
>
> You should avoid duplicate variable declarations, at the end of the page
> it's explained how the forward references works. You could extract some
> common variables to a XSLT template so you can use several templates
> without collision.
>
>  [1]: http://xml.apache.org/xalan-j/xsltc/xsl_variable_design.html
>
>
>> Greetings,
>> Greg
>>
>>
>>
>> 2013/6/20 gelo1234 <ge...@gmail.com>
>>
>>>
>>> Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
>>> doesn't help. I tried to clean work directory, and still
>>> NullPointerException.
>>>
>>> Any idea what might be wrong ?
>>> And how to switch off imported xslt caching ?
>>>
>>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
>>> cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
>>> deployDirectory
>>> INFO: Deploying web application directory
>>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>>> cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
>>> addChildInternal
>>> SEVERE: ContainerBase.addChild: start:
>>> org.apache.catalina.LifecycleException: Failed to start component
>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>>     at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>>     at
>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>>     at
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>>     at
>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>>     at
>>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>>     at
>>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>>> Source)
>>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>>     at java.lang.Thread.run(Unknown Source)
>>> Caused by: java.lang.NullPointerException
>>>     at
>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>>>     at
>>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>>>     at
>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>>     at
>>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>>     at
>>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
>>>     at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>>     ... 11 more
>>>
>>> cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
>>> deployDirectory
>>> SEVERE: Error deploying web application directory
>>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>>> java.lang.IllegalStateException: ContainerBase.addChild: start:
>>> org.apache.catalina.LifecycleException: Failed to start component
>>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>>     at
>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>>>     at
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>>     at
>>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>>     at
>>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>>     at
>>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
>>> Source)
>>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>>     at java.lang.Thread.run(Unknown Source)
>>>
>>> Greetings,
>>> Greg
>>>
>>>
>>>
>>> 2013/6/20 Javier Puerto <jp...@gmail.com>
>>>
>>>> Hi Greg,
>>>>
>>>> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>>>>
>>>> >
>>>> >
>>>> > It looks like XSLT also got cut in functionality in C3. I tried to
>>>> rerun old XSL stylesheets with new C3 and gave up.
>>>> >
>>>> > The error says nothing meaningful:
>>>> >
>>>> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
>>>> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
>>>> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
>>>> exception</message><cause>Could not compile
>>>> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
>>>> Could not compile stylesheet
>>>> >     at
>>>> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
>>>> Source)
>>>> >     at
>>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>>>> >     at
>>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>>>> >     at
>>>> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>>>> >     at
>>>> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>>>> >     at
>>>> >
>>>> > It looks like there is a problem with xsl:import/xsl:include from the
>>>> main xsl stylesheet.
>>>>
>>>> You are right, seems to be a problem with the imports. I've used
>>>> Imports and includes with cocoo3 without problems, except that imported
>>>> files are cached and doesn't update running in RCL. The xslt engine is
>>>> still xalan so the templates should work like before except for the sources
>>>> with cocoon:/ protocol that aren't supported.
>>>>
>>>> > Moreover I found that when <xsl:template match="RootElement" is not
>>>> in the main XSL stylesheet the same error appears.
>>>>
>>>> Could you send an example block to reproduce the issue?
>>>>
>>>> >
>>>> > Can we switch on more debugging info what is wrong ?
>>>>
>>>> You can edit the logback.xml file and set level to debug but the
>>>> exception comes from xalan. I suggest to look for sources loaded with
>>>> cocoon:/ in your code and substitute by servlet:/.
>>>>
>>>> >
>>>> > Greetings,
>>>> > Greg
>>>>
>>>> Salu2.
>>>>
>>>
>>>
>>
>

Re: XSLT import/include errors

Posted by Javier Puerto <jp...@gmail.com>.
2013/6/20 gelo1234 <ge...@gmail.com>

> OK, resolved the issue. Deleted xslt/ directory :/ and now its starting.
> STRANGE!!
>

Yeah, computer's stuff. :)


>
> And also found that more detailed error info about not being able to
> compile XSLT stylesheet was in Tomcat log.
>
> It seems that with C3 <xsl:variables../> cannot be inherited. The error
> said about the same <xsl:variable .../> being defined in 2 different places
> :/
> One place - in main XSL file and other one - in imported XSL file.
>
> While it worked fine in C2.1. I use extensively <xsl:template /> and
> <xsl:variable ../> inheritance, now in C3 it makes XSLT not being compiled
> :/
>

What version of C2.1 did you use? Maybe old Xalan? I've found the following
note in the Xalan documentation [1]:

"Note that all top-level parameters and variables from all imported and
included stylesheets will be placed as direct children of the top-level
stylesheet in the AST. This done to make global variables truly global and
not just global in the stylesheet where it was declared."

You should avoid duplicate variable declarations, at the end of the page
it's explained how the forward references works. You could extract some
common variables to a XSLT template so you can use several templates
without collision.

 [1]: http://xml.apache.org/xalan-j/xsltc/xsl_variable_design.html


> Greetings,
> Greg
>
>
>
> 2013/6/20 gelo1234 <ge...@gmail.com>
>
>>
>> Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
>> doesn't help. I tried to clean work directory, and still
>> NullPointerException.
>>
>> Any idea what might be wrong ?
>> And how to switch off imported xslt caching ?
>>
>> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
>> cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory
>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>> cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
>> addChildInternal
>> SEVERE: ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>>     at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>>     at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>     at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>     at
>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>     at
>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>     at java.lang.Thread.run(Unknown Source)
>> Caused by: java.lang.NullPointerException
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>>     at
>> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
>>     at
>> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>>     at
>> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>>     at
>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>>     at
>> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>>     at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
>>     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>     ... 11 more
>>
>> cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> SEVERE: Error deploying web application directory
>> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
>> java.lang.IllegalStateException: ContainerBase.addChild: start:
>> org.apache.catalina.LifecycleException: Failed to start component
>> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>>     at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>>     at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>>     at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>>     at
>> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>>     at
>> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>     at java.lang.Thread.run(Unknown Source)
>>
>> Greetings,
>> Greg
>>
>>
>>
>> 2013/6/20 Javier Puerto <jp...@gmail.com>
>>
>>> Hi Greg,
>>>
>>> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>>>
>>> >
>>> >
>>> > It looks like XSLT also got cut in functionality in C3. I tried to
>>> rerun old XSL stylesheets with new C3 and gave up.
>>> >
>>> > The error says nothing meaningful:
>>> >
>>> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
>>> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
>>> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
>>> exception</message><cause>Could not compile
>>> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
>>> Could not compile stylesheet
>>> >     at
>>> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
>>> Source)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>>> >     at
>>> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>>> >     at
>>> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>>> >     at
>>> >
>>> > It looks like there is a problem with xsl:import/xsl:include from the
>>> main xsl stylesheet.
>>>
>>> You are right, seems to be a problem with the imports. I've used Imports
>>> and includes with cocoo3 without problems, except that imported files are
>>> cached and doesn't update running in RCL. The xslt engine is still xalan so
>>> the templates should work like before except for the sources with cocoon:/
>>> protocol that aren't supported.
>>>
>>> > Moreover I found that when <xsl:template match="RootElement" is not in
>>> the main XSL stylesheet the same error appears.
>>>
>>> Could you send an example block to reproduce the issue?
>>>
>>> >
>>> > Can we switch on more debugging info what is wrong ?
>>>
>>> You can edit the logback.xml file and set level to debug but the
>>> exception comes from xalan. I suggest to look for sources loaded with
>>> cocoon:/ in your code and substitute by servlet:/.
>>>
>>> >
>>> > Greetings,
>>> > Greg
>>>
>>> Salu2.
>>>
>>
>>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
OK, resolved the issue. Deleted xslt/ directory :/ and now its starting.
STRANGE!!

And also found that more detailed error info about not being able to
compile XSLT stylesheet was in Tomcat log.

It seems that with C3 <xsl:variables../> cannot be inherited. The error
said about the same <xsl:variable .../> being defined in 2 different places
:/
One place - in main XSL file and other one - in imported XSL file.

While it worked fine in C2.1. I use extensively <xsl:template /> and
<xsl:variable ../> inheritance, now in C3 it makes XSLT not being compiled
:/

Greetings,
Greg



2013/6/20 gelo1234 <ge...@gmail.com>

>
> Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
> doesn't help. I tried to clean work directory, and still
> NullPointerException.
>
> Any idea what might be wrong ?
> And how to switch off imported xslt caching ?
>
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
> cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
> cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
> addChildInternal
> SEVERE: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
>     at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>     at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>     at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>     at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>     at
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>     at java.util.concurrent.FutureTask.run(Unknown Source)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>     at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
>     at
> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
>     at
> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>     at
> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>     at
> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>     at
> org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
>     at
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
>     at
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
>     at
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
>     at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>     at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>     at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     ... 11 more
>
> cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> SEVERE: Error deploying web application directory
> /var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
> java.lang.IllegalStateException: ContainerBase.addChild: start:
> org.apache.catalina.LifecycleException: Failed to start component
> [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
>     at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
>     at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>     at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
>     at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
>     at
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
>     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>     at java.util.concurrent.FutureTask.run(Unknown Source)
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>     at java.lang.Thread.run(Unknown Source)
>
> Greetings,
> Greg
>
>
>
> 2013/6/20 Javier Puerto <jp...@gmail.com>
>
>> Hi Greg,
>>
>> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>>
>> >
>> >
>> > It looks like XSLT also got cut in functionality in C3. I tried to
>> rerun old XSL stylesheets with new C3 and gave up.
>> >
>> > The error says nothing meaningful:
>> >
>> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
>> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
>> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
>> exception</message><cause>Could not compile
>> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
>> Could not compile stylesheet
>> >     at
>> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
>> Source)
>> >     at
>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>> >     at
>> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>> >     at
>> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>> >     at
>> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>> >     at
>> >
>> > It looks like there is a problem with xsl:import/xsl:include from the
>> main xsl stylesheet.
>>
>> You are right, seems to be a problem with the imports. I've used Imports
>> and includes with cocoo3 without problems, except that imported files are
>> cached and doesn't update running in RCL. The xslt engine is still xalan so
>> the templates should work like before except for the sources with cocoon:/
>> protocol that aren't supported.
>>
>> > Moreover I found that when <xsl:template match="RootElement" is not in
>> the main XSL stylesheet the same error appears.
>>
>> Could you send an example block to reproduce the issue?
>>
>> >
>> > Can we switch on more debugging info what is wrong ?
>>
>> You can edit the logback.xml file and set level to debug but the
>> exception comes from xalan. I suggest to look for sources loaded with
>> cocoon:/ in your code and substitute by servlet:/.
>>
>> >
>> > Greetings,
>> > Greg
>>
>> Salu2.
>>
>
>

Re: XSLT import/include errors

Posted by gelo1234 <ge...@gmail.com>.
Now Im lost. The Cocoon context doesn't work anymore. Restarting Tomcat
doesn't help. I tried to clean work directory, and still
NullPointerException.

Any idea what might be wrong ?
And how to switch off imported xslt caching ?

INFO: Starting Servlet Engine: Apache Tomcat/7.0.40
cze 20, 2013 8:43:28 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
cze 20, 2013 8:43:29 PM org.apache.catalina.core.ContainerBase
addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
    at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at
org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2092)
    at
org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
    at
org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
    at
org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
    at
org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
    at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
    at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

cze 20, 2013 8:43:29 PM org.apache.catalina.startup.HostConfig
deployDirectory
SEVERE: Error deploying web application directory
/var/lib/tomcat/webapps/mywebapp-1.0-SNAPSHOT
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/mywebapp-1.0-SNAPSHOT]]
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
    at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1672)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Greetings,
Greg



2013/6/20 Javier Puerto <jp...@gmail.com>

> Hi Greg,
>
> El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>
> >
> >
> > It looks like XSLT also got cut in functionality in C3. I tried to rerun
> old XSL stylesheets with new C3 and gave up.
> >
> > The error says nothing meaningful:
> >
> > <exception-report class="org.apache.cocoon.pipeline.SetupException"
> timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
> XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
> exception</message><cause>Could not compile
> stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
> Could not compile stylesheet
> >     at
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
> Source)
> >     at
> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
> >     at
> org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
> >     at
> org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
> >     at
> org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
> >     at
> >
> > It looks like there is a problem with xsl:import/xsl:include from the
> main xsl stylesheet.
>
> You are right, seems to be a problem with the imports. I've used Imports
> and includes with cocoo3 without problems, except that imported files are
> cached and doesn't update running in RCL. The xslt engine is still xalan so
> the templates should work like before except for the sources with cocoon:/
> protocol that aren't supported.
>
> > Moreover I found that when <xsl:template match="RootElement" is not in
> the main XSL stylesheet the same error appears.
>
> Could you send an example block to reproduce the issue?
>
> >
> > Can we switch on more debugging info what is wrong ?
>
> You can edit the logback.xml file and set level to debug but the exception
> comes from xalan. I suggest to look for sources loaded with cocoon:/ in
> your code and substitute by servlet:/.
>
> >
> > Greetings,
> > Greg
>
> Salu2.
>

Re: XSLT import/include errors

Posted by Javier Puerto <jp...@gmail.com>.
Hi Greg,

El 20/06/2013 20:00, "gelo1234" <ge...@gmail.com> escribió:
>
>
> It looks like XSLT also got cut in functionality in C3. I tried to rerun
old XSL stylesheets with new C3 and gave up.
>
> The error says nothing meaningful:
>
> <exception-report class="org.apache.cocoon.pipeline.SetupException"
timestamp="Thu, 20 Jun 2013 19:58:23 +0200"><message>Impossible to read
XSLT from 'javax.xml.transform.stream.StreamSource@cba24d', see nested
exception</message><cause>Could not compile
stylesheet</cause><stacktraceCause>javax.xml.transform.TransformerConfigurationException:
Could not compile stylesheet
>     at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(Unknown
Source)
>     at
org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:216)
>     at
org.apache.cocoon.sax.component.XSLTTransformer.load(XSLTTransformer.java:165)
>     at
org.apache.cocoon.sax.component.XSLTTransformer.setConfiguration(XSLTTransformer.java:264)
>     at
org.apache.cocoon.sitemap.InvocationImpl.installComponent(InvocationImpl.java:257)
>     at
>
> It looks like there is a problem with xsl:import/xsl:include from the
main xsl stylesheet.

You are right, seems to be a problem with the imports. I've used Imports
and includes with cocoo3 without problems, except that imported files are
cached and doesn't update running in RCL. The xslt engine is still xalan so
the templates should work like before except for the sources with cocoon:/
protocol that aren't supported.

> Moreover I found that when <xsl:template match="RootElement" is not in
the main XSL stylesheet the same error appears.

Could you send an example block to reproduce the issue?

>
> Can we switch on more debugging info what is wrong ?

You can edit the logback.xml file and set level to debug but the exception
comes from xalan. I suggest to look for sources loaded with cocoon:/ in
your code and substitute by servlet:/.

>
> Greetings,
> Greg

Salu2.