Travel assistance for ApacheCon EU, Budapest November 17-21 2014

2014-06-12 Thread Thorsten Scherler
The Travel Assistance Committee (TAC) is happy to anounce that we now
accept applications for ApacheCon Europe 2014, 17-21 November in
Budapest, Hungary

Applications are welcome from individuals within the Apache community
at-large, users, developers, educators, students, Committers, and
Members, who need financial support to attend ApacheCon.

Please be aware the seats are very limited, and all applicants will be
scored on their individual merit.

More information can be found at http://www.apache.org/travel including
a link to the online application and detailed instructions for submitting.

Applications will close on 25 July 2014 at 23:00 UTC/GMT.

-- 
Thorsten Scherler thorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



ApacheCon CFP closes June 25

2014-06-11 Thread Thorsten Scherler
Dear cocoon enthusiast,

As you may be aware, ApacheCon will be held this year in Budapest, on
November 17-23. (See http://apachecon.eu for more info.)

The Call For Papers for that conference is still open, but will be
closing soon. We need you talk proposals, to represent cocoon at
ApacheCon. We need all kinds of talks - deep technical talks, hands-on
tutorials, introductions for beginners, or case studies about the
awesome stuff you're doing with cocoon.

Please consider submitting a proposal, at
http://events.linuxfoundation.org//events/apachecon-europe/program/cfp

Thanks!

-- 
Thorsten Scherler thorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



Re: running a cocoon-sample block in a tomcat container by cargo-maven2-plugin

2013-08-14 Thread Thorsten Scherler
] at
 org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
 [INFO] [talledLocalContainer] at
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
 [INFO] [talledLocalContainer] at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 [INFO] [talledLocalContainer] at
 java.util.concurrent.FutureTask.run(FutureTask.java:166)
 [INFO] [talledLocalContainer] at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 [INFO] [talledLocalContainer] at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 [INFO] [talledLocalContainer] at
 java.lang.Thread.run(Thread.java:724)
 [INFO] [talledLocalContainer] Caused by:
 java.lang.ClassNotFoundException: javax.mail.MessagingException
 [INFO] [talledLocalContainer] at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
 [INFO] [talledLocalContainer] at
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
 [INFO] [talledLocalContainer] ... 32 more
 [INFO] [talledLocalContainer]
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.core.StandardContext startInternal
 [INFO] [talledLocalContainer] SEVERE: Error listenerStart
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.core.StandardContext startInternal
 [INFO] [talledLocalContainer] SEVERE: Context
 [/cocoon-sample-webapp-3.0.0-beta-1-SNAPSHOT] startup failed due to
 previous errors
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.core.ApplicationContext log
 [INFO] [talledLocalContainer] INFO: Closing Spring root
 WebApplicationContext
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
 [INFO] [talledLocalContainer] SEVERE: The web application
 [/cocoon-sample-webapp-3.0.0-beta-1-SNAPSHOT] appears to have started
 a thread named [RequestCounterCleaningTask] but has failed to stop it.
 This is very likely to create a memory leak.
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
 [INFO] [talledLocalContainer] SEVERE: The web application
 [/cocoon-sample-webapp-3.0.0-beta-1-SNAPSHOT] appears to have started
 a thread named [RequestCounterCleaningTask] but has failed to stop it.
 This is very likely to create a memory leak.
 [INFO] [talledLocalContainer] Aug 11, 2013 3:57:51 PM
 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
 [INFO] [talledLocalContainer] SEVERE: The web application
 [/cocoon-sample-webapp-3.0.0-beta-1-SNAPSHOT] appears to have started
 a thread named [RequestCounterCleaningTask] but has failed to stop it.
 This is very likely to create a memory leak.
 you have an idea what in the configuration is wrong ?







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

http://www.codebusters.es/



Spring properties placeholder (was Re: [jira] [Commented] (COCOON3-129) Create an example to send a mail via cocoon)

2013-07-27 Thread Thorsten Scherler
On 07/26/2013 05:47 PM, Piratenvisier wrote:
 I created an own dependency of cocoon-rest-optional of your block with
 another groupID
 When I start jetty java complains that it doesn't find the
 placeholders in block-application-context.
 I don't have this problem in cocoon-sample. Where is this placeholding
 mechanism set up ?

In linux I did:

cd c3
regexxer
#here i searched for pattern *.xml
# then I searched for configurator

I found 12 matches the important once in the cocoon-rest-optional where
located in the rcl folder:
!-- Activate Cocoon Spring Configurator --
configurator:settings
configurator:property
name=org.apache.cocoon.reloading.sitemap value=true/
configurator:property
name=org.apache.cocoon.containerencoding value=UTF-8/
configurator:property
name=org.apache.cocoon.exception.ProcessingException.unroll value=true/
/configurator:settings

You find the docu about it in
http://cocoon.apache.org/subprojects/configuration/spring-configurator/index.html
specially the part
http://cocoon.apache.org/subprojects/configuration/spring-configurator/1310_1_1.html
where the properties matching is explained in detail.

In short I guess you do not have either not activated the configurator
so the properties file is not picked up or you do not have a file like
c3/cocoon-rest-optional/src/main/resources/META-INF/cocoon/properties/mail.properties
in your project.

I recommend as well the spring vanilla placeholder docu
http://static.springsource.org/spring/docs/2.0.x/reference/beans.html#beans-factory-placeholderconfigurer
since the Cocoon Spring Configurator in the end is a wrapper around that.

hth

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

http://www.codebusters.es/



Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-24 Thread Thorsten Scherler
On 07/24/2013 05:30 PM, Piratenvisier wrote:
...
 Because I am not able to install the whole application because of
 this error.

 But I see a strong tendenca to a programmed pipeline and I found
 myself even without cocoon on this way.

 see the pipeline example you can use cocoon-pipeline in you normal
 spring webapp (without cocoon servlet).

 I got a programmed fop-pipeline running. Under wicket you have to
 grant access to the stylesheets
 und let wicket give you the full href.

Actually you can call a java cocoon pipeline from wicket to do the job
for you. ;)

...but seriously there are many fish in the sea and I myself ATM are
experiencing node.js which is really rapid in terms of development
especially if your gui is using json. Our company has create a framework
called rapidMobile where I am ATM testing to serve the static html5 part
with creating a node.js server around it, instead of using c3 as we did
before.  While playing around I found it pretty easy to create basic
REST services for node and do some REST services that prior had been in
cocoon (maybe re-factored to go into node).

What I am trying to say is that cocoon is the best in what it is
designed for: being a lib capable of use x input formats and serialize
to n output formats. The whole idea for myself is best expressed in
Apache Forrest and they concept of input, internal and output modules.
Where everything is drilled down to an internal language so it easy to
create various input and output formats.


 However that seems pretty much as the sample block.
 Try just to start cocoon-rest-optional and do mvn clean install
 jetty:run

 I just added a small sample (I consider it quite clean) to use a
 pipeline in your java code.
 How should i call the Restcontroller from the browser and what
 result should I see ?

 cd ../cocoon-rest-optional #assuming you were in samples before
 mvn clean install jetty:run
 http://localhost:/

 There are three different showcases, the last two ones are mail
 samples. Where Here comes the response from server... stands we
 will wait the response. I implement the whole thing with html5 and a
 bit of javascript to post to the server and update the response div
 with the server response. In case you have success it will read:
 Result: true while the request is processed you see Processing
 request In case of result: false check the logs in
 ./target/work/cocoon.log

 salu2
 I got your example running, thank you
 I aknowledge that cocoon is again getting interesting.

yeah :)

salu2

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

http://www.codebusters.es/



Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-23 Thread Thorsten Scherler
On 07/23/2013 12:58 PM, Piratenvisier wrote:
 ...

 I get the error:

 java.net.MalformedURLException: unknown protocol: servlet at
 java.net.URL.init(URL.java:592) at
 java.net.URL.init(URL.java:482) at
 java.net.URL.init(URL.java:431) at
 org.apache.cocoon.rest.controller.response.URLResponse.init(URLResponse.java:49)
 at
 org.apache.cocoon.sample.controller.DemoRESTController.doGet(DemoRESTController.java:54)



 Not sure but seems that he cannot resolve: return new
 URLResponse(servlet:/controller/screen, data);
 When I went back to the original distribution without any changes and
 even when I try new URL(new URL(servlet:),servlet:/controller/screen)
 I get the same error,although I think that I once had success with the
 distribution.

Hmm not sure, I just tried the samples and they work fine for me.
cd ~/src/apache/c3/cocoon-sample
svn up
At revision 1506007.
mvn clean install jetty:run
http://localhost:/jax-rs/sample/parameter-passing/5?req-param=7
works fine.

 But I see a strong tendenca to a programmed pipeline and I found
 myself even without cocoon on this way.

see the pipeline example you can use cocoon-pipeline in you normal
spring webapp (without cocoon servlet).


 However that seems pretty much as the sample block.
 Try just to start cocoon-rest-optional and do mvn clean install jetty:run

 I just added a small sample (I consider it quite clean) to use a
 pipeline in your java code.
 How should i call the Restcontroller from the browser and what result
 should I see ?

cd ../cocoon-rest-optional #assuming you were in samples before
mvn clean install jetty:run
http://localhost:/

There are three different showcases, the last two ones are mail samples.
Where Here comes the response from server... stands we will wait the
response. I implement the whole thing with html5 and a bit of javascript
to post to the server and update the response div with the server
response. In case you have success it will read: Result: true while
the request is processed you see Processing request In case of
result: false check the logs in ./target/work/cocoon.log

salu2

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

http://www.codebusters.es/



Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-22 Thread Thorsten Scherler
On 07/22/2013 08:17 AM, Piratenvisier wrote:
 Thank you Thorsten for sending the MailSender example.
 I learnt one way to read out a bean could be a Controller based on a 
 StringTemplateGenerator
 while a Restcontroller delivers the Bean.Do you know if there exists a
 Generator like the former JXGenerator
 Thanks for your help

ATM the StringTemplateGenerator is the way, none has migrated the
JXGenerator yet. Regarding the pipeline example it took me much longer
then expected to extract the code since like I said it was based on a
jms trigger and after 8 hours Saturday my kids requested to go swimming.

I will have a look now to create a small pipe-example. Further for
advanced mail operations you would need
MimeMessageHelper message = new MimeMessageHelper(mimeMessage,
true,UTF-8);
which allows to
* message.addAttachment(...) ;
* message.setText(text, htmlString); // alternative formats text and html

salu2


 Am 20.07.2013 18:26, schrieb Thorsten Scherler (JIRA):
   [
 https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

 Thorsten Scherler closed COCOON3-129.
 -

  Resolution: Fixed

 Committed revision 1505158.

 
 Create an example to send a mail via cocoon
 ---

  Key: COCOON3-129
  URL: https://issues.apache.org/jira/browse/COCOON3-129
  Project: Cocoon 3
   Issue Type: New Feature
   Components: cocoon-rest-optional
 Affects Versions: 3.0.0-beta-1
 Reporter: Thorsten Scherler
  Fix For: 3.0.0-beta-1


 http://markmail.org/message/6ces6erwekf57qfo
 as requested from hansheinrichbraun in above mail I extracted a
 simple example to send a mail with cocoon based on work of
 codebusters.es.
 -- 
 This message is automatically generated by JIRA.
 If you think it was sent incorrectly, please contact your JIRA
 administrators
 For more information on JIRA, see:
 http://www.atlassian.com/software/jira



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

http://www.codebusters.es/



[jira] [Commented] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-22 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13715222#comment-13715222
 ] 

Thorsten Scherler commented on COCOON3-129:
---

Committed revision 1505683.
Added example to use a pipeline to process mail body.

 Create an example to send a mail via cocoon
 ---

 Key: COCOON3-129
 URL: https://issues.apache.org/jira/browse/COCOON3-129
 Project: Cocoon 3
  Issue Type: New Feature
  Components: cocoon-rest-optional
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
 Fix For: 3.0.0-beta-1


 http://markmail.org/message/6ces6erwekf57qfo 
 as requested from hansheinrichbraun in above mail I extracted a simple 
 example to send a mail with cocoon based on work of codebusters.es.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-22 Thread Thorsten Scherler

 property name=restResourcesList
   list
 ref bean=org.apache.cocoon.sample.rest.resource.one /
 ref bean=org.apache.cocoon.sample.rest.resource.two /
   /list
 /property
   /bean--
 /beans

 in web.xml the only part of importance is :

  context-param
 param-namecontextConfigLocation/param-name
 param-value
 classpath:/applicationContext-resources.xml
 classpath:/applicationContext-dao.xml
 classpath:/applicationContext-service.xml
 /WEB-INF/applicationContext*.xml
 /WEB-INF/cocoon-sample-*.xml
 /param-value
 /context-param

 I get the error:

 java.net.MalformedURLException: unknown protocol: servlet at
 java.net.URL.init(URL.java:592) at java.net.URL.init(URL.java:482)
 at java.net.URL.init(URL.java:431) at
 org.apache.cocoon.rest.controller.response.URLResponse.init(URLResponse.java:49)
 at
 org.apache.cocoon.sample.controller.DemoRESTController.doGet(DemoRESTController.java:54)



Not sure but seems that he cannot resolve: return new
URLResponse(servlet:/controller/screen, data);

However that seems pretty much as the sample block.
Try just to start cocoon-rest-optional and do mvn clean install jetty:run

I just added a small sample (I consider it quite clean) to use a
pipeline in your java code.

HTH

salu2

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

http://www.codebusters.es/



[jira] [Created] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-20 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-129:
-

 Summary: Create an example to send a mail via cocoon
 Key: COCOON3-129
 URL: https://issues.apache.org/jira/browse/COCOON3-129
 Project: Cocoon 3
  Issue Type: New Feature
  Components: cocoon-rest-optional
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
 Fix For: 3.0.0-beta-1


http://markmail.org/message/6ces6erwekf57qfo 

as requested from hansheinrichbraun in above mail I extracted a simple example 
to send a mail with cocoon based on work of codebusters.es.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON3-129) Create an example to send a mail via cocoon

2013-07-20 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-129.
-

Resolution: Fixed

Committed revision 1505158.


 Create an example to send a mail via cocoon
 ---

 Key: COCOON3-129
 URL: https://issues.apache.org/jira/browse/COCOON3-129
 Project: Cocoon 3
  Issue Type: New Feature
  Components: cocoon-rest-optional
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
 Fix For: 3.0.0-beta-1


 http://markmail.org/message/6ces6erwekf57qfo 
 as requested from hansheinrichbraun in above mail I extracted a simple 
 example to send a mail with cocoon based on work of codebusters.es.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (COCOON3-126) Make configurable whether xslt transformer component uses LRU cache or not

2013-07-02 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13698330#comment-13698330
 ] 

Thorsten Scherler commented on COCOON3-126:
---

I do not think it is a good idea to use the spring injection  here.

Have a look at http://svn.apache.org/viewvc?view=revisionrevision=r1447255 I 
think passing the config via parameter is much more flexible and do not force 
to use spring.

Can you attach a patch that is more in the spirit of the commit I linked above?



 Make configurable whether xslt transformer component uses LRU cache or not
 --

 Key: COCOON3-126
 URL: https://issues.apache.org/jira/browse/COCOON3-126
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-sax
Affects Versions: 3.0.0-beta-1
Reporter: Jos Snellings
Priority: Minor
 Fix For: 3.0.0-beta-1

 Attachments: cocoon3-126.patch


 The XSLT pipeline component should be aware of the following setting in  
 configurator:settings
 configurator:property name=org.apache.cocoon.sax.lrucache-enabled 
 value=true|false|True|False/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (COCOON3-123) schema validation error with namespaces provoke a double declaration of ?xml

2013-04-03 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-123:
-

 Summary: schema validation error with namespaces provoke a double 
declaration of ?xml
 Key: COCOON3-123
 URL: https://issues.apache.org/jira/browse/COCOON3-123
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-sax, cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Critical
 Fix For: 3.1.0


thorsten@bulldozer:~/src/apache/c3$ svnd
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd
===
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xsd
(working copy)
@@ -18,4 +18,6 @@
 !-- $Id$ --
 xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xs:element name=simple/
-/xs:schema
+xs:attribute type=xs:int name=id /
+xs:attribute type=xs:int name=sum /
+/xs:schema
\ No newline at end of file
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
===
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
(working copy)
@@ -15,4 +15,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 --
-simplesimple-text/simple
+simple xmlns:x=http://www.w3.org/1999/xhtml; id=dsimple-text/simple

If you request http://localhost:/sax-pipeline/simple-xsd you will get:

?xml version=1.0 encoding=UTF-8??xml version=1.0 encoding=UTF-8?

If you do 
Index: cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
===
--- cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
(revision 1455575)
+++ cocoon-sample/src/main/resources/COB-INF/sax-pipeline/simple.xml
(working copy)
@@ -15,4 +15,4 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 --
-simplesimple-text/simple
+simple id=bsimple-text/simple

you only get one xml declaration

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [VOTE] Release Cocoon 2.1.12

2013-03-18 Thread Thorsten Scherler
On 03/16/2013 08:24 AM, David Crossley wrote:
 Cédric Damioli wrote:
 I've put the files at http://people.apache.org/~cdamioli/cocoon-2.1.12/

 Please check the files, build and run samples, and cast your votes.
 +1 from me for cocoon-2.1.12-src.tar.gz MD5 8f86915b851df0405fa52dbe249bd3da

 Thanks.

 There are some small things that can be fixed after this release.
 e.g. Apache Software License in deps/LICENSE.txt should be Apache License.

 Your key should get signed by someone else.

 We could follow what Subversion does. The multiple signatures
 would assist with that issue.
 http://subversion.apache.org/docs/community-guide/releasing.html#tarball-signing

 Also i see that rather than using a static KEYS file,
 they link directly from their download page to the set of current keys.


Actually we used that before as I describe in:
 Now asc:
 wget https://people.apache.org/keys/group/cocoon.asc
  gpg --import cocoon.asc
 gpg --verify cocoon-2.1.12-src.tar.gz.asc
 ~/src/apache/cocoon-2.1.12-src.tar.gz
 gpg: Signature made Thu 14 Mar 2013 03:31:26 PM CET using RSA key ID
 DD478570
 gpg: Can't check signature: public key not found

 For the release we need to add your key to the people group.
 gpg --import cocoon-2.1.12/KEYS
 that worked fine.

However the addition that more people sign the tar sounds nice and even
we can combine it the min 3 +1 so at least three people should sign the
release.

salu2

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

http://www.codebusters.es/



Re: [VOTE] Release Cocoon 2.1.12

2013-03-15 Thread Thorsten Scherler
On 03/14/2013 03:53 PM, Cédric Damioli wrote:
 Hi team,

 I've put the files at http://people.apache.org/~cdamioli/cocoon-2.1.12/

 Please check the files, build and run samples, and cast your votes.

 Here is my +1

 Regards,


+1

I used:
- cocoon-2.1.12-deps.tar.gz
- cocoon-2.1.12-src.tar.gz

first try was with java7 where you get some compilation error since
com.sun.image.codec.jpeg cannot be resolved.
Switching to java 6 gave the same error BUT as warning and resulting in
a BUILD SUCCESSFUL

After that I started with cocoon.sh and clicked aroun in the samples and
everything works fine.

 md5sum cocoon-2.1.12-src.tar.gz - ok
 sha1sum cocoon-2.1.12-src.tar.gz - ok
 
Now asc:
wget https://people.apache.org/keys/group/cocoon.asc
 gpg --import cocoon.asc
gpg --verify cocoon-2.1.12-src.tar.gz.asc
~/src/apache/cocoon-2.1.12-src.tar.gz
gpg: Signature made Thu 14 Mar 2013 03:31:26 PM CET using RSA key ID
DD478570
gpg: Can't check signature: public key not found

For the release we need to add your key to the people group.
gpg --import cocoon-2.1.12/KEYS
that worked fine.

Thanks for doing the release Cedric.

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-26 Thread Thorsten Scherler
On 02/25/2013 02:10 PM, Thorsten Scherler wrote:
 ...
 Passing pipeline parameter as attribute: key=cocoon, value=[FAILED
 toString()]

 in MessageFormatter.arrayFormat.

 still investigating

 salu2


Actually you can see it if you start the cocoon-sample block and request
http://localhost:/controller/abc/foo?reqparam=1


SLF4J: Failed toString() invocation on an object of type [java.util.HashMap]
java.lang.StackOverflowError
at
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:631)
at java.lang.StringBuilder.append(StringBuilder.java:224)
at
org.apache.cocoon.configuration.MutableSettings.toString(MutableSettings.java:312)
at java.lang.String.valueOf(String.java:2902)

It actually happens in STRenderer

public String render(final String template,
final MapString, Object parameters)
throws IOException {

final ST stringTemplate = new ST(template, '$', '$');

if (parameters == null || parameters.isEmpty()) {
LOG.warn(There are not any parameters passed to the
template.);
} else {
for (Map.EntryString, Object entry : parameters.entrySet()) {
stringTemplate.add(entry.getKey().replace(., _),
(entry.getValue() instanceof String)
? StringEscapeUtils.escapeXml(
entry.getValue().toString())
: entry.getValue());

LOG.debug(Passing pipeline parameter as attribute: key={}
+ , value={}, entry.getKey(), entry.getValue());
}
}

return stringTemplate.render();
}

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-26 Thread Thorsten Scherler
On 02/26/2013 03:13 PM, Robby Pelssers wrote:
 To be more precise it happens when processing the map entry cocoon.  So in 
 this case there must be some circular reference.. finding that needle is a 
 bit more difficult :(


Jupp, look at this:

{baseUrl=file:/home/thorsten/src/codebusters/CLIENT/c3-extractor/./src/main/resources/COB-INF/,
javax.servlet.http.HttpServletResponse=org.apache.cocoon.servletservice.HttpServletResponseBufferingWrapper@61771f5,
source=file:/home/thorsten/src/codebusters/CLIENT/c3-extractor/src/main/resources/COB-INF/resources/views/admin.xhtml,
javax.servlet.http.HttpServletRequest=org.apache.cocoon.servletservice.util.ServletServiceRequest@6d3a8ef2,
javax.servlet.ServletContext=org.apache.cocoon.servletservice.ServletServiceContext@63917066,
org.apache.cocoon.configuration.Settings=Settings:
Running mode : dev
org.apache.cocoon.reload-delay : 1000
org.apache.cocoon.reloading : false
org.apache.cocoon.classloader.load.classes : empty
org.apache.cocoon.cache.directory :
/home/thorsten/src/codebusters/CLIENT/c3-extractor/target/work/cache-dir
org.apache.cocoon.work.directory :
/home/thorsten/src/codebusters/CLIENT/c3-extractor/target/work
org.apache.cocoon.formencoding : null
org.apache.cocoon.containerencoding : UTF-8
,
cocoon={response=org.apache.cocoon.servletservice.HttpServletResponseBufferingWrapper@61771f5,
settings=Settings:
Running mode : dev
org.apache.cocoon.reload-delay : 1000
org.apache.cocoon.reloading : false
org.apache.cocoon.classloader.load.classes : empty
org.apache.cocoon.cache.directory :
/home/thorsten/src/codebusters/CLIENT/c3-extractor/target/work/cache-dir
org.apache.cocoon.work.directory :
/home/thorsten/src/codebusters/CLIENT/c3-extractor/target/work
org.apache.cocoon.formencoding : null
org.apache.cocoon.containerencoding : UTF-8
,
request=org.apache.cocoon.servlet.util.ObjectModelProvider$ObjectModelRequest@1f7ee9e4,
context=org.apache.cocoon.servletservice.ServletServiceContext@63917066,
controller={properties={awt.toolkit=sun.awt.X11.XToolkit,
classworlds.conf=/home/thorsten/src/codebusters/workspace/crawl/.metadata/.plugins/org.eclipse.m2e.core/launches/m2conf3387913835580501331.tmp,
common.resources=/home/thorsten/src/codebusters/CLIENT/api/src/main/resources/COB-INF/resources/,more=...,
sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher -B -s
/home/thorsten/.m2/settings.xml install jetty:run,
sun.java.launcher=SUN_STANDARD, sun.jnu.encoding=UTF-8,
sun.management.compiler=HotSpot 64-Bit Tiered Compilers,
sun.os.patch.level=unknown, user.country=US,
user.dir=/home/thorsten/src/codebusters/CLIENT/c3-extractor,
user.home=/home/thorsten, user.language=en, user.name=thorsten,
user.timezone=Europe/Madrid

The more=..., is much more props I handle but basically
org.apache.cocoon.configuration.Settings are two times and a view more
under a different name. e.g.
javax.servlet.http.HttpServletResponse=org.apache.cocoon.servletservice.HttpServletResponseBufferingWrapper@61771f5,
response=org.apache.cocoon.servletservice.HttpServletResponseBufferingWrapper@61771f5,


I am not sure ATM why this duplication.

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-26 Thread Thorsten Scherler
On 02/26/2013 03:21 PM, Francesco Chicchiriccò wrote:
 On 26/02/2013 13:43, Thorsten Scherler wrote:
 On 02/25/2013 02:10 PM, Thorsten Scherler wrote:
 ...
 Passing pipeline parameter as attribute: key=cocoon, value=[FAILED
 toString()]

 in MessageFormatter.arrayFormat.

 still investigating

 salu2

 Actually you can see it if you start the cocoon-sample block and request
 http://localhost:/controller/abc/foo?reqparam=1


 SLF4J: Failed toString() invocation on an object of type
 [java.util.HashMap]
 java.lang.StackOverflowError
  at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:631)
  at java.lang.StringBuilder.append(StringBuilder.java:224)
  at
 org.apache.cocoon.configuration.MutableSettings.toString(MutableSettings.java:312)

  at java.lang.String.valueOf(String.java:2902)

 It actually happens in STRenderer
 [...]

 Hi Thorsten,
 as you have already found, the problem is the cocoon entry in the
 sitemap's ObjectModel, always passed among parameters.

 I have been able to actually print the content of the cocoon entry
 via common-collection's MapUtils:

 if (entry.getValue() instanceof Map) {
 MapUtils.verbosePrint(System.out, null, parameters);
 } else {
 System.out.println(entry.getValue());
 }

 I am about to commit a fix for the issue in STRenderer you've reported
 above based on the usage of MapUtils#verbosePrint()


Nice you are a monstruo.

Let us see whether that gets rid of the redundant data as well.

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-26 Thread Thorsten Scherler
On 02/26/2013 04:36 PM, Francesco Chicchiriccò wrote:

 as you have already found, the problem is the cocoon entry in the
 sitemap's ObjectModel, always passed among parameters.

 I have been able to actually print the content of the cocoon entry
 via common-collection's MapUtils:

  if (entry.getValue() instanceof Map) {
  MapUtils.verbosePrint(System.out, null,
 parameters);
  } else {
  System.out.println(entry.getValue());
  }

 I am about to commit a fix for the issue in STRenderer you've reported
 above based on the usage of MapUtils#verbosePrint()
 Nice you are a monstruo.

 Hem, guess you mean mostro (a.k.a. monster) - I'll take as a
 compliment ;-)

Definitely here in the south of spain we use it as compliment for a
person/friend which is usually accomplishing BIG things.


 Anyway as per r1450217 the StackOverflowError is removed from STRenderer.


Thank you very much, so awesome.

I had some problems to find the important change though between the
checkstyle/formating changes. It would be great if you could separate
those in the future. Anyway as I understand the most important change is:

Modified: 
cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/STRenderer.java
URL: 
http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/STRenderer.java?rev=1450217r1=1450216r2=1450217view=diff
==
--- 
cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/STRenderer.java
 (original)
+++ 
cocoon/cocoon3/trunk/cocoon-stringtemplate/src/main/java/org/apache/cocoon/stringtemplate/STRenderer.java
 Tue Feb 26 15:31:18 2013
@@ -17,7 +17,10 @@
 package org.apache.cocoon.stringtemplate;
 
 import java.io.IOException;
+import java.io.PrintStream;
 import java.util.Map;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.io.output.ByteArrayOutputStream;
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -58,8 +61,18 @@ public final class STRenderer {
 ? 
StringEscapeUtils.escapeXml(entry.getValue().toString())
 : entry.getValue());
 
-LOG.debug(Passing pipeline parameter as attribute: key={}, 
value={},
-entry.getKey(), entry.getValue());
+if (LOG.isDebugEnabled()) {
+final String value;
+if (entry.getValue() instanceof Map) {
+final ByteArrayOutputStream baos = new 
ByteArrayOutputStream();
+MapUtils.verbosePrint(new PrintStream(baos), null, 
parameters);
+baos.flush();
+value = baos.toString();
+} else {
+value = entry.getValue().toString();
+}
+LOG.debug(Passing parameter as ST attribute: key={}, 
value={}, entry.getKey(), value);
+}
 }
 }
 



 Let us see whether that gets rid of the redundant data as well.

 I've been exploring a bit the various call and I think that this
 duplication might be generated when intra-pipeline calls (e.g.
 servlet:/) are issued.


Yeah that definitely makes sense since some props where the same but
other not e.g.
source=file:/home/thorsten/src/codebusters/CLIENT/c3-extractor/src/main/resources/COB-INF/resources/views/admin.xhtml,
only appears once (which is the view called by the controller via
servlet:/ ...)

Thanks again Francesco and as well for your latest bugfixing run. :)

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-25 Thread Thorsten Scherler
Hi all,

actually I tried with

HashMapString, Object data = new HashMapString, Object();
data.put(xxx, xxx);
return new URLResponse(VIEW, data);

so not really a problem of the hashmap within hasmap. Further I need to
inject the hashmap to do in my view:

div id=properties class=tab_content
dl
  $properties.keys:{k|
  dt$k$/dt
  dd
  ![CDATA[$properties.(k)$]]
  /dd
  }$
/dl
  /div

As soon I add a map to the response I get the stackoverflow.

I will now play a bit with the log config.

BTW thanks for the feedback.

salu2
On 02/22/2013 03:10 PM, Robby Pelssers wrote:
 I'd say no...

 He does first create a new map called 'data'
 HashMapString, Object data = new HashMapString, Object();

 And next he puts the Props map in data

 data.put(properties, getProps());


 And next he passes the map to the view.
 return new URLResponse(VIEW, data);

 But obviously creating that data map is of no use.  And secondly... suppose 
 he wants to keep his hands of the original Props map, he should copy all 
 values over toe the new data map instead of putting the map in the map.

 Robby


 -Original Message-
 From: Nathaniel, Alfred [mailto:alfred.nathan...@six-group.com] 
 Sent: Friday, February 22, 2013 3:07 PM
 To: 'dev@cocoon.apache.org'
 Subject: RE: REST view and weird error

 Wild guess:  somewhere you add the map to itself

map.put(map, map);

 creating an infinite recursion in map.toString().

 HTH, Alfred.

 -Original Message-
 From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
 Sent: Freitag, 22. Februar 2013 11:54
 To: dev@cocoon.apache.org
 Subject: RE: REST view and weird error

 Hi Thorsten,

 Just one question.

 I'm a making a few assumptions here but is Settings not a HashMap already? 
 Can't you just do

 @Override
 public RestResponse doGet() throws Exception {
 return new URLResponse(VIEW, getProps());
 }

 I don't see the point in putting a hashmap in another hashmap just for the 
 sake of it ;-)

 Robby

 -Original Message-
 From: Thorsten Scherler [mailto:scher...@gmail.com] 
 Sent: Friday, February 22, 2013 10:13 AM
 To: dev@cocoon.apache.org
 Subject: REST view and weird error

 Hi all,

 in one view of a REST service of mine I get:

 SLF4J: Failed toString() invocation on an object of type [java.util.HashMap] 
 java.lang.StackOverflowError
 at
 java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:639)
 at java.lang.StringBuilder.append(StringBuilder.java:224)
 at
 org.apache.cocoon.configuration.MutableSettings.toString(MutableSettings.java:312)
 at java.lang.String.valueOf(String.java:2902)
 ...
 at java.lang.StringBuilder.append(StringBuilder.java:128)
 at java.util.AbstractMap.toString(AbstractMap.java:523)
 at java.lang.String.valueOf(String.java:2902)

 where the last 3 lines will repeat a lot till the end.

 I am doing:

 @Override
 public RestResponse doGet() throws Exception {
 HashMapString, Object data = new HashMapString, Object();
 data.put(properties, getProps());
 return new URLResponse(VIEW, data);
 }

 where getProps() basically is a helper for getting 
 this.settings.getProperties.

 As soon I do return new URLResponse(VIEW) the error is gone.

 I have the standard logging activated (via rcl-config), using jetty:run and 
 no override for es.codebusters.droids.rest.DroidsInvoker in my logback.xml

 root
 level value=WARN/
 appender-ref ref=CORE/
 /root

 Any ideas?

 salu2

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

 http://www.codebusters.es/



 The content of this e-mail is intended only for the confidential use of the 
 person addressed. 
 If you are not the intended recipient, please notify the sender and delete 
 this email immediately.
 Thank you.




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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-25 Thread Thorsten Scherler
On 02/25/2013 12:08 PM, Thorsten Scherler wrote:
 Hi all,

 actually I tried with

 HashMapString, Object data = new HashMapString, Object();
 data.put(xxx, xxx);
 return new URLResponse(VIEW, data);

 so not really a problem of the hashmap within hasmap. Further I need to
 inject the hashmap to do in my view:

 div id=properties class=tab_content
 dl
   $properties.keys:{k|
   dt$k$/dt
   dd
   ![CDATA[$properties.(k)$]]
   /dd
   }$
 /dl
   /div

 As soon I add a map to the response I get the stackoverflow.

 I will now play a bit with the log config.

 BTW thanks for the feedback.

logger name=org.apache.cocoon additivity=false
level value=WARN/
appender-ref ref=CORE/
/logger

Gets rid of the error.

The final source of the error is MutableSettings
(cocoon-configuration-api-1.0.4.jar) where we have

public String toString() {
return Settings:\n +
  Running mode :  + this.getRunningMode()+ '\n' +
  KEY_RELOAD_DELAY +  :  + this.getReloadDelay(null) + '\n' +
  KEY_RELOADING +  :  + this.isReloadingEnabled(null) + '\n' +
  KEY_LOAD_CLASSES +  :  +
this.toString(this.getLoadClasses()) + '\n' +
  KEY_CACHE_DIRECTORY +  :  + this.getCacheDirectory() + '\n' +
  KEY_WORK_DIRECTORY +  :  + this.getWorkDirectory() + '\n' +
  KEY_FORM_ENCODING +  :  + this.getFormEncoding() + '\n' +
  KEY_CONTAINER_ENCODING +  :  + this.getContainerEncoding() +
'\n';
}

protected String toString(List a) {
final StringBuffer buffer = new StringBuffer();
final Iterator i = a.iterator();
boolean first = true;
while ( i.hasNext() ) {
if ( first ) {
first = false;
} else {
buffer.append(, );
}
buffer.append(i.next());
}
return buffer.toString();   
}

The whole things points to the latter method which is based on the
protected final List loadClasses = new ArrayList();

In the following we add values:

/**
 * Fill from a properties object
 */
public void configure(Properties props) {
...
} else if ( key.startsWith(KEY_LOAD_CLASSES) ) {
this.addToLoadClasses(value);
}

While debug the loadClasses where empty.

salu2

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

http://www.codebusters.es/



Properties replacement (was Re: Connecting 2 blocks with C3.0)

2013-02-25 Thread Thorsten Scherler
Hi Mansour,

we are happy you are so active but please use the dev list for your
questions since c3 is not stable. Meaning by definition we have devs no
user working on c3. Please let us discuss this mail and other on the dev
list. TIA.

On 02/25/2013 05:42 AM, Mansour Al Akeel wrote:
 Francesco,
 I know this is an old thread, but I was trying to update my pom.xml so
 that I get the

 servlet:context mount-path=/mysite
 context-path=jar:classpath:lib/${project.build.finalName}.jar!/COB-INF//

 replaced by maven at build time.
 Now the whole build is failing.
 Is there another way to get this placeholder replaced without using
 the pom included with your project, especially that it has many
 missing dependencies:

 [INFO] 
 
 [INFO] Building contents SNAPSHOT-1.0
 [INFO] 
 
 [WARNING] The POM for org.springframework:spring-dao:jar:3.1.2.RELEASE
 is missing, no dependency information available
 [WARNING] The POM for commons-jexl:commons-jexl:jar:2.1.1 is missing,
 no dependency information available
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 1.534s
 [INFO] Finished at: Sun Feb 24 23:35:48 GMT 2013
 [INFO] Final Memory: 7M/88M
 [INFO] 
 

The only thing from the pom you need is something along the lines of:

build
resources
  resource
directorysrc/main/resources/directory
filteringfalse/filtering
excludes
  excludeMETA-INF/cocoon/spring/**/exclude
/excludes
  /resource
  resource
directorysrc/main/resources/META-INF/cocoon/spring/directory
filteringtrue/filtering
targetPath${project.build.outputDirectory}/META-INF/cocoon/spring
/targetPath
  /resource
/resources
  /build

That is doing the filtering and replacing the properties.

However in our latest project we have dropped a bit the configuration of
cocoon in terms of properties from
META-INF/cocoon/properties/xxx.properties and use a central place for
the configuration. This allows to use the project specific properties in
a wide range of modules from a central place.

build
filters
  filter../src/main/filter/general.properties/filter
  filter../src/main/filter/${env}.properties/filter
/filters
resources
  resource
directorysrc/main/resources/directory
filteringfalse/filtering
excludes
  excludeMETA-INF/cocoon/spring/**/exclude
  excludeMETA-INF/cocoon/properties/**/exclude
/excludes
  /resource
  resource
directorysrc/main/resources/META-INF/cocoon/spring/directory
filteringtrue/filtering
   
targetPath${project.build.outputDirectory}/META-INF/cocoon/spring/targetPath
  /resource
  resource
directorysrc/main/resources/META-INF/cocoon/properties/directory
filteringtrue/filtering
   
targetPath${project.build.outputDirectory}/META-INF/cocoon/properties/targetPath
  /resource
/resources

Here we assume that you have a couple of general properties that may not
change but as well some environment specific properties. Then in our
properties file in cocoon we just use 
common.resources=${common.resources}
extractor.host=${extractor.host}

and the real values come from ../src/main/filter/general.properties
and ../src/main/filter/${env}.properties
common.resources=${project.parent.basedir}/api/src/main/resources/COB-INF/resources/
extractor.host=http://localhost:/

We may want to look into changing our artifacts to
1) parent provides filter
2) modules uses this filter from parent module

The advantages is that the configuration is taken place in a single
place and can be used in a cross module manner. For us we use the same
properties in c3 and in our droids module.

wdyt?

salu2

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

http://www.codebusters.es/



Re: REST view and weird error

2013-02-25 Thread Thorsten Scherler
On 02/25/2013 12:36 PM, Thorsten Scherler wrote:
 On 02/25/2013 12:08 PM, Thorsten Scherler wrote:
 Hi all,

 actually I tried with

 HashMapString, Object data = new HashMapString, Object();
 data.put(xxx, xxx);
 return new URLResponse(VIEW, data);

 so not really a problem of the hashmap within hasmap. Further I need to
 inject the hashmap to do in my view:

 div id=properties class=tab_content
 dl
   $properties.keys:{k|
   dt$k$/dt
   dd
   ![CDATA[$properties.(k)$]]
   /dd
   }$
 /dl
   /div

 As soon I add a map to the response I get the stackoverflow.

 I will now play a bit with the log config.

 BTW thanks for the feedback.
 logger name=org.apache.cocoon additivity=false
 level value=WARN/
 appender-ref ref=CORE/
 /logger

 Gets rid of the error.

 The final source of the error is MutableSettings
 (cocoon-configuration-api-1.0.4.jar) where we have

 public String toString() {
 return Settings:\n +
   Running mode :  + this.getRunningMode()+ '\n' +
   KEY_RELOAD_DELAY +  :  + this.getReloadDelay(null) + '\n' +
   KEY_RELOADING +  :  + this.isReloadingEnabled(null) + '\n' +
   KEY_LOAD_CLASSES +  :  +
 this.toString(this.getLoadClasses()) + '\n' +
   KEY_CACHE_DIRECTORY +  :  + this.getCacheDirectory() + '\n' +
   KEY_WORK_DIRECTORY +  :  + this.getWorkDirectory() + '\n' +
   KEY_FORM_ENCODING +  :  + this.getFormEncoding() + '\n' +
   KEY_CONTAINER_ENCODING +  :  + this.getContainerEncoding() +
 '\n';
 }

 protected String toString(List a) {
 final StringBuffer buffer = new StringBuffer();
 final Iterator i = a.iterator();
 boolean first = true;
 while ( i.hasNext() ) {
 if ( first ) {
 first = false;
 } else {
 buffer.append(, );
 }
 buffer.append(i.next());
 }
 return buffer.toString();   
 }

 The whole things points to the latter method which is based on the
 protected final List loadClasses = new ArrayList();

 In the following we add values:

 /**
  * Fill from a properties object
  */
 public void configure(Properties props) {
 ...
 } else if ( key.startsWith(KEY_LOAD_CLASSES) ) {
 this.addToLoadClasses(value);
 }

 While debug the loadClasses where empty.

 salu2


Passing pipeline parameter as attribute: key=cocoon, value=[FAILED
toString()]

in MessageFormatter.arrayFormat.

still investigating

salu2

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

http://www.codebusters.es/



REST view and weird error

2013-02-22 Thread Thorsten Scherler
Hi all,

in one view of a REST service of mine I get:

SLF4J: Failed toString() invocation on an object of type [java.util.HashMap]
java.lang.StackOverflowError
at
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:639)
at java.lang.StringBuilder.append(StringBuilder.java:224)
at
org.apache.cocoon.configuration.MutableSettings.toString(MutableSettings.java:312)
at java.lang.String.valueOf(String.java:2902)
...
at java.lang.StringBuilder.append(StringBuilder.java:128)
at java.util.AbstractMap.toString(AbstractMap.java:523)
at java.lang.String.valueOf(String.java:2902)

where the last 3 lines will repeat a lot till the end.

I am doing:

@Override
public RestResponse doGet() throws Exception {
HashMapString, Object data = new HashMapString, Object();
data.put(properties, getProps());
return new URLResponse(VIEW, data);
}

where getProps() basically is a helper for getting
this.settings.getProperties.

As soon I do return new URLResponse(VIEW) the error is gone.

I have the standard logging activated (via rcl-config), using jetty:run
and no override for es.codebusters.droids.rest.DroidsInvoker in my
logback.xml

root
level value=WARN/
appender-ref ref=CORE/
/root

Any ideas?

salu2

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

http://www.codebusters.es/



[jira] [Created] (COCOON3-121) Create a generic generator that creates a root elemement and wraps the destination stream into it

2013-02-20 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-121:
-

 Summary: Create a generic generator that creates a root elemement 
and wraps the destination stream into it
 Key: COCOON3-121
 URL: https://issues.apache.org/jira/browse/COCOON3-121
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-optional
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Assignee: Thorsten Scherler
 Fix For: 3.0.0-beta-1


If you use something like ch.qos.logback.classic.log4j.XMLLayout you can create 
xml based log files. However the problem is that it does not add root element 
making the resulting file not well-formed. 

You can activate the logging in your logback.xml like 

   appender name=FAILS class=ch.qos.logback.core.FileAppender
file${crawler.log.error}/file
appendfalse/append
encoder class=ch.qos.logback.core.encoder.LayoutWrappingEncoder
  layout class=ch.qos.logback.classic.log4j.XMLLayout
locationInfotrue/locationInfo
  /layout
/encoder
/appender

The implemented solution has the following configuration in spring:

  bean name=generator:log4j 
class=org.apache.cocoon.optional.pipeline.components.sax.generator.AddRootElementGenerator
 scope=prototype
property name=encoding value=UTF-8/
property name=localName value=events/
property name=prefix value=log4j/
property name=namespace value=http://jakarta.apache.org/log4j//
  /bean

and later parse the file that the appender gives like:
map:pipeline
  map:match pattern=errorLogs
map:generate src=${crawler.log.error} type=log4j/
map:serialize type=xml /
  /map:match
/map:pipeline

which will result in something like:
?xml version=1.0 encoding=UTF-8?
log4j:events xmlns:log4j=http://jakarta.apache.org/log4j/;
  log4j:event logger=org.apache.droids.exception.ExceptionHandler 
timestamp=1361325224196 level=ERROR thread=main
   log4j:message![CDATA[org.apache.droids.core.DroidsException: 
org.apache.droids.core.DroidsException: org.apache.droids.core.DroidsException: 
org.apache.http.client.HttpResponseException: Internal Server Error 
http://localhost:/xxx/details/xxx]]
  /log4j:message
  log4j:locationInfo class=org.apache.droids.exception.ExceptionHandler 
method=handleException file=ExceptionHandler.java line=23/
 /log4j:event
/log4j:events

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON3-121) Create a generic generator that creates a root elemement and wraps the destination stream into it

2013-02-20 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-121.
-

Resolution: Fixed

Committed revision 1448335.


 Create a generic generator that creates a root elemement and wraps the 
 destination stream into it
 -

 Key: COCOON3-121
 URL: https://issues.apache.org/jira/browse/COCOON3-121
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-optional
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Assignee: Thorsten Scherler
 Fix For: 3.0.0-beta-1


 If you use something like ch.qos.logback.classic.log4j.XMLLayout you can 
 create xml based log files. However the problem is that it does not add root 
 element making the resulting file not well-formed. 
 You can activate the logging in your logback.xml like 
appender name=FAILS class=ch.qos.logback.core.FileAppender
 file${crawler.log.error}/file
 appendfalse/append
 encoder class=ch.qos.logback.core.encoder.LayoutWrappingEncoder
   layout class=ch.qos.logback.classic.log4j.XMLLayout
 locationInfotrue/locationInfo
   /layout
 /encoder
 /appender
 The implemented solution has the following configuration in spring:
   bean name=generator:log4j 
 class=org.apache.cocoon.optional.pipeline.components.sax.generator.AddRootElementGenerator
  scope=prototype
 property name=encoding value=UTF-8/
 property name=localName value=events/
 property name=prefix value=log4j/
 property name=namespace value=http://jakarta.apache.org/log4j//
   /bean
 and later parse the file that the appender gives like:
 map:pipeline
   map:match pattern=errorLogs
 map:generate src=${crawler.log.error} type=log4j/
 map:serialize type=xml /
   /map:match
 /map:pipeline
 which will result in something like:
 ?xml version=1.0 encoding=UTF-8?
 log4j:events xmlns:log4j=http://jakarta.apache.org/log4j/;
   log4j:event logger=org.apache.droids.exception.ExceptionHandler 
 timestamp=1361325224196 level=ERROR thread=main
log4j:message![CDATA[org.apache.droids.core.DroidsException: 
 org.apache.droids.core.DroidsException: 
 org.apache.droids.core.DroidsException: 
 org.apache.http.client.HttpResponseException: Internal Server Error 
 http://localhost:/xxx/details/xxx]]
   /log4j:message
   log4j:locationInfo class=org.apache.droids.exception.ExceptionHandler 
 method=handleException file=ExceptionHandler.java line=23/
  /log4j:event
 /log4j:events

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (COCOON3-120) NekoGenerator is loosing encoding

2013-02-18 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-120:
-

 Summary: NekoGenerator is loosing encoding 
 Key: COCOON3-120
 URL: https://issues.apache.org/jira/browse/COCOON3-120
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-optional
Reporter: Thorsten Scherler


We need to be able to change the default-encoding of the NekoGenerator.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON3-120) NekoGenerator is loosing encoding

2013-02-18 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-120.
-

Resolution: Fixed

 NekoGenerator is loosing encoding 
 --

 Key: COCOON3-120
 URL: https://issues.apache.org/jira/browse/COCOON3-120
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-optional
Reporter: Thorsten Scherler
 Fix For: 3.0.0-beta-1


 We need to be able to change the default-encoding of the NekoGenerator.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [DISCUSS] Fix for COCOON3-105

2013-02-05 Thread Thorsten Scherler
On 01/19/2013 02:23 PM, Francesco Chicchiriccò wrote:
 Il 17/01/2013 10:23, Francesco Chicchiriccò ha scritto:
 On 14/01/2013 16:20, Thorsten Scherler wrote:
 [...]
 Can you please tell me how can I address block_A's sitemap from
 from block_B's sitemap?
 I have used *blockcontext:/* for this before.

 This should work In the same way as in *servlet-service.xml, e.g.
 by replacing

 blockcontext:/otherblock/BLA

 with

 jar:classpath:lib/otherblock.jar!/COB-INF/BLA


 Hi, I just tried the above in another project but using it in the
 sitemap I get
 java.net.MalformedURLException: invalid url:
 classpath:lib/api-0.1-SNAPSHOT.jar!/COB-INF/resources/xsl/intern-to-solr.xsl
 (java.net.MalformedURLException: unknown protocol: classpath)

 I am trying to use a central module to store common xsl that I need
 both in cocoon and in my java code.

 Hi Thorsten,
 sorry for the delay, I am quite busy in this period on other projects.

 Anyway, I'll try to check and get back asap to you.

 Hi Thorsten,
 I was finally able to make all needed checks and the good news is that
 everything is working as expected.
 From the error message you report above I guess that you are not using
 the very latest C3 SNAPSHOT artifacts.

 Anyway, I've updated the sample application [1] with some description
 about how to run and what you get [2].

 HTH


Thank you very much, the problem was indeed in the older snapshot.

salu2

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

http://www.codebusters.es/



Re: [DISCUSS] Fix for COCOON3-105

2013-02-05 Thread Thorsten Scherler
On 02/05/2013 04:10 PM, Thorsten Scherler wrote:
 On 01/19/2013 02:23 PM, Francesco Chicchiriccò wrote:
 Il 17/01/2013 10:23, Francesco Chicchiriccò ha scritto:
 ...
 Hi Thorsten,
 I was finally able to make all needed checks and the good news is
 that everything is working as expected.
 From the error message you report above I guess that you are not
 using the very latest C3 SNAPSHOT artifacts.

 Anyway, I've updated the sample application [1] with some description
 about how to run and what you get [2].

 HTH


 Thank you very much, the problem was indeed in the older snapshot.

BTW

diff --git a/mysite2/pom.xml b/mysite2/pom.xml
index c5cb95b..e4c3527 100644
--- a/mysite2/pom.xml
+++ b/mysite2/pom.xml
@@ -17,7 +17,7 @@
   dependencies
 dependency
   groupIdcom.mycompany/groupId
-  artifactIdmysite2/artifactId
+  artifactIdmysite/artifactId
   version${project.version}/version
 /dependency


alu2

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

http://www.codebusters.es/



Re: [DISCUSS] Fix for COCOON3-105

2013-01-14 Thread Thorsten Scherler
On 12/20/2012 02:05 PM, Francesco Chicchiriccò wrote:
 On 20/12/2012 13:45, Leonardo Miceli wrote:
 Hello

 On 12/07/2012 01:33 PM, Francesco Chicchiriccò wrote:
 On 07/12/2012 13:09, Jos Snellings wrote:
 In shorthand: What are the implications then?


 (...)

 Bottomline:
 - a block context is addressable within the sitemap
   load resource from another block context is possible via
 'classpath'.
   The root of every block is available on the classpath?

 Everything should be working in the same way.


 Can you please tell me how can I address block_A's sitemap from from
 block_B's sitemap?
 I have used *blockcontext:/* for this before.

 This should work In the same way as in *servlet-service.xml, e.g. by
 replacing

 blockcontext:/otherblock/BLA

 with

 jar:classpath:lib/otherblock.jar!/COB-INF/BLA


Hi, I just tried the above in another project but using it in the
sitemap I get
java.net.MalformedURLException: invalid url:
classpath:lib/api-0.1-SNAPSHOT.jar!/COB-INF/resources/xsl/intern-to-solr.xsl
(java.net.MalformedURLException: unknown protocol: classpath)

I am trying to use a central module to store common xsl that I need both
in cocoon and in my java code.

salu2

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

http://www.codebusters.es/



Re: [VOTE] Apache Cocoon Integration Test Framework 1.0.1

2012-12-16 Thread Thorsten Scherler
+1


On Thu, Dec 13, 2012 at 10:16 AM, Francesco Chicchiriccò 
ilgro...@apache.org wrote:

 I've created a Cocoon Integration Test Framework 1.0.1 release, with the
 following artifacts up for a vote:

 SVN source tag (r1421155):
 https://svn.apache.org/repos/**asf/cocoon/subprojects/cocoon-**
 it-fw/tags/cocoon-it-fw-1.0.1/https://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-it-fw/tags/cocoon-it-fw-1.0.1/

 List of changes:
 https://svn.apache.org/repos/**asf/cocoon/subprojects/cocoon-**
 it-fw/tags/cocoon-it-fw-1.0.1/**src/changes/changes.xmlhttps://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-it-fw/tags/cocoon-it-fw-1.0.1/src/changes/changes.xml

 Maven staging repo:
 https://repository.apache.org/**content/repositories/**
 orgapachecocoon-007/https://repository.apache.org/content/repositories/orgapachecocoon-007/

 Source release (checksums and signatures are available at the same
 location):
 https://repository.apache.org/**content/repositories/**
 orgapachecocoon-007/org/**apache/cocoon/cocoon-it-fw/1.**
 0.1/cocoon-it-fw-1.0.1-source-**release.ziphttps://repository.apache.org/content/repositories/orgapachecocoon-007/org/apache/cocoon/cocoon-it-fw/1.0.1/cocoon-it-fw-1.0.1-source-release.zip

 PGP release keys (signed using 273DF287):
 http://www.apache.org/dist/**cocoon/KEYShttp://www.apache.org/dist/cocoon/KEYS

 Vote will be open for 72 hours.

 [ ] +1  approve
 [ ] +0  no opinion
 [ ] -1  disapprove (and reason why)
 --
 Francesco Chicchiriccò

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




-- 
Thorsten Scherler thorsten.at.codebusters.es
codeBusters S.L. - web based systems
consulting, training and solutions

Tel.: +34 954 520 169
http://www.codebusters.es/


Re: [VOTE] Apache Cocoon Servlet Service Implementation 1.3.2

2012-12-16 Thread Thorsten Scherler
+1

You may consider to extend the voting period, to allow that other can vote
on monday


On Thu, Dec 13, 2012 at 10:54 AM, Francesco Chicchiriccò 
ilgro...@apache.org wrote:

 I've created a Cocoon Servlet Service Implementation 1.3.2 release, with
 the following artifacts up for a vote:

 SVN source tag (r1421170):
 https://svn.apache.org/repos/**asf/cocoon/subprojects/cocoon-**
 servlet-service-impl/tags/**cocoon-servlet-service-impl-1.**3.2/https://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-servlet-service-impl/tags/cocoon-servlet-service-impl-1.3.2/

 List of changes:
 https://svn.apache.org/repos/**asf/cocoon/subprojects/cocoon-**
 servlet-service-impl/tags/**cocoon-servlet-service-impl-1.**
 3.2/src/changes/changes.xmlhttps://svn.apache.org/repos/asf/cocoon/subprojects/cocoon-servlet-service-impl/tags/cocoon-servlet-service-impl-1.3.2/src/changes/changes.xml

 Maven staging repo:
 https://repository.apache.org/**content/repositories/**
 orgapachecocoon-008/https://repository.apache.org/content/repositories/orgapachecocoon-008/

 Source release (checksums and signatures are available at the same
 location):
 https://repository.apache.org/**content/repositories/**
 orgapachecocoon-008/org/**apache/cocoon/cocoon-servlet-**
 service-impl/1.3.2/cocoon-**servlet-service-impl-1.3.2-**
 source-release.ziphttps://repository.apache.org/content/repositories/orgapachecocoon-008/org/apache/cocoon/cocoon-servlet-service-impl/1.3.2/cocoon-servlet-service-impl-1.3.2-source-release.zip

 PGP release keys (signed using 273DF287):
 http://www.apache.org/dist/**cocoon/KEYShttp://www.apache.org/dist/cocoon/KEYS

 Vote will be open for 72 hours.

 [ ] +1  approve
 [ ] +0  no opinion
 [ ] -1  disapprove (and reason why)
 --
 Francesco Chicchiriccò

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




-- 
Thorsten Scherler thorsten.at.codebusters.es
codeBusters S.L. - web based systems
consulting, training and solutions

Tel.: +34 954 520 169
http://www.codebusters.es/


[jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-12-08 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13527302#comment-13527302
 ] 

Thorsten Scherler commented on COCOON3-105:
---

I tried but I get 
SEVERE: Error configuring application listener of class 
org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener
java.lang.ClassNotFoundException: 
org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at 
org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at 
org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalin

Running the resulting war of my clone in tomcat apache-tomcat-7.0.33

need to check again the patch whether everything was applied - on second 
thought I need to double check the subprojects.

 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Assignee: Francesco Chicchiriccò
Priority: Blocker
 Fix For: 3.0.0-beta-1

 Attachments: COCOON3-105.npe.diff, COCOON3-105.patch, 
 cocoon-block-deployment.patch, cocoon-servlet-service-impl.patch


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request

[jira] [Commented] (COCOON3-112) JCommander is updated to 1.30

2012-11-27 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13504568#comment-13504568
 ] 

Thorsten Scherler commented on COCOON3-112:
---

can you provide a patch, please?

 JCommander is updated to 1.30
 -

 Key: COCOON3-112
 URL: https://issues.apache.org/jira/browse/COCOON3-112
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-cli
Reporter: ZhiQiang,He
Priority: Trivial

 This is just a tip.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: [DISCUSS] Release plan

2012-11-17 Thread Thorsten Scherler
On 11/12/2012 10:25 AM, Francesco Chicchiriccò wrote:
 ...
 =

 My questions now are:

  1. Would you agree with the above drafted release plan?

Yes, with a 2.1 release, since I recall there had been a couple of changes.



  2. If so, who is available to help with these tasks? Consider that
 documentation tasks are an easier way to contribute to the project even
 without development skills.

In 2002 I started exactly in this project with documentation. The
initial purpose of cocoon was to generate consistence documentation for
java.apache.org meaning to write some cocoon docs (esp. c3) be sure you
pop onto our watch list.


 If you've been using C3 and appreciate this, please don't deny your
 help: we really need it!

c3 is really missing helping hands. I would love to get some cocoon
veterans reactivated again especially for the OSGI re-factoring that we
need to do in the future.  This project is as old as the ASF itself and
we have a long list of prime ASF member contributing to this project.
However I understand that we all only have very limited time.

...but for everyone that is reading this and like the idea of cocoon
please help with

- constructive discussions and giving the helping hand on the ml
- documentation
- testing and bug fixing
- integrating c3 in your project

salu2
PS thanks Francesco for starting this and it had been a pleasure to meet
you in person.

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

http://www.codebusters.es/



[jira] [Updated] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail

2012-10-23 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler updated COCOON3-107:
--

Attachment: BlockcontextInterpreter.java

interpreter to resolve blockcontext against actual file system

 With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, 
 integration tests fail
 -

 Key: COCOON3-107
 URL: https://issues.apache.org/jira/browse/COCOON3-107
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Francesco Chicchiriccò
Priority: Critical
 Fix For: 3.0.0-beta-1

 Attachments: BlockcontextInterpreter.java


 This is happening as a consequence of COCOON3-105, by upgrading 
 cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 
 1.2.2-SNAPSHOT
 Basically, since there is no more an installed URLStreamHandlerFactory, every 
 new URL() should include an instance of BlockContextURLStreamHandler.
 This makes every other URL loading (including XSLT sheets in a separate 
 block, like happening for cocoon-sample-webapp) unaware of blockcontext:// 
 URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail

2012-10-23 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13482880#comment-13482880
 ] 

Thorsten Scherler commented on COCOON3-107:
---

add bean name=expression-language:blockcontext 
class=org.apache.cocoon.sitemap.expression.BlockcontextInterpreter / to your 
app context then use it in your sitemap as {blockcontext:raw-to-internal.xsl} 
where raw-to-internal.xsl would be resolved against the current blockservice 
file uri.

 With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, 
 integration tests fail
 -

 Key: COCOON3-107
 URL: https://issues.apache.org/jira/browse/COCOON3-107
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Francesco Chicchiriccò
Priority: Critical
 Fix For: 3.0.0-beta-1

 Attachments: BlockcontextInterpreter.java


 This is happening as a consequence of COCOON3-105, by upgrading 
 cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 
 1.2.2-SNAPSHOT
 Basically, since there is no more an installed URLStreamHandlerFactory, every 
 new URL() should include an instance of BlockContextURLStreamHandler.
 This makes every other URL loading (including XSLT sheets in a separate 
 block, like happening for cocoon-sample-webapp) unaware of blockcontext:// 
 URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail

2012-10-23 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler updated COCOON3-107:
--

Attachment: BlockcontextInterpreter.java

Slimed down version - without client deps ;)

 With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, 
 integration tests fail
 -

 Key: COCOON3-107
 URL: https://issues.apache.org/jira/browse/COCOON3-107
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Francesco Chicchiriccò
Priority: Critical
 Fix For: 3.0.0-beta-1

 Attachments: BlockcontextInterpreter.java, 
 BlockcontextInterpreter.java


 This is happening as a consequence of COCOON3-105, by upgrading 
 cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 
 1.2.2-SNAPSHOT
 Basically, since there is no more an installed URLStreamHandlerFactory, every 
 new URL() should include an instance of BlockContextURLStreamHandler.
 This makes every other URL loading (including XSLT sheets in a separate 
 block, like happening for cocoon-sample-webapp) unaware of blockcontext:// 
 URLs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Cocoon Get Together on ACEU 2012 Sinsheim (was Re: Cocoon presentation link and questions about new contributions)

2012-10-11 Thread Thorsten Scherler

On 10/11/2012 09:22 AM, Francesco Chicchiriccò wrote:

On 11/10/2012 00:38, Javier Puerto wrote:
...

I hope to see you soon in the ApacheCon,

Yep, me too: who's coming??? Chance to have a small Cocoon Get Together
(or just a beer) there?


Hi all,

I was up to write a similar mail asking about a CGT.

We from codebusters.es will come in total 4 pers. Andy tries to come as 
well and Simone and Francesco are there since they are speakers. Meaning 
we have a pretty strong group and should get together to get some work 
on cocoon done and directly commit it. ;)


codebusters.es is right now moving papers to be official sponsor for a 
CocoonGetTogether on ACEU 2012 so that we could get some drink and food 
for the hackathon.


What is the best day for everyone? I guess Monday 05.11 would be the 
best day, or?


BTW 3 of us will fly in already on 1.11 and the 4th will come on the 
4th. We booked a private house in the area and plan to see some sights 
on the weekend. If somebody is interested in a private house I have some 
contacts that still may have some space left, further if somebody is 
interested to get a beer on the weekend before let us talk. ;)


salu2

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

http://www.codebusters.es/



Re: Nexus staging repository???

2012-10-10 Thread Thorsten Scherler

On 10/08/2012 11:23 AM, Francesco Chicchiriccò wrote:

Hi,
I've just noticed an open staging repository on Nexus
(org.apache.cocoon-054) opened by Thorsten last Sep 11th.

Could it be removed?

Regards.



Sorry, did not read the mail the first time correctly and Javier just 
pointed it out to me.


I guess that was an intend to deploy some artifacts. Yes please you can 
remove it again.


salu2


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

http://www.codebusters.es/



Re: Nexus staging repository???

2012-10-10 Thread Thorsten Scherler

On 10/10/2012 04:10 PM, Francesco Chicchiriccò wrote:

On 10/10/2012 16:07, Thorsten Scherler wrote:

On 10/08/2012 11:23 AM, Francesco Chicchiriccò wrote:

Hi,
I've just noticed an open staging repository on Nexus
(org.apache.cocoon-054) opened by Thorsten last Sep 11th.

Could it be removed?

Regards.



Sorry, did not read the mail the first time correctly and Javier just 
pointed it out to me.


...teamwork ;-)

I guess that was an intend to deploy some artifacts. Yes please you 
can remove it again.


Done.

Regards.




thanks

salu2

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

http://www.codebusters.es/



[jira] [Reopened] (COCOON-2302) C2.2 : unable to find daisy-..-1.5 jars in rev 959219

2012-10-02 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler reopened COCOON-2302:
---

  Assignee: (was: Francesco Chicchiriccò)

The bug is not fixed.

I fixed some bad markup in r1392857 but I can see the error afterwards on the 
neko stuff.

 C2.2 : unable to find daisy-..-1.5 jars in rev 959219
 -

 Key: COCOON-2302
 URL: https://issues.apache.org/jira/browse/COCOON-2302
 Project: Cocoon
  Issue Type: Bug
  Components: - Build System: Maven
Affects Versions: 2.2-dev (Current SVN)
Reporter: Florent ANDRE

 Hi,
 On a fresh co of cocoon trunk give me this errors when mvn install.
 Find this repository (http://daisycms.org/maven/maven2/dev/), but there is 
 just 2.5 versions of libs.
 Ugrade dependencies to 2.5 or another 1.5 repository ?
 Thanks.
 INFO] Unable to find resource 'daisy:daisy-util:jar:1.5-dev' in repository 
 gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository)
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Failed to resolve artifact.
 Missing:
 --
 1) daisy:daisy-repository-api:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-api -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-api -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-api:jar:1.5-dev
 2) nekodtd:nekodtd:jar:0.1.11
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=nekodtd -DartifactId=nekodtd 
 -Dversion=0.1.11 -Dpackaging=jar -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=nekodtd -DartifactId=nekodtd 
 -Dversion=0.1.11 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] 
 -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) nekodtd:nekodtd:jar:0.1.11
 3) daisy:daisy-repository-xmlschema-bindings:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-xmlschema-bindings -Dversion=1.5-dev 
 -Dpackaging=jar -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-xmlschema-bindings -Dversion=1.5-dev 
 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-xmlschema-bindings:jar:1.5-dev
 4) daisy:daisy-repository-client-impl:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-client-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-client-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-client-impl:jar:1.5-dev
 5) daisy:daisy-repository-common-impl:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-common-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-common-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository

[jira] [Closed] (COCOON-2302) C2.2 : unable to find daisy-..-1.5 jars in rev 959219

2012-10-02 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON-2302.
-

Resolution: Fixed

Committed revision 1392864.

Fixing groupId and repository location for the daisyplugin. BTW do we really 
use that still?

 C2.2 : unable to find daisy-..-1.5 jars in rev 959219
 -

 Key: COCOON-2302
 URL: https://issues.apache.org/jira/browse/COCOON-2302
 Project: Cocoon
  Issue Type: Bug
  Components: - Build System: Maven
Affects Versions: 2.2-dev (Current SVN)
Reporter: Florent ANDRE

 Hi,
 On a fresh co of cocoon trunk give me this errors when mvn install.
 Find this repository (http://daisycms.org/maven/maven2/dev/), but there is 
 just 2.5 versions of libs.
 Ugrade dependencies to 2.5 or another 1.5 repository ?
 Thanks.
 INFO] Unable to find resource 'daisy:daisy-util:jar:1.5-dev' in repository 
 gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository)
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Failed to resolve artifact.
 Missing:
 --
 1) daisy:daisy-repository-api:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-api -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-api -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-api:jar:1.5-dev
 2) nekodtd:nekodtd:jar:0.1.11
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=nekodtd -DartifactId=nekodtd 
 -Dversion=0.1.11 -Dpackaging=jar -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=nekodtd -DartifactId=nekodtd 
 -Dversion=0.1.11 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] 
 -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) nekodtd:nekodtd:jar:0.1.11
 3) daisy:daisy-repository-xmlschema-bindings:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-xmlschema-bindings -Dversion=1.5-dev 
 -Dpackaging=jar -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-xmlschema-bindings -Dversion=1.5-dev 
 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-xmlschema-bindings:jar:1.5-dev
 4) daisy:daisy-repository-client-impl:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-client-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-client-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-client-impl:jar:1.5-dev
 5) daisy:daisy-repository-common-impl:jar:1.5-dev
   Try downloading the file manually from the project website.
   Then, install it using the command:
   mvn install:install-file -DgroupId=daisy 
 -DartifactId=daisy-repository-common-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file
   Alternatively, if you host your own repository you can deploy the file 
 there:
   mvn deploy:deploy-file -DgroupId=daisy 
 -DartifactId=daisy-repository-common-impl -Dversion=1.5-dev -Dpackaging=jar 
 -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
   Path to dependency:
   1) 
 org.apache.cocoon:cocoon-sitemaptags2daisy-plugin:maven-plugin:1.0.0-SNAPSHOT
   2) daisy:daisy-repository-common-impl:jar:1.5-dev
 6

Re: blockcontext protocol (part 2) (was Re: [jira] [Created] (COCOON3-107) ...)

2012-09-28 Thread Thorsten Scherler

On 09/28/2012 07:24 AM, Jos Snellings wrote:

Dear all,

Noticing that is very interesting discussion is getting silent, I'd 
like to ask a question.

First of all, pardon me my ignorance. (blonde, can't help it).
So from just a high-level understanding, can I rephrase the problem?
What we seek to accomplish is:
* in a sitemap, being able to load resources from another sitemap,
  according to the scheme:
  map:generate src=cocoon://{relative-url}/
* within an xslt calling
xsl:variable name=var select='cocoon://{relative-url}' /
* within controller logic:  redirect, or send the reference of a 
ModelAndView


Well the cocoon:/ is/was never a java.net handler but resolved via 
avalon/excalibur. Further the c3 correspond  would be more servlet:/




So now, in C3, we want to address resources cross-block to accomplish 
modularity, right?


map:generate src={someBlock}://{relative-url}/


well yes and no. blockcontext:/ refers to static (resources) and not 
matches in the blockcontext sitemap. If you would want to call the block 
sitemap you would request servlet:${blockId}:/...




This should be restricted to the instance of the cocoon servlet 
itself, so it can peacefully coexist with another cocoon servlet in 
the same JVM.


The blockcontext protocol once installed only will work for the first 
called servlet. With the change of Fran. we do what you describe but on 
a specific point in the app. BUT we never install the protocol which 
makes it unusable outside the java route where you can pass a URLHandler 
to the context.


So you would like to avoid tweaking URL for the servlet without 
interfering with the rest.


- something less invasive than URL.setURLStreamHandlerFactory ?
- mechanism that keeps track of wich cocoon servlet deployed wich blocks?

Is that a correct way of stating it? Not even my 10 cents, just a 
question.


If we want to keep using blockcontext protocol, the handler needs a 
central place where the different paths are resolved. However due to the 
nature of the problem we can have the same name for a block in 2 
different servlet but if we resolve the url in the connection we will 
have the problem deciding which path to return to the caller, since it 
can happen that the underlying request has no servlet context associated 
meaning it is impossible to determine which block to use.


Thanks for keeping the thread alive.

salu2



Cheers,
Jos


On Wed, Sep 26, 2012 at 3:05 PM, Thorsten Scherler scher...@gmail.com 
mailto:scher...@gmail.com wrote:


On 09/26/2012 10:10 AM, Francesco Chicchiriccò (JIRA) wrote:

Francesco Chicchiriccò created COCOON3-107:
--

  Summary: With latest cocoon-block-deployment and
cocoon-service-impl SNAPSHOTs, integration tests fail
  Key: COCOON3-107
  URL:
https://issues.apache.org/jira/browse/COCOON3-107
  Project: Cocoon 3
   Issue Type: Bug
   Components: cocoon-sample-webapp, cocoon-servlet,
cocoon-sitemap
 Affects Versions: 3.0.0-beta-1
 Reporter: Francesco Chicchiriccò
 Priority: Critical
  Fix For: 3.0.0-beta-1


This is happening as a consequence of COCOON3-105.

Basically, since there is no more an installed
URLStreamHandlerFactory, every new URL() should include an
instance of BlockContextURLStreamHandler.

This makes every other URL loading (including XSLT sheets in a
separate block, like happening for cocoon-sample-webapp)
unaware of blockcontext:// URLs.


Meaning we are back to square one.

Andreas Hartman is ATM in our office and we had a small chat about
the underlying problem.
We think that blockcontext cannot work as protocol as it is for now.

The above report shows that we need to use a
URLStreamHandlerFactory to be able to resolve this protocol.


{myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}

Now if we look on the above and how we defined it, we have:

in block-servlet-service.xml

servlet:context mount-path=/${blockId}
context-path=blockcontext:/${blockId}//

will then produce the following blockcontext object:
${blockId}=${tomcat.work}/${servlet_which uses the
block}/blocks/${blockId}/

Meaning that blockcontext:/ will be resolved to
${tomcat.work}/${servlet_which uses the block}/blocks/

There are various problematic parts:

As of the looks of it a block is treated as servlet mounted to a
context.  Problematic is that the mount-path in some cases needs
to become = to catch all incoming request, which means root context.
Blocks are treated as servlets meaning you can only mount once a
block (in a specific version of that block

Re: blockcontext protocol (part 2) (was Re: [jira] [Created] (COCOON3-107) ...)

2012-09-28 Thread Thorsten Scherler

On 09/28/2012 02:41 PM, Jos Snellings wrote:

Thanks, Thorsten, that makes it a lot clearer.
I will give it a second thought and get back.
Just another question: are there other use cases than:
- within xslt : document() construct
- sitemap
- controller-modelAndView
?


Actually since you brought up cocoon:// protocol I think one possible 
solution is DROP the blockcontext protocol and force to expose all 
static matches via the sitemap. This way the calling instance would need 
to use the servlet protocol and there should no problem any more.


Not sure whether you remember the context:/ in c2.1.x which simply 
pointed to the underlying serlvet context path. The blockcontext is 
based on the same idea. You can reach the path where the actually block 
is deployed (within the calling servlet is to say). However as I see it 
the only real need to know that path is when we deploy the blocks (where 
francesco path works), meaning if we do not use it otherwise the issue 
is fixed.


Now that we reanimated the thread, has anyone else ideas? I feel it is 
an important issue and I would love to see it solved,
as I have myself two cocoon apps that I would like to deploy to one 
server.




Well if they are both c3 based that is ATM broken and I agree that this 
is an important issue since it renders c3 useless if we not fix it.


salu2


Kind regards,
Jos

On Fri, Sep 28, 2012 at 2:29 PM, Thorsten Scherler scher...@gmail.com 
mailto:scher...@gmail.com wrote:


On 09/28/2012 07:24 AM, Jos Snellings wrote:

Dear all,

Noticing that is very interesting discussion is getting silent,
I'd like to ask a question.
First of all, pardon me my ignorance. (blonde, can't help it).
So from just a high-level understanding, can I rephrase the problem?
What we seek to accomplish is:
* in a sitemap, being able to load resources from another sitemap,
  according to the scheme:
  map:generate src=cocoon://{relative-url}/
* within an xslt calling
xsl:variable name=var select='cocoon://{relative-url}' /
* within controller logic:  redirect, or send the reference of a
ModelAndView


Well the cocoon:/ is/was never a java.net http://java.net
handler but resolved via avalon/excalibur. Further the c3
correspond  would be more servlet:/




So now, in C3, we want to address resources cross-block to
accomplish modularity, right?

map:generate src={someBlock}://{relative-url}/


well yes and no. blockcontext:/ refers to static (resources) and
not matches in the blockcontext sitemap. If you would want to call
the block sitemap you would request servlet:${blockId}:/...




This should be restricted to the instance of the cocoon servlet
itself, so it can peacefully coexist with another cocoon servlet
in the same JVM.


The blockcontext protocol once installed only will work for the
first called servlet. With the change of Fran. we do what you
describe but on a specific point in the app. BUT we never install
the protocol which makes it unusable outside the java route where
you can pass a URLHandler to the context.


So you would like to avoid tweaking URL for the servlet without
interfering with the rest.

- something less invasive than URL.setURLStreamHandlerFactory ?
- mechanism that keeps track of wich cocoon servlet deployed wich
blocks?

Is that a correct way of stating it? Not even my 10 cents, just a
question.


If we want to keep using blockcontext protocol, the handler needs
a central place where the different paths are resolved. However
due to the nature of the problem we can have the same name for a
block in 2 different servlet but if we resolve the url in the
connection we will have the problem deciding which path to return
to the caller, since it can happen that the underlying request has
no servlet context associated meaning it is impossible to
determine which block to use.

Thanks for keeping the thread alive.

salu2




Cheers,
Jos


On Wed, Sep 26, 2012 at 3:05 PM, Thorsten Scherler
scher...@gmail.com mailto:scher...@gmail.com wrote:

On 09/26/2012 10:10 AM, Francesco Chicchiriccò (JIRA) wrote:

Francesco Chicchiriccò created COCOON3-107:
--

  Summary: With latest
cocoon-block-deployment and cocoon-service-impl
SNAPSHOTs, integration tests fail
  Key: COCOON3-107
  URL:
https://issues.apache.org/jira/browse/COCOON3-107
  Project: Cocoon 3
   Issue Type: Bug
   Components: cocoon-sample-webapp,
cocoon-servlet, cocoon-sitemap
 Affects Versions: 3.0.0-beta-1
 Reporter: Francesco Chicchiriccò

blockcontext protocol (part 2) (was Re: [jira] [Created] (COCOON3-107) ...)

2012-09-26 Thread Thorsten Scherler

On 09/26/2012 10:10 AM, Francesco Chicchiriccò (JIRA) wrote:

Francesco Chicchiriccò created COCOON3-107:
--

  Summary: With latest cocoon-block-deployment and 
cocoon-service-impl SNAPSHOTs, integration tests fail
  Key: COCOON3-107
  URL: https://issues.apache.org/jira/browse/COCOON3-107
  Project: Cocoon 3
   Issue Type: Bug
   Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap
 Affects Versions: 3.0.0-beta-1
 Reporter: Francesco Chicchiriccò
 Priority: Critical
  Fix For: 3.0.0-beta-1


This is happening as a consequence of COCOON3-105.

Basically, since there is no more an installed URLStreamHandlerFactory, every new 
URL() should include an instance of BlockContextURLStreamHandler.

This makes every other URL loading (including XSLT sheets in a separate block, like 
happening for cocoon-sample-webapp) unaware of blockcontext:// URLs.



Meaning we are back to square one.

Andreas Hartman is ATM in our office and we had a small chat about the 
underlying problem.

We think that blockcontext cannot work as protocol as it is for now.

The above report shows that we need to use a URLStreamHandlerFactory to 
be able to resolve this protocol.


{myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}

Now if we look on the above and how we defined it, we have:

in block-servlet-service.xml

servlet:context mount-path=/${blockId} 
context-path=blockcontext:/${blockId}//


will then produce the following blockcontext object:
${blockId}=${tomcat.work}/${servlet_which uses the block}/blocks/${blockId}/

Meaning that blockcontext:/ will be resolved to 
${tomcat.work}/${servlet_which uses the block}/blocks/


There are various problematic parts:

As of the looks of it a block is treated as servlet mounted to a 
context.  Problematic is that the mount-path in some cases needs to 
become = to catch all incoming request, which means root context.
Blocks are treated as servlets meaning you can only mount once a block 
(in a specific version of that block). If another block use this blockId 
it is not possible to use the same mount point. However that has the 
ultimate consequence that you need to manage the name of your block 
manually or ideally the ${blockId} is unique and contains the version of 
the block!
However blocks are more servlets within a servlet, since without a 
servlet that has deps on them they would be not reachable.


This leads to to the real mount point ${servlet_which uses the 
block}/{@mount-path_as defined in the block} in the servlet context and 
the path as above. For example blockcontext:/test could refer to  
${tomcat.work}/${servlet1}/blocks/test or 
${tomcat.work}/${servlet2}/blocks/test, depending from which servlet 
the request is issued. Meaning the blockcontext protocol does not 
resolve url (Uniform (or universal) resource locator) since the 
resources it describes are not universal (due to the fixed connection to 
the underlying servlet).


With all the above said the logical consequence is that the pattern of 
blockcontext would need the ${servlet_which uses the block} in it 
somewhere, but that would render the whole block concept useless if used 
within the block. That however would force a url rewritting on the fly 
where the ${servlet_which uses the block} prefixed would be injected 
prior of resolving.


We tested to push the resolving logic into the handler but that failed 
since some calls have no resolvable servlet context while they issue the 
call. We succeed to inject the handler in the servlet context but never 
declared an UrlFactory so xsl imports e.g. are failing now since they do 
not know about our handler.


In the old days (2.1.x) we had our avalon/exaclibur source resolver for 
creating custom protocols within a specific context - with them above 
would not have been a prob.


Anyway, how can we refactor the blockcontext so we can deploy more then 
one c3 webapp? Any ideas?


salu2

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

http://www.codebusters.es/



[jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-25 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13462618#comment-13462618
 ] 

Thorsten Scherler commented on COCOON3-105:
---

Yeah, go ahead. 

If you can manage to seperate the formating changes from the real ones for the 
commit that would awesome. If you want I can do that, just shout.


 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker
 Attachments: COCOON3-105.npe.diff, cocoon-block-deployment.patch, 
 cocoon-servlet-service-impl.patch


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request on a fresh stared tomcat that one will work 
 the other will present a blank page and the log will say something like:
 Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
 The available blocks are 
 {myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.
 In this case I requested the 2nd first.
 Originally I found out because we have a client that has some c3 and a c2.2.1 
 app (not) running aside. So in case you create a 2.2.1 webapp from the 
 archetype as described  http://cocoon.apache.org/2.2/1159_1_1.html and use it 
 instead of the c3 2nd webapp you will get similar results.
 If you start first with the 1st c3 and then deploy the c2.2 on the run then 
 you can actually see both working ONLY if you first request

[jira] [Closed] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-25 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-105.
-

   Resolution: Fixed
Fix Version/s: 3.0.0-beta-1

last commit around the issue r1389820.

snapshots are deployed as well.

 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker
 Fix For: 3.0.0-beta-1

 Attachments: COCOON3-105.npe.diff, cocoon-block-deployment.patch, 
 cocoon-servlet-service-impl.patch


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request on a fresh stared tomcat that one will work 
 the other will present a blank page and the log will say something like:
 Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
 The available blocks are 
 {myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.
 In this case I requested the 2nd first.
 Originally I found out because we have a client that has some c3 and a c2.2.1 
 app (not) running aside. So in case you create a 2.2.1 webapp from the 
 archetype as described  http://cocoon.apache.org/2.2/1159_1_1.html and use it 
 instead of the c3 2nd webapp you will get similar results.
 If you start first with the 1st c3 and then deploy the c2.2 on the run then 
 you can actually see both working ONLY if you first request the c3 and then 
 deploy and then see the c2. In case you do

[jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-24 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13461913#comment-13461913
 ] 

Thorsten Scherler commented on COCOON3-105:
---

Hi Francesco, first of all thank you very much for the patch. 

I tried the patches, but with them my webapps actually did not work at all the 
first time. 

After I patched them the correct way everything seems to work as expected. 

Regarding the dep to block from ssc I am not sure, but this way the 
blockcontext is again context aware and unique.

I will do some more testing and finally try to apply the changes in the client 
project.

Thx again

 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker
 Attachments: COCOON3-105.npe.diff, cocoon-block-deployment.patch, 
 cocoon-servlet-service-impl.patch


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request on a fresh stared tomcat that one will work 
 the other will present a blank page and the log will say something like:
 Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
 The available blocks are 
 {myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.
 In this case I requested the 2nd first.
 Originally I found out because we have a client that has some c3 and a c2.2.1 
 app (not) running aside. So in case you create a 2.2.1 webapp from

BlockContextURLConnection is not context safe

2012-09-18 Thread Thorsten Scherler

Hi all,

I am working on COCOON3-105 whenever I find a sec, but I am thinking 
about the underlying problem for a while now.


To resume, the blockcontext:/ is being registered as an extension to 
java.net.URLConnection. In case of a not-known protocol we will create 
the StreamHandler (who is responsible to open the urlConnection) once - 
for the whole container!


This happens in the BlockContextURLStreamHandlerFactory in the method 
createURLStreamHandler(String protocol). Like said: only once (!) we 
call this method even if we have two different servlets using different 
blockcontext. This finally leads to that the BlockContextURLConnection 
only knows the blockcontext of the first requested blockcontext and 
ignores any others.


Some possible solution I see:
- move the resolving of the blockcontext into the 
BlockContextURLConnection. I tried that in the patch I attached to the 
issue but the problem is that the second request has no ServletContext 
associated to it so we cannot get the blocks. - since we cannot resolve 
here the blockcontext this solution does not work
- use a global blockcontext map. A reference to a global blockcontext 
map will be kept and this map needs to be merged when a new app is 
deployed (if needed). However that leads to many open issue like 
security, version, etc.


Further how do you undeploy the protocol since undeploying the 
underlying servlet would need to undeploy only a part of the 
blockcontext protocol.


I am not sure how to overcome above obstacles and would love any 
thoughts from the community.


salu2

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

http://www.codebusters.es/



Re: [jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-17 Thread Thorsten Scherler

On 09/17/2012 07:16 AM, Jos Snellings wrote:

Hi Thorsten,

I believe having encountered this problem once.
However, it is not systematic.


Hi Joe,

I think I pinned down the problem.

We use java.net.urlHandler which means we only get init once. I am ATM 
reviewing the servlet handler and here we do the resolving part in the 
Connection part.


I think the blockcontextHandler needs to loose the this.blockcontext 
part, this would need to be resolved in the actual 
BlockContextURLConnection to resolve against only for the current 
servlet specific registered blocks.


salu2



Jos

On Mon, Sep 17, 2012 at 12:06 AM, Thorsten Scherler (JIRA) 
j...@apache.org mailto:j...@apache.org wrote:



[

https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13456689#comment-13456689
]

Thorsten Scherler commented on COCOON3-105:
---

The problem lies in in

org.apache.cocoon.blockdeployment.BlockContextURLStreamHandlerFactory.createURLStreamHandler
here we create a  BlockContextURLStreamHandler extends
URLStreamHandler

Regarding URLStreamHandler
/**
 * The abstract class codeURLStreamHandler/code is the common
 * superclass for all stream protocol handlers. A stream protocol
 * handler knows how to make a connection for a particular protocol
 * type, such as codehttp/code, codeftp/code, or
 * codegopher/code.
 * p
 * In most cases, an instance of a codeURLStreamHandler/code
 * subclass is not created directly by an application. Rather, the
 * first time a protocol name is encountered when constructing a
 * codeURL/code, the appropriate stream protocol handler is
 * automatically loaded.*/

Which is exactly the problem in our case. Once the
URLStreamHandler is setup for the first blockcontext as protocol
the second servlet will directly use the java.net.URLStreamHandler
and use that protocol.

Meaning if you start tomcat with both apps deployed the first
request of the first app decides which blockcontext will be
associate with the block context protocol

That happens in BlockContextURLStreamHandlerFactory where
createURLStreamHandler is only called once with the first request
the second then uses the old block context.


 webapp fails if on the same servlet container is a c2.2.1 or
other c3 webapp running


-

 Key: COCOON3-105
 URL:
https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker

 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO]
 [INFO] myparent ..
SUCCESS [1.163s]
 [INFO] myblock ...
SUCCESS [3.611s]
 [INFO] mywebapp ..
SUCCESS [1.924s]
 [INFO] myblock2 ..
SUCCESS [1.498s]
 [INFO] mywebapp2 .
SUCCESS [1.230s]
 [INFO]

 Now take a tomcat (I used 6) and first deploy the mywebapp. You
can copy it before you start to webapp or if you have it enable
deploy it on a running instance. You should see the welcome page
under something like http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will
throw a StringIndexOutOfBoundsException but that is another ticket
I guess.
 Now if you deploy the second webapp on a running instance it
will deploy without problem but requesting
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1
org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the
RequestProcessor correctly.

org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException:
Can't build sitemap from blockcontext:/myblock2/sitemap.xmap
   at
org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70)
~[cocoon-sitemap-3.0.0

[jira] [Updated] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-17 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler updated COCOON3-105:
--

Attachment: COCOON3-105.npe.diff

This is a first step to remove the need of the blocktontext in the constructor. 

However it works fine with the first sevlet however the second will fail with a 
NPE because 
ServletContext servletContext = CallStackHelper.getCurrentServletContext();
is null

 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker
 Attachments: COCOON3-105.npe.diff


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request on a fresh stared tomcat that one will work 
 the other will present a blank page and the log will say something like:
 Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
 The available blocks are 
 {myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.
 In this case I requested the 2nd first.
 Originally I found out because we have a client that has some c3 and a c2.2.1 
 app (not) running aside. So in case you create a 2.2.1 webapp from the 
 archetype as described  http://cocoon.apache.org/2.2/1159_1_1.html and use it 
 instead of the c3 2nd webapp you will get similar results.
 If you start first with the 1st c3 and then deploy the c2.2 on the run then 
 you can actually see both working ONLY if you first

[jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-17 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13456938#comment-13456938
 ] 

Thorsten Scherler commented on COCOON3-105:
---

We need to find a way to get the 
this.blockContexts = (MapString, String) servletContext

.getAttribute(BlockDeploymentServletContextListener.BLOCK_CONTEXT_MAP);

Somebody knows why servletContext = CallStackHelper.getCurrentServletContext() 
can become null? I need to attend now some urgent matter so I will not be able 
to put more hours into the issue but I will attend it later on and follow the 
comment flow.

 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker
 Attachments: COCOON3-105.npe.diff


 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common frames omitted
 As you see the blockcontext from the 2nd app is the one from the first EVEN 
 if they are deployed as 2 different webapps!
 Now stop the tomcat and start again. 
 Depending which app you request on a fresh stared tomcat that one will work 
 the other will present a blank page and the log will say something like:
 Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
 The available blocks are 
 {myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.
 In this case I requested the 2nd first.
 Originally I found out because we have a client that has some c3 and a c2.2.1 
 app (not) running aside. So in case you create a 2.2.1 webapp from the 
 archetype as described  http://cocoon.apache.org/2.2/1159_1_1.html and use

[jira] [Commented] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-16 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13456689#comment-13456689
 ] 

Thorsten Scherler commented on COCOON3-105:
---

The problem lies in in 
org.apache.cocoon.blockdeployment.BlockContextURLStreamHandlerFactory.createURLStreamHandler
here we create a  BlockContextURLStreamHandler extends URLStreamHandler

Regarding URLStreamHandler 
/**
 * The abstract class codeURLStreamHandler/code is the common
 * superclass for all stream protocol handlers. A stream protocol
 * handler knows how to make a connection for a particular protocol
 * type, such as codehttp/code, codeftp/code, or
 * codegopher/code.
 * p
 * In most cases, an instance of a codeURLStreamHandler/code
 * subclass is not created directly by an application. Rather, the
 * first time a protocol name is encountered when constructing a
 * codeURL/code, the appropriate stream protocol handler is
 * automatically loaded.*/

Which is exactly the problem in our case. Once the URLStreamHandler is setup 
for the first blockcontext as protocol the second servlet will directly use the 
java.net.URLStreamHandler and use that protocol.

Meaning if you start tomcat with both apps deployed the first request of the 
first app decides which blockcontext will be associate with the block context 
protocol

That happens in BlockContextURLStreamHandlerFactory where 
createURLStreamHandler is only called once with the first request the second 
then uses the old block context.


 webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp 
 running 
 -

 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker

 I noticed that you cannot run 2 c3 based war in a tomcat.
 To reproduce:
 - seed parent via archetype
 - seed block in parent via archetype
 - seed block2 in parent via archetype
 - seed webapp in parent via archetype
 - seed webapp2 in parent via archetype
 where webapp depends on block one and webapp2 depends on block2.
 My sample was:
 [INFO] Reactor Summary:
 [INFO] 
 [INFO] myparent .. SUCCESS [1.163s]
 [INFO] myblock ... SUCCESS [3.611s]
 [INFO] mywebapp .. SUCCESS [1.924s]
 [INFO] myblock2 .. SUCCESS [1.498s]
 [INFO] mywebapp2 . SUCCESS [1.230s]
 [INFO] 
 
 Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
 before you start to webapp or if you have it enable deploy it on a running 
 instance. You should see the welcome page under something like 
 http://localhost:8080/mywebapp-1.0-SNAPSHOT/
 side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
 StringIndexOutOfBoundsException but that is another ticket I guess.
 Now if you deploy the second webapp on a running instance it will deploy 
 without problem but requesting 
 http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
 will return a blank page and in 
 /.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
 you find:
 2012-09-13 22:12:46,056 ERROR http-8080-1 
 org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
 RequestProcessor correctly.
 org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
 sitemap from blockcontext:/myblock2/sitemap.xmap
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   at 
 org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
  ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
 ...
 Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
 The available blocks are 
 {myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at 
 org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
  ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
   at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
   at 
 org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
 ~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
   ... 46 common

[jira] [Created] (COCOON3-104) org.apache.cocoon.archetype-webapp creating a new seed fails due to missing logback conf

2012-09-13 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-104:
-

 Summary: org.apache.cocoon.archetype-webapp creating a new seed 
fails due to missing logback conf
 Key: COCOON3-104
 URL: https://issues.apache.org/jira/browse/COCOON3-104
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-archetype-X
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler


if you create a webapp project with the artifact like:

thorsten@bulldozer:~/src/codebusters/c3$ mvn archetype:create \
 -DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
 -DarchetypeArtifactId=cocoon-archetype-webapp \
 -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
 -DgroupId=com.mycompany \
 -DartifactId=mywebapp 

Maven is going to complain about:

[INFO] Using following parameters for creating project from Old (1.x) 
Archetype: cocoon-archetype-webapp:3.0.0-beta-1-SNAPSHOT
[INFO] 

[INFO] Parameter: groupId, Value: com.mycompany
[INFO] Parameter: packageName, Value: com.mycompany
[INFO] Parameter: package, Value: com.mycompany
[INFO] Parameter: artifactId, Value: mywebapp
[INFO] Parameter: basedir, Value: /home/thorsten/src/codebusters/c3
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[ERROR] ResourceManager : unable to find resource 
'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' in any 
resource loader.
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 2.264s
[INFO] Finished at: Thu Sep 13 19:30:50 CEST 2012
[INFO] Final Memory: 8M/239M
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on 
project standalone-pom: Error creating from archetype: Error merging velocity 
templates: Unable to find resource 
'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' - [Help 1]


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (COCOON3-104) org.apache.cocoon.archetype-webapp creating a new seed fails due to missing logback conf

2012-09-13 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13455060#comment-13455060
 ] 

Thorsten Scherler commented on COCOON3-104:
---

Just to make sure not to blame the archetype:create for the failure I tried:

mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
-DarchetypeArtifactId=cocoon-archetype-webapp \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=mywebapp 

 org.apache.cocoon.archetype-webapp creating a new seed fails due to missing 
 logback conf
 

 Key: COCOON3-104
 URL: https://issues.apache.org/jira/browse/COCOON3-104
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-archetype-X
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler

 if you create a webapp project with the artifact like:
 thorsten@bulldozer:~/src/codebusters/c3$ mvn archetype:create \
  -DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
  -DarchetypeArtifactId=cocoon-archetype-webapp \
  -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
  -DgroupId=com.mycompany \
  -DartifactId=mywebapp 
 Maven is going to complain about:
 [INFO] Using following parameters for creating project from Old (1.x) 
 Archetype: cocoon-archetype-webapp:3.0.0-beta-1-SNAPSHOT
 [INFO] 
 
 [INFO] Parameter: groupId, Value: com.mycompany
 [INFO] Parameter: packageName, Value: com.mycompany
 [INFO] Parameter: package, Value: com.mycompany
 [INFO] Parameter: artifactId, Value: mywebapp
 [INFO] Parameter: basedir, Value: /home/thorsten/src/codebusters/c3
 [INFO] Parameter: version, Value: 1.0-SNAPSHOT
 [ERROR] ResourceManager : unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' in any 
 resource loader.
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 2.264s
 [INFO] Finished at: Thu Sep 13 19:30:50 CEST 2012
 [INFO] Final Memory: 8M/239M
 [INFO] 
 
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on 
 project standalone-pom: Error creating from archetype: Error merging velocity 
 templates: Unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' - [Help 1]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (COCOON3-104) org.apache.cocoon.archetype-webapp creating a new seed fails due to missing logback conf

2012-09-13 Thread Thorsten Scherler (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13455060#comment-13455060
 ] 

Thorsten Scherler edited comment on COCOON3-104 at 9/14/12 4:52 AM:


Just to make sure not to blame the archetype:create for the failure I tried:

mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
-DarchetypeArtifactId=cocoon-archetype-webapp \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=mywebapp 

with the same result.

  was (Author: thorsten):
Just to make sure not to blame the archetype:create for the failure I tried:

mvn archetype:generate \
-DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
-DarchetypeArtifactId=cocoon-archetype-webapp \
-DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
-DgroupId=com.mycompany \
-DartifactId=mywebapp 
  
 org.apache.cocoon.archetype-webapp creating a new seed fails due to missing 
 logback conf
 

 Key: COCOON3-104
 URL: https://issues.apache.org/jira/browse/COCOON3-104
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-archetype-X
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler

 if you create a webapp project with the artifact like:
 thorsten@bulldozer:~/src/codebusters/c3$ mvn archetype:create \
  -DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
  -DarchetypeArtifactId=cocoon-archetype-webapp \
  -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
  -DgroupId=com.mycompany \
  -DartifactId=mywebapp 
 Maven is going to complain about:
 [INFO] Using following parameters for creating project from Old (1.x) 
 Archetype: cocoon-archetype-webapp:3.0.0-beta-1-SNAPSHOT
 [INFO] 
 
 [INFO] Parameter: groupId, Value: com.mycompany
 [INFO] Parameter: packageName, Value: com.mycompany
 [INFO] Parameter: package, Value: com.mycompany
 [INFO] Parameter: artifactId, Value: mywebapp
 [INFO] Parameter: basedir, Value: /home/thorsten/src/codebusters/c3
 [INFO] Parameter: version, Value: 1.0-SNAPSHOT
 [ERROR] ResourceManager : unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' in any 
 resource loader.
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 2.264s
 [INFO] Finished at: Thu Sep 13 19:30:50 CEST 2012
 [INFO] Final Memory: 8M/239M
 [INFO] 
 
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on 
 project standalone-pom: Error creating from archetype: Error merging velocity 
 templates: Unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' - [Help 1]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON3-104) org.apache.cocoon.archetype-webapp creating a new seed fails due to missing logback conf

2012-09-13 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-104.
-

   Resolution: Fixed
Fix Version/s: 3.0.0-beta-1

Seems to be an old snapshot that I had on my box.

Doing a clean install of the architype fixed that for me.

Javier tried on his machine and it as well working so closing the issue and 
sorry for the noise.

 org.apache.cocoon.archetype-webapp creating a new seed fails due to missing 
 logback conf
 

 Key: COCOON3-104
 URL: https://issues.apache.org/jira/browse/COCOON3-104
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-archetype-X
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
 Fix For: 3.0.0-beta-1


 if you create a webapp project with the artifact like:
 thorsten@bulldozer:~/src/codebusters/c3$ mvn archetype:create \
  -DarchetypeGroupId=org.apache.cocoon.archetype-webapp \
  -DarchetypeArtifactId=cocoon-archetype-webapp \
  -DarchetypeVersion=3.0.0-beta-1-SNAPSHOT \
  -DgroupId=com.mycompany \
  -DartifactId=mywebapp 
 Maven is going to complain about:
 [INFO] Using following parameters for creating project from Old (1.x) 
 Archetype: cocoon-archetype-webapp:3.0.0-beta-1-SNAPSHOT
 [INFO] 
 
 [INFO] Parameter: groupId, Value: com.mycompany
 [INFO] Parameter: packageName, Value: com.mycompany
 [INFO] Parameter: package, Value: com.mycompany
 [INFO] Parameter: artifactId, Value: mywebapp
 [INFO] Parameter: basedir, Value: /home/thorsten/src/codebusters/c3
 [INFO] Parameter: version, Value: 1.0-SNAPSHOT
 [ERROR] ResourceManager : unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' in any 
 resource loader.
 [INFO] 
 
 [INFO] BUILD FAILURE
 [INFO] 
 
 [INFO] Total time: 2.264s
 [INFO] Finished at: Thu Sep 13 19:30:50 CEST 2012
 [INFO] Final Memory: 8M/239M
 [INFO] 
 
 [ERROR] Failed to execute goal 
 org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on 
 project standalone-pom: Error creating from archetype: Error merging velocity 
 templates: Unable to find resource 
 'archetype-resources/src/main/webapp/WEB-INF/classes/logback.xml' - [Help 1]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (COCOON3-105) webapp fails if on the same servlet container is a c2.2.1 or other c3 webapp running

2012-09-13 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-105:
-

 Summary: webapp fails if on the same servlet container is a c2.2.1 
or other c3 webapp running 
 Key: COCOON3-105
 URL: https://issues.apache.org/jira/browse/COCOON3-105
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-webapp
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Blocker


I noticed that you cannot run 2 c3 based war in a tomcat.

To reproduce:

- seed parent via archetype
- seed block in parent via archetype
- seed block2 in parent via archetype
- seed webapp in parent via archetype
- seed webapp2 in parent via archetype

where webapp depends on block one and webapp2 depends on block2.

My sample was:
[INFO] Reactor Summary:
[INFO] 
[INFO] myparent .. SUCCESS [1.163s]
[INFO] myblock ... SUCCESS [3.611s]
[INFO] mywebapp .. SUCCESS [1.924s]
[INFO] myblock2 .. SUCCESS [1.498s]
[INFO] mywebapp2 . SUCCESS [1.230s]
[INFO] 

Now take a tomcat (I used 6) and first deploy the mywebapp. You can copy it 
before you start to webapp or if you have it enable deploy it on a running 
instance. You should see the welcome page under something like 
http://localhost:8080/mywebapp-1.0-SNAPSHOT/

side note: http://localhost:8080/mywebapp-1.0-SNAPSHOT will throw a 
StringIndexOutOfBoundsException but that is another ticket I guess.

Now if you deploy the second webapp on a running instance it will deploy 
without problem but requesting 
http://localhost:8080/mywebapp2-1.0-SNAPSHOT/
will return a blank page and in 
/.../tomcat/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/cocoon.log
you find:

2012-09-13 22:12:46,056 ERROR http-8080-1 
org.apache.cocoon.servlet.XMLSitemapServlet - Can't initialize the 
RequestProcessor correctly.
org.apache.cocoon.sitemap.SitemapBuilder$SitemapBuilderException: Can't build 
sitemap from blockcontext:/myblock2/sitemap.xmap
at 
org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:70) 
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.initializeSitemap(RequestProcessor.java:203)
 ~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
...
Caused by: java.lang.RuntimeException: There is no block 'myblock2' deployed. 
The available blocks are 
{myblock=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp-1.0-SNAPSHOT/blocks/myblock/}.
at 
org.apache.cocoon.blockdeployment.BlockContextURLConnection.getConnection(BlockContextURLConnection.java:76)
 ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
at 
org.apache.cocoon.blockdeployment.BlockContextURLConnection.getInputStream(BlockContextURLConnection.java:56)
 ~[cocoon-block-deployment-1.2.1.jar:1.2.1]
at java.net.URL.openStream(URL.java:1010) ~[na:1.6.0_30]
at 
org.apache.cocoon.sitemap.SitemapBuilder.build(SitemapBuilder.java:65) 
~[cocoon-sitemap-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
... 46 common frames omitted

As you see the blockcontext from the 2nd app is the one from the first EVEN if 
they are deployed as 2 different webapps!

Now stop the tomcat and start again. 

Depending which app you request on a fresh stared tomcat that one will work the 
other will present a blank page and the log will say something like:

Caused by: java.lang.RuntimeException: There is no block 'myblock' deployed. 
The available blocks are 
{myblock2=file:/home/thorsten/src/apache/apache-tomcat-6.0.20/work/Catalina/localhost/mywebapp2-1.0-SNAPSHOT/blocks/myblock2/}.

In this case I requested the 2nd first.

Originally I found out because we have a client that has some c3 and a c2.2.1 
app (not) running aside. So in case you create a 2.2.1 webapp from the 
archetype as described  http://cocoon.apache.org/2.2/1159_1_1.html and use it 
instead of the c3 2nd webapp you will get similar results.

If you start first with the 1st c3 and then deploy the c2.2 on the run then you 
can actually see both working ONLY if you first request the c3 and then deploy 
and then see the c2. In case you do not request the c3 prior it will not work 
once you requested the c2 (which maybe present interesting for the cause of the 
problem).

Now shutdown and start with both deployed the c2.2 always works and the c3 not. 

I see the problem for our client coming when we introduced 
listener-classorg.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener/listener-class

The main observation is that the c2 one seems to much more presistence but that 
can come the way of invocation (on-demand vs. startup). Anyway

Re: C2.2.1 block fails to start due to hidden dep to spring 3 (was Re: svn commit: r1381952)

2012-09-11 Thread Thorsten Scherler

On 09/11/2012 11:19 AM, Francesco Chicchiriccò wrote:

On 10/09/2012 20:30, Thorsten Scherler wrote:

[...]
This breaks jetty:run and I am ATM not sure why. It fails like:
...
Any ideas very welcome!


Hi Thorsten,
this is happening because the generated project is using the latest 
version of the cocoon-maven-plugin (1.0.2) which in turn is enforcing 
the latest versions of cocoon-rcl-webapp-wrapper (1.0.2) and 
cocoon-rcl-spring-reloader (1.0.2); these are in turn dependent on 
Spring 3.1.


Following the procedure reported above, I've changed (in the generated 
pom.xml):


plugin
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-maven-plugin/artifactId
version1.0.2/version
executions
  execution
idprepare/id
phasecompile/phase
goals
  goalprepare/goal
/goals
  /execution
/executions
  /plugin

into

plugin
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-maven-plugin/artifactId
version1.0.0/version
dependencies
!-- RCL --
dependency
  groupIdorg.apache.cocoon/groupId
artifactIdcocoon-rcl-spring-reloader/artifactId
  version1.0.0/version
/dependency
dependency
  groupIdorg.apache.cocoon/groupId
artifactIdcocoon-rcl-webapp-wrapper/artifactId
  version1.0.0/version
/dependency
/dependencies
executions
  execution
idprepare/id
phasecompile/phase
goals
  goalprepare/goal
/goals
  /execution
/executions
  /plugin

and now it works.

I'd suggest to make this changes to archetype resources's pom.xml.


Done and committed. Thanks for the finding.



Moreover, consider that when issuing 'mvn clean deploy' instead of 
'mvn clean install', you will also upload the SNAPSHOT artifacts to 
ASF maven repository (Nexus): since 2.2.X does not have a configured 
Jenkins instance for this (like as C3), you still need to do this 
manually when you want to publish updated SNAPSHOT artifacts.




Trying to fix that ATM but since I switch my box a while ago I never 
came to setup the deploy to ASF preconditions. I am working on it now. I 
get ATM for the deploy


[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-deploy-plugin:2.6:deploy (default-deploy) 
on project cocoon-22-archetype-block: Failed to deploy artifacts: Could 
not transfer artifact 
org.apache.cocoon:cocoon-22-archetype-block:jar:1.1.0-20120911.095051-2 
from/to apache.snapshots.https 
(https://repository.apache.org/content/repositories/snapshots): Failed 
to transfer file: 
https://repository.apache.org/content/repositories/snapshots/org/apache/cocoon/cocoon-22-archetype-block/1.1.0-SNAPSHOT/cocoon-22-archetype-block-1.1.0-20120911.095051-2.jar. 
Return code is: 401 - [Help 1]


Must be something with the credential setup.

salu2

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

http://www.codebusters.es/



c2.2.1 webapp blocklistener changes

2012-09-11 Thread Thorsten Scherler

Hi all,

I am ATM trying to upgrade a client project to use 2.2.1 but I am 
running into a problem where I see 2 solutions. I write it here so 
people that are doing an upgrade can benefit from our findings.


One big change in 2.2.1 is that the servlet connections are not forced 
to define any more in the spring config of the war since we are using 
the BlockDeploymentServletContextListener in the web.xml.


Now in the client project we have in 
src/main/webapp/WEB-INF/applicationContext.xml (which worked fine before)


bean id=es.sadesi.boja class=org.apache.cocoon.sitemap.SitemapServlet
servlet:context mount-path= context-path=/
  servlet:connections
entry key=clientBlock value-ref=es.clientBlock.service/
  /servlet:connections
/servlet:context
  /bean

This is due to the fact that the war project has its own sitemap and 
needs to listen to all other mounts. Now the above will fail complaining 
about missing protocol.


So I tried to use context-path=context:/ but then I get complains 
about the context:/ protocol is not defined. So for testing I pointed to 
the target dir of the deploy like 
context-path=file:///home/thorsten/src/clientBlock/target/clientBlock-3.0.7/.


With the last is working but it is not really a valid solution in case 
you deploy to e.g. tomcat, since the context needs to dynamically set.


A possible solution would be that I do a rewrite of the war block and 
move all sitemap stuff to a block on its own and set there the 
mount-path to /. However that solution is not my favourite since it 
means that I need to re-factor quite a lot of code.


So my question is I guess how can I configure the war servlet so its 
mounts on / and use the servlet- context?


Any ideas welcome.

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

http://www.codebusters.es/



C2.2.1 block fails to start due to hidden dep to spring 3 (was Re: svn commit: r1381952)

2012-09-10 Thread Thorsten Scherler

On 09/07/2012 11:31 AM, thors...@apache.org wrote:

Author: thorsten
Date: Fri Sep  7 09:30:59 2012
New Revision: 1381952

URL: http://svn.apache.org/viewvc?rev=1381952view=rev
Log:
COCOON-2233
Fixing and upgrading versions of artifact versions
BlockDeploymentServletContextListener to web.xml in the webapp archetype as 
required in trunk.
due to the fact the patch from Mark Lundquist is 4 years old in our issue 
tracker I did not apply it but rather re-did it.

Anyway thanks Mark Lundquist and sorry that we did not apply your patch earlier.

Modified:
...
 
cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
...

Modified: 
cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml?rev=1381952r1=1381951r2=1381952view=diff
==
--- 
cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
 (original)
+++ 
cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
 Fri Sep  7 09:30:59 2012
@@ -32,22 +32,22 @@
  dependency
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-core/artifactId
-  version2.2.0/version
+  version2.2.1-SNAPSHOT/version
  /dependency
  dependency
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-servlet-service-components/artifactId
-  version1.0.0/version
+  version1.1.0-SNAPSHOT/version
  /dependency
  dependency
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-template-impl/artifactId
-  version1.1.0/version
+  version1.2.0-SNAPSHOT/version
  /dependency
  dependency
groupIdorg.apache.cocoon/groupId
artifactIdcocoon-flowscript-impl/artifactId
-  version1.0.0/version
+  version1.1.0-SNAPSHOT/version
  /dependency
  dependency
groupIdjavax.servlet/groupId
@@ -62,7 +62,7 @@
plugin
  groupIdorg.apache.cocoon/groupId
  artifactIdcocoon-maven-plugin/artifactId
-version1.0.0-M2/version
+version1.0.2/version
  executions
execution
  idprepare/id
@@ -76,7 +76,7 @@
plugin
  groupIdorg.mortbay.jetty/groupId
  artifactIdmaven-jetty-plugin/artifactId
-version6.1.7/version
+version6.1.25/version
  configuration
connectors
  connector 
implementation=org.mortbay.jetty.nio.SelectChannelConnector
@@ -96,7 +96,7 @@
/plugin
plugin
  artifactIdmaven-jar-plugin/artifactId
-version2.1/version
+version2.4/version
  configuration
archive
  manifestEntries
@@ -107,7 +107,7 @@
/plugin
plugin
  artifactIdmaven-eclipse-plugin/artifactId
-version2.5/version
+version2.9/version
/plugin
  /plugins
/build


This breaks jetty:run and I am ATM not sure why. It fails like:

20:11:38.723 [main] ERROR o.s.web.context.ContextLoader - Context 
initialization failed

java.lang.NoClassDefFoundError: org/springframework/core/env/Environment
at java.lang.Class.getDeclaredConstructors0(Native Method) 
~[na:1.7.0_02-ea]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) 
~[na:1.7.0_02-ea]

at java.lang.Class.getConstructor0(Class.java:2714) ~[na:1.7.0_02-ea]
at java.lang.Class.getDeclaredConstructor(Class.java:2002) 
~[na:1.7.0_02-ea]
at 
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:61) 
~[spring-beans-2.5.1.jar:2.5.1]
at 
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:249) 
~[spring-web-2.5.1.jar:2.5.1]
at 
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 
~[spring-web-2.5.1.jar:2.5.1]
at 
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 
[spring-web-2.5.1.jar:2.5.1]
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.invoke(ReloadingListener.java:265) 
[cocoon-rcl-webapp-wrapper-1.0.2.jar:1.0.2]
at 
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.contextInitialized(ReloadingListener.java:150) 
[cocoon-rcl-webapp-wrapper-1.0.2.jar:1.0.2]
at 
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) 
[jetty-6.1.25.jar:6.1.25


You can reproduce it as follows.

cd src/apache/cocoon2.2/
svn up
mvn clean install
mkdir tmp
mvn archetype:generate -DarchetypeGroupId=org.apache.cocoon 
-DarchetypeArtifactId=cocoon-22-archetype-block 
-DarchetypeVersion=1.1.0-SNAPSHOT -DgroupId=my.groupid -DartifactId=2233 
-DarchetypeRepository=local

cd 2233
# make sure that 

[jira] [Assigned] (COCOON-2233) Update archetypes to current trunk artifact versions

2012-09-07 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler reassigned COCOON-2233:
-

Assignee: Thorsten Scherler

 Update archetypes to current trunk artifact versions
 

 Key: COCOON-2233
 URL: https://issues.apache.org/jira/browse/COCOON-2233
 Project: Cocoon
  Issue Type: Task
  Components: - Build System: Maven
Affects Versions: 2.2-dev (Current SVN)
Reporter: Mark Lundquist
Assignee: Thorsten Scherler
 Attachments: PATCH-2233


 Patch updates artifact versions in cocoon archetypes to the current trunk 
 versions.
 * Also adds BlockDeploymentServletContextListener to web.xml in the webapp 
 archetype as required in trunk.
 * Some cosmetic cleanup as well

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON-2233) Update archetypes to current trunk artifact versions

2012-09-07 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON-2233.
-

   Resolution: Fixed
Fix Version/s: 2.2-dev (Current SVN)
 Assignee: (was: Thorsten Scherler)

Committed revision 1381952.
Thank you Mark

 Update archetypes to current trunk artifact versions
 

 Key: COCOON-2233
 URL: https://issues.apache.org/jira/browse/COCOON-2233
 Project: Cocoon
  Issue Type: Task
  Components: - Build System: Maven
Affects Versions: 2.2-dev (Current SVN)
Reporter: Mark Lundquist
 Fix For: 2.2-dev (Current SVN)

 Attachments: PATCH-2233


 Patch updates artifact versions in cocoon archetypes to the current trunk 
 versions.
 * Also adds BlockDeploymentServletContextListener to web.xml in the webapp 
 archetype as required in trunk.
 * Some cosmetic cleanup as well

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Assigned] (COCOON-2222) Add SaxParser configuration properties

2012-09-07 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler reassigned COCOON-:
-

Assignee: Thorsten Scherler

 Add SaxParser configuration properties
 --

 Key: COCOON-
 URL: https://issues.apache.org/jira/browse/COCOON-
 Project: Cocoon
  Issue Type: Improvement
  Components: * Cocoon Core
Affects Versions: 2.2, 2.2-dev (Current SVN)
Reporter: Robin Wyles
Assignee: Thorsten Scherler
 Fix For: 2.2, 2.2-dev (Current SVN)

 Attachments: sax-parser-config.patch


 Some Cocoon features do not work unless unless some non-default properties 
 are set on the SaxParser. 
 e.g CForms binding to XML documents containing namespaces requires that the 
 nsPrefixes property of the SaxParser be set to true, rather than the 
 default of false.
 Currently there is no way to configure these properties from within a block.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Closed] (COCOON-2222) Add SaxParser configuration properties

2012-09-07 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON-.
-

Resolution: Fixed
  Assignee: (was: Thorsten Scherler)

Committed revision 1381963.

 Add SaxParser configuration properties
 --

 Key: COCOON-
 URL: https://issues.apache.org/jira/browse/COCOON-
 Project: Cocoon
  Issue Type: Improvement
  Components: * Cocoon Core
Affects Versions: 2.2, 2.2-dev (Current SVN)
Reporter: Robin Wyles
 Fix For: 2.2, 2.2-dev (Current SVN)

 Attachments: sax-parser-config.patch


 Some Cocoon features do not work unless unless some non-default properties 
 are set on the SaxParser. 
 e.g CForms binding to XML documents containing namespaces requires that the 
 nsPrefixes property of the SaxParser be set to true, rather than the 
 default of false.
 Currently there is no way to configure these properties from within a block.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


release 2.2.1

2012-09-07 Thread Thorsten Scherler

Hi all,

we from codebusters.es need a release 2.2.1 for one of our client.

I applied some outstanding issue and for the 4 which are still open I am 
not sure since I do not have any test case to test and some are more 
wishes (like release). ;)


Is there any guideline I should follow to push out the release?

Naturally 2.1.x and 3 should as well be released ASAP, where I see the 
2.1 less complicated since it is a maintenance release. However we lost 
a bit sight of doing an official c3 release and get a stable version out 
there.


salu2

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

http://www.codebusters.es/



[jira] [Updated] (COCOON-2259) Memory leak in PoolableProxyHandler

2012-08-06 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler updated COCOON-2259:
--

Assignee: Thorsten Scherler  (was: Jasha Joachimsthal)

 Memory leak in PoolableProxyHandler
 ---

 Key: COCOON-2259
 URL: https://issues.apache.org/jira/browse/COCOON-2259
 Project: Cocoon
  Issue Type: Bug
  Components: * Cocoon Core
Affects Versions: 2.2, 2.2-dev (Current SVN)
Reporter: Alexander Daniel
Assignee: Thorsten Scherler
 Fix For: 2.2-dev (Current SVN)

 Attachments: patchForIssue2259.txt


 I reproduced the problem with following pipeline and by adding log output to 
 PoolableProxyHandler [1]
 map:pipeline id=cocoonTest type=noncaching
   map:match pattern=cocoonProtocol
   map:generate src=cocoon://sub/
   map:serialize type=xhtml/
   /map:match
   map:match pattern=sub
   map:generate src=welcome/welcome.xml/
   map:transform src=welcome/welcome.xslt/
   map:serialize type=xhtml/
   /map:match
 /map:pipeline
 Changing the line 
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.handler.hashCode();
 to
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.hashCode();
 fixes the memory leak.
 Why? The PoolableFactoryBean [2] handler is a singleton for every pipeline 
 component, i.e. one instance for noncaching pipeline, one instance for xalan 
 transformer, ... Therefore the attributeName is the same for every component 
 of the same type but Spring requires an unique value for the destruction 
 callback handler.
 In the example sitemap above two noncaching pipeline instances are needed for 
 processing the request. Both call registerDestructionCallback with the same 
 attributeName. Because the attributeName is the same the callback is only 
 called once and the other component remains in ThreadLocal.
 [1] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java
 [2] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableFactoryBean.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Reopened] (COCOON-2259) Memory leak in PoolableProxyHandler

2012-08-06 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler reopened COCOON-2259:
---


We are researching a memoryLeak in a client application and found that this 
patch is not enough. As reported by  miguel valencia and Mercedes Duarte 
Madiedo the use of 
this.componentHolder.set(null);
leads to a memory leak.

Our research lead us to 
http://dspace.2283337.n4.nabble.com/ThreadLocals-and-OutOfMemory-td4642935.html
http://www.0xcafefeed.com/2004/06/of-non-static-threadlocals-and-memory/

Since cocoon2.2 is 1.5 compatible using the remove() method is getting rid of 
the memory leak.

 Memory leak in PoolableProxyHandler
 ---

 Key: COCOON-2259
 URL: https://issues.apache.org/jira/browse/COCOON-2259
 Project: Cocoon
  Issue Type: Bug
  Components: * Cocoon Core
Affects Versions: 2.2, 2.2-dev (Current SVN)
Reporter: Alexander Daniel
Assignee: Thorsten Scherler
 Fix For: 2.2-dev (Current SVN)

 Attachments: patchForIssue2259.txt


 I reproduced the problem with following pipeline and by adding log output to 
 PoolableProxyHandler [1]
 map:pipeline id=cocoonTest type=noncaching
   map:match pattern=cocoonProtocol
   map:generate src=cocoon://sub/
   map:serialize type=xhtml/
   /map:match
   map:match pattern=sub
   map:generate src=welcome/welcome.xml/
   map:transform src=welcome/welcome.xslt/
   map:serialize type=xhtml/
   /map:match
 /map:pipeline
 Changing the line 
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.handler.hashCode();
 to
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.hashCode();
 fixes the memory leak.
 Why? The PoolableFactoryBean [2] handler is a singleton for every pipeline 
 component, i.e. one instance for noncaching pipeline, one instance for xalan 
 transformer, ... Therefore the attributeName is the same for every component 
 of the same type but Spring requires an unique value for the destruction 
 callback handler.
 In the example sitemap above two noncaching pipeline instances are needed for 
 processing the request. Both call registerDestructionCallback with the same 
 attributeName. Because the attributeName is the same the callback is only 
 called once and the other component remains in ThreadLocal.
 [1] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java
 [2] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableFactoryBean.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Closed] (COCOON-2259) Memory leak in PoolableProxyHandler

2012-08-06 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON-2259.
-

Resolution: Fixed

Committed revision 1369782.

 Memory leak in PoolableProxyHandler
 ---

 Key: COCOON-2259
 URL: https://issues.apache.org/jira/browse/COCOON-2259
 Project: Cocoon
  Issue Type: Bug
  Components: * Cocoon Core
Affects Versions: 2.2, 2.2-dev (Current SVN)
Reporter: Alexander Daniel
Assignee: Thorsten Scherler
 Fix For: 2.2-dev (Current SVN)

 Attachments: patchForIssue2259.txt


 I reproduced the problem with following pipeline and by adding log output to 
 PoolableProxyHandler [1]
 map:pipeline id=cocoonTest type=noncaching
   map:match pattern=cocoonProtocol
   map:generate src=cocoon://sub/
   map:serialize type=xhtml/
   /map:match
   map:match pattern=sub
   map:generate src=welcome/welcome.xml/
   map:transform src=welcome/welcome.xslt/
   map:serialize type=xhtml/
   /map:match
 /map:pipeline
 Changing the line 
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.handler.hashCode();
 to
  this.attributeName = PoolableProxyHandler.class.getName() + '/' + 
 this.hashCode();
 fixes the memory leak.
 Why? The PoolableFactoryBean [2] handler is a singleton for every pipeline 
 component, i.e. one instance for noncaching pipeline, one instance for xalan 
 transformer, ... Therefore the attributeName is the same for every component 
 of the same type but Spring requires an unique value for the destruction 
 callback handler.
 In the example sitemap above two noncaching pipeline instances are needed for 
 processing the request. Both call registerDestructionCallback with the same 
 attributeName. Because the attributeName is the same the callback is only 
 called once and the other component remains in ThreadLocal.
 [1] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableProxyHandler.java
 [2] 
 http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/core/container/spring/avalon/PoolableFactoryBean.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[Summary] [VOTE] Javier Puerto as cocoon committer

2012-06-05 Thread Thorsten Scherler

On 05/28/2012 10:26 AM, Thorsten Scherler wrote:

Hello all,

I propose Javier Puerto as a new Cocoon committer and PMC member.



I counted only positive (3 binding) votes.

Welcome Javier as new Cocoon committer and PMC member.

Being a committer enables easier contribution to the project since there 
is no need to go via the patch submission process. This should enable 
better productivity.
Being a PMC member enables assistance with the management and to guide 
the direction of the project.


Since Javier is already an ASF committer we will now ask for the project 
karma for him.


salu2

--
Thorsten Scherlerthorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



[jira] [Reopened] (COCOON3-30) The current implementation of the ParameterCacheKey actually breaks the caching

2012-06-01 Thread Thorsten Scherler (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler reopened COCOON3-30:
--

  Assignee: (was: Steven Dolg)

The problem with the current implementation is that the ResponseHeaderCollector 
is collecting the lastModified if the etag is not set.

 The current implementation of the ParameterCacheKey actually breaks the 
 caching
 ---

 Key: COCOON3-30
 URL: https://issues.apache.org/jira/browse/COCOON3-30
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-pipeline
Affects Versions: 3.0.0-alpha-1
Reporter: Steven Dolg
Priority: Critical
 Fix For: 3.0.0-alpha-2

 Attachments: parametercachekey.patch


 The equals() and hashcode() implementations of the ParameterCacheKey do *not* 
 take the actual parameters into account.
 This makes it possible that different pipeline setups have the same cache key 
 and overwrite their cached results.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[VOTE] Javier Puerto as cocoon committer

2012-05-28 Thread Thorsten Scherler

Hello all,

I propose Javier Puerto as a new Cocoon committer and PMC member.

I am working with Javier since over 5 years now in different teams for 
different clients. Our projects include all version of cocoon and he 
contributed many qualified patches over the years.


He is an ASF committer in Apache Droids and I think he would make a 
great addition to our team. He contributes now on a regular base and 
lately as well started to dig into many issues that are critical for the 
c3 release.


That shows that his interest in Cocoon is longer-term.

This vote ends one week from today, i.e. midnight UTC on Sunday 2012-06-04

Please cast your votes.

--
Thorsten Scherlerthorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



Re: [VOTE] Javier Puerto as cocoon committer

2012-05-28 Thread Thorsten Scherler

On 05/28/2012 10:26 AM, Thorsten Scherler wrote:

Hello all,

I propose Javier Puerto as a new Cocoon committer and PMC member.
...

Please cast your votes.


+1

salu2

--
Thorsten Scherlerthorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



Re: [jira] [Commented] (COCOON3-101) Keep archetype synced

2012-05-24 Thread Thorsten Scherler

On 05/24/2012 09:29 AM, Hudson (JIRA) wrote:

 [ 
https://issues.apache.org/jira/browse/COCOON3-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13282254#comment-13282254
 ]

Hudson commented on COCOON3-101:


Integrated in Cocoon-trunk #180 (See 
[https://builds.apache.org/job/Cocoon-trunk/180/])
 [COCOON3-101] Fixing license headers (causing rat to make the build fail) 
(Revision 1342155)

  Result = SUCCESS
ilgrosso : http://svn.apache.org/viewvc/?view=revrev=1342155
Files :
* /cocoon/cocoon3/trunk/cocoon-archetype-block/xsl/properties-to-pom.xsl



DOH!

Thanks very much.

salu2

--
Thorsten Scherlerthorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



[jira] [Created] (COCOON3-101) Keep archetype synced

2012-05-23 Thread Thorsten Scherler (JIRA)
Thorsten Scherler created COCOON3-101:
-

 Summary: Keep archetype synced
 Key: COCOON3-101
 URL: https://issues.apache.org/jira/browse/COCOON3-101
 Project: Cocoon 3
  Issue Type: New Feature
  Components: cocoon-archetype-X
Reporter: Thorsten Scherler


http://cocoon.markmail.org/thread/f6hruvbn7h7orllp

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Re: Keep archetype synced

2012-05-23 Thread Thorsten Scherler

On 05/22/2012 10:26 PM, Robby Pelssers wrote:

I find the documentation a bit scarce but at least it supports xslt2.0.  If you 
come to think of it, Cocoon would be a super maven plugin supporting zipping, 
transforming, file writing, ...   :-)


revision 1341870 I started with setup of the basic env that I was 
thinking about. It is still not 100% as I want and further ATM only in 
the block one.


salu2


Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Tuesday, May 22, 2012 5:22 PM
To: dev@cocoon.apache.org
Subject: RE: Keep archetype synced

Was also thinking about using some kind of xsl transform to generate the 
archetype pom.  I will take a look this evening how xml-maven-plugin works.

Robby

-Original Message-
From: Thorsten Scherler [mailto:scher...@gmail.com]
Sent: Tuesday, May 22, 2012 5:02 PM
To: dev@cocoon.apache.org
Subject: Keep archetype synced

Hi all,

as mentioned in another thread we need to find a way to manage the deps
of the archetype in a less time consuming manner. Somehow we need to get
the parents versions in the deploy of the archetype.

We may want to look into doing some magic with

groupIdorg.codehaus.mojo/groupId
artifactIdxml-maven-plugin/artifactId

We used it in sobu to generate the i18n resource files based on xml, so
we could use a archetype base.xml + xsl trans = final pom.xml

This way we only need to keep in sync which deps we need the version
would be taken from the parent.pom.xml.

wdyt?




--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: svn commit: r1340124 - in /cocoon/trunk/site/cocoon-main-site/src/site: site.xml xdoc/live_sites_3.0.xml

2012-05-22 Thread Thorsten Scherler

Thanks for taking care!

salu2

On 05/18/2012 05:16 PM, ilgro...@apache.org wrote:

Author: ilgrosso
Date: Fri May 18 15:16:24 2012
New Revision: 1340124

URL: http://svn.apache.org/viewvc?rev=1340124view=rev
Log:
Adding live sites section for 3.0

Added:
 cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml   
(with props)
Modified:
 cocoon/trunk/site/cocoon-main-site/src/site/site.xml

Modified: cocoon/trunk/site/cocoon-main-site/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/cocoon/trunk/site/cocoon-main-site/src/site/site.xml?rev=1340124r1=1340123r2=1340124view=diff
==
--- cocoon/trunk/site/cocoon-main-site/src/site/site.xml (original)
+++ cocoon/trunk/site/cocoon-main-site/src/site/site.xml Fri May 18 15:16:24 
2012
@@ -36,6 +36,7 @@
item name=Professional Services href=./1271_1_1.html/
item name=Who uses Cocoon? href=./1365_1_1.html collapse=true
  item name=Products href=./1365_1_1.html/
+item name=Live Sites - 3.0 href=./live_sites_3.0.html/
  item name=Live Sites - 2.2 href=./706_1_1.html/
  item name=Live Sites - 2.1.8 href=./705_1_1.html/
  item name=Live Sites - 2.1.7 href=./704_1_1.html/

Added: cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml
URL: 
http://svn.apache.org/viewvc/cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml?rev=1340124view=auto
==
--- cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml (added)
+++ cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml Fri May 
18 15:16:24 2012
@@ -0,0 +1,42 @@
+?xml version=1.0 encoding=UTF-8?
+!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  License); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+--
+document xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+  xmlns=http://maven.apache.org/XDOC/2.0;
+  xsi:schemaLocation=http://maven.apache.org/XDOC/2.0 
http://maven.apache.org/xsd/xdoc-2.0.xsd;
+properties
+titleCocoon Main Site - Live Sites - 3.0/title
+author email=cocoon-d...@apache.orgApache Cocoon Documentation 
Team/author
+/properties
+body
+div id=contentBody
+div id=bodyText
+h1 class=docTitleLive Sites - 3.0/h1
+pThis is a list of live sites proudly powered by Apache Cocoon./p
+h1Cocoon 3.0/h1
+ul
+lia href=https://www.sobu.ch/;sobu/a  - Online shopping/li
+lia href=http://www.tirasa.net;Tirasa/a  - Company website/li
+lia href=http://syncope.tirasa.net;Apache Syncope Tirasa Support/a  - 
value add support and professional
+  services fora href=http://incubator.apache.org/syncope/;Apache 
Syncope/a/li
+/ul
+/div
+/div
+/body
+/document
\ No newline at end of file

Propchange: cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml
--
 svn:eol-style = native

Propchange: cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml
--
 svn:keywords = Date Revision Author HeadURL Id

Propchange: cocoon/trunk/site/cocoon-main-site/src/site/xdoc/live_sites_3.0.xml
--
 svn:mime-type = text/xml





--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Keep archetype synced

2012-05-22 Thread Thorsten Scherler

Hi all,

as mentioned in another thread we need to find a way to manage the deps 
of the archetype in a less time consuming manner. Somehow we need to get 
the parents versions in the deploy of the archetype.


We may want to look into doing some magic with

groupIdorg.codehaus.mojo/groupId
artifactIdxml-maven-plugin/artifactId

We used it in sobu to generate the i18n resource files based on xml, so 
we could use a archetype base.xml + xsl trans = final pom.xml


This way we only need to keep in sync which deps we need the version 
would be taken from the parent.pom.xml.


wdyt?

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



c3 caching

2012-05-02 Thread Thorsten Scherler

Hi all,

I am trying to implement caching in our app. Since most of the 
components of c3 are not cache-able yet we are trying to use expires. 
However to be forced to set a expires-cache-key is a complete show 
stopper, since it forces us to nearly put each match in a pipeline tag.


Further wildcard matches are not possible to cache this way since the 
expires-cache-key needs to contain the wildcard to be unique, 
otherwise you will get the first cached doc.


Any thoughts on it?

I am hacking CachingPipeline ATM to try to omit expires-cache-key and 
generate it dynamically if not set.


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: c3 caching

2012-05-02 Thread Thorsten Scherler

On 05/02/2012 12:45 PM, Thorsten Scherler wrote:

Hi all,

I am trying to implement caching in our app. Since most of the 
components of c3 are not cache-able yet we are trying to use 
expires. However to be forced to set a expires-cache-key is a 
complete show stopper, since it forces us to nearly put each match in 
a pipeline tag.


Further wildcard matches are not possible to cache this way since the 
expires-cache-key needs to contain the wildcard to be unique, 
otherwise you will get the first cached doc.


Any thoughts on it?


I mean

map:pipeline expires=2 expires-cache-key=some-key
map:match pattern=expires/caching-pipeline/on
map:generate type=timestamp-noncaching /
map:serialize type=xml /
/map:match
/map:pipeline

is fine but if I need

map:pipeline expires=200 expires-cache-key=myKey
map:match pattern=expires/**
map:generate src={map:1} /
map:serialize type=xml /
/map:match
/map:pipeline

Then expires/xxx will return the same as expires/666 in case the latest 
come in the expire range. What is the c3 way to configure caching?


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: Spam on Cocoon wiki - Fwd: [Cocoon Wiki] Trivial Update of FrontPage by wikimouse

2012-04-23 Thread Thorsten Scherler

On 04/23/2012 08:32 AM, Francesco Chicchiriccò wrote:

Hi all,
I've received this notification e-mail: seems definitely like spam on 
our wiki (like as it recently happened to Incubator wiki): for the 
moment I've just restored the previous version, but we should take 
some other action.


Should we just ban wikimouse? Who has enough karma to do so?


I think contact infra, same user has done it in apache lenya wiki front 
page.


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



[jira] [Commented] (COCOON3-98) RegexpLinkRewriterTransformer doesn't guarantees rules order

2012-04-12 Thread Thorsten Scherler (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13252993#comment-13252993
 ] 

Thorsten Scherler commented on COCOON3-98:
--

I understand the underlying issue, so I wonder if a linkedList would get rid of 
the position. Otherwise looks nice.



 RegexpLinkRewriterTransformer doesn't guarantees rules order
 

 Key: COCOON3-98
 URL: https://issues.apache.org/jira/browse/COCOON3-98
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-sax
Affects Versions: 3.0.0-beta-1
Reporter: Javier Puerto
 Attachments: LinkRewriterTransformer-COCOON-98.diff


 RegexpLinkRewriterTransformer apply all the defined rules iterating over a 
 Set. I think that makes sense to implement some kind of priority because you 
 may have rules that depends on other rules.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Re: svn commit: r1305128 - /cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java

2012-04-03 Thread Thorsten Scherler

On 03/25/2012 10:58 PM, andr...@apache.org wrote:

Author: andreas
Date: Sun Mar 25 20:58:50 2012
New Revision: 1305128

URL: http://svn.apache.org/viewvc?rev=1305128view=rev
Log:
Add parameters parse-xml and parse-namespace to the I18nTransformer. Allows to 
include XML elements in I18n messages.

Modified:
 
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java

Modified: 
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java
URL: 
http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java?rev=1305128r1=1305127r2=1305128view=diff
==
--- 
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java
 (original)
+++ 
cocoon/cocoon3/trunk/cocoon-sax/src/main/java/org/apache/cocoon/sax/component/I18nTransformer.java
 Sun Mar 25 20:58:50 2012
@@ -33,9 +33,9 @@ import java.util.Map;
  import java.util.MissingResourceException;
  import java.util.PropertyResourceBundle;
  import java.util.ResourceBundle;
+import java.util.ResourceBundle.Control;
  import java.util.Set;
  import java.util.StringTokenizer;
-import java.util.ResourceBundle.Control;

  import org.apache.cocoon.pipeline.SetupException;
  import org.apache.cocoon.pipeline.caching.CacheKey;
@@ -44,6 +44,7 @@ import org.apache.cocoon.pipeline.compon
  import org.apache.cocoon.sax.AbstractSAXTransformer;
  import org.apache.cocoon.sax.util.VariableExpressionTokenizer;
  import org.apache.cocoon.sax.util.VariableExpressionTokenizer.TokenReceiver;
+import org.apache.cocoon.sax.util.XMLUtils;
  import org.apache.cocoon.xml.sax.ParamSAXBuffer;
  import org.apache.cocoon.xml.sax.SAXBuffer;
  import org.slf4j.Logger;
@@ -577,6 +578,16 @@ public class I18nTransformer extends Abs
  public static final String DEFAULT_ENCODING = ISO-8859-1;

  /**
+ * If XML inside i18n messages shall be parsed.
+ */
+public static final String PARAM_PARSE_XML = parse-xml;
+
+/**
+ * The default namespace for XML elements inside messages. Defaults to 
http://www.w3.org/1999/xhtml.
+ */
+public static final String PARAM_PARSE_NAMESPACE = parse-namespace;
+
+/**
   * States of the transformer.
   */
  private enum TransformerState {
@@ -717,6 +728,12 @@ public class I18nTransformer extends Abs

  // Date and number elements and params formatting attributes with values.
  private MapString, String  formattingParams;
+
+// parse XML inside messages?
+private boolean parseXml;
+
+// default namespace for XML inside messages
+private String parseNamespace;

  /**
   * Empty constructor, for usage with sitemap.
@@ -806,6 +823,16 @@ public class I18nTransformer extends Abs

  final String encoding = (String) 
(parameters.containsKey(PARAM_ENCODING)
  ? parameters.get(PARAM_ENCODING) : DEFAULT_ENCODING);
+
+this.parseXml = parameters.containsKey(PARAM_PARSE_XML)
+? Boolean.parseBoolean((String) 
parameters.get(PARAM_PARSE_XML))
+: false;
+
+if (this.parseXml) {
+this.parseNamespace = parameters.containsKey(PARAM_PARSE_NAMESPACE)
+? (String) parameters.get(PARAM_PARSE_NAMESPACE)
+: http://www.w3.org/1999/xhtml;;
+}



Hi Andi,

is there a reason why you did not exposed
- setParseXml(...)
- setParseNamespace(...)

I said it since now it not possible to use the parseXml without using 
the setup. This however is highly problematic since the first line is

if (parameters == null || !parameters.containsKey(PARAM_BUNDLE)) {
return;
}

Meaning if I do not pass the bundle the setup will simply stop however 
the parseXml is independent from the bundle and the rest of the setup.


So I would like to expose the setter and further move the 
parameters.containsKey(PARAM_BUNDLE) AFTER the parseXml routine in setup.


If you do not object I will commit it now.

salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



[jira] [Commented] (COCOON3-95) Sitemap file not validated against schema

2012-04-03 Thread Thorsten Scherler (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/COCOON3-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13245471#comment-13245471
 ] 

Thorsten Scherler commented on COCOON3-95:
--

Committed revision 1309027. cocoon3-95.txt

 Sitemap file not validated against schema
 -

 Key: COCOON3-95
 URL: https://issues.apache.org/jira/browse/COCOON3-95
 Project: Cocoon 3
  Issue Type: Bug
  Components: cocoon-general
Affects Versions: 3.0.0-beta-1
Reporter: Javier Puerto
Assignee: Francesco Chicchiriccò
 Fix For: 3.0.0-beta-1

 Attachments: SitemapBuilder-COCOON-95.diff, cocoon3-95.txt, 
 sitemap-schema.diff, sitemap-validation.tar.gz


 http://cocoon.markmail.org/thread/cq6nrzy5xladcuys
 Summary: Lars Huttar found that his sitemap declaration was not working as 
 expected. Some matchers worked an others not. Finally the problem was a 
 matcher tag not inside a pipeline tag.
 Attached is a block to reproduce the problem, I just review the 
 SitemapBuilder class and there's not validation at all against a schema. So 
 if the sitemap.xmap file is a XML well formed, C3 will not throw any error 
 about. The ugly issue is that C3 is returning a HTTP status code of 200 
 instead of a code 500 and also the exception in the log is not very helpful, 
 NullPointerException.
 I think that we should validate the sitemap file or at least response with 
 the right HTTP status code and better error information in this case. We can 
 do something like we have already for the SchemaProcessorTransformer, using 
 the caching to avoid unnecessary processing. The schema file path is 
 trunk/cocoon-sitemap/src/main/resources/cocoon-sitemap-1.0.xsd.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




c3 pipelines (was Re: [jira] [Commented] (COCOON3-96) Add support for internal-only pipelines)

2012-04-03 Thread Thorsten Scherler
On Tue, 2012-04-03 at 18:18 +, Simone Tripodi (Commented) (JIRA)
wrote:
 [ 
 https://issues.apache.org/jira/browse/COCOON3-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13245561#comment-13245561
  ] 
 
 Simone Tripodi commented on COCOON3-96:
 ---
 
 Hi Grosso!
 
 well done and thanks for taking care! just a request: can we move the 
 {{isInternalOnly}} detail outside the Pipeline APIs? I mean, that is a method 
 needed in the sitemap, while Pipeline APis have to be work as a library also 
 outside Cocoon, it doesn't make a lot of sense to users - like me (blush) - 
 that are focused on the lower level library only.

I second that concern since I am hitting lately some frontiers opposed
by that sitemap focused view. IMO *.xmap in the end should be a wrapper
to configure spring registered pipes. 

Some old school configure methods had sneaked into some componentes and
I think we should clean up some methods and ways to change attributes in
general. 

For example the difference between configure() and setup() is IMO not
justifiable to maintain. Further the complete usage of java based
pipelines need to better be synced with the sitemap. I need to be able
to look up pipelines configured by the sitemap in a java only context.

However the principal difference ATM is that in xmap the hierarchy is
pipe-match-components but match is in no way part of the java pipe
api. Leading to the current situation where both are treated completely
separated.

However components such as regexpLinkRewriter and i18nTransformer should
be configured in a spring context to be reusable in a hybrid
environment. In one of our projects I had to duplicate the effort to
configure this. It is a lesser evil decisions for now but I am keen to
change it in the near future.

So bottom line IMHO c3 pipes being java or xmap should be usable vice
versa otherwise they cause double of work. 

...and if we think abstract the look up of a java pipe in xmap env would
be fire the request matching a pattern. What comes within a match are
basically a java pipe. The only thing is to integrate the input
module/language interpreter into the java pipe logic to make xmap pipes
usable as java pipe.

Having worked with all versions and supporting projects that are hybrids
of c2.x and c3 I have to admit if we can think of the traditional 2.x
sitemap as config for spring and we can lookup and (re)use the matches
in both environments than we are so much more than the leading xml
framework since 1998. Since finally our Lego(tm) web components
(generators, transformers, ...) are not bound to avalon and reusable
everywhere.

Having said that, we need to sometimes expose much more setters in our
components to break away from the xmap and vice versa to expose setup()
method to configure the component via sitemap. The parameter based
configuration  proofed to be quick and flexible to configure components
in both environments.

...maybe we even can implement map:invoke-method name=setup|... ...
for components and configure them in a more general way. ... with the
benefit in reusing the logic in different environments.

I will write a summary of java pipes in c3 after we go online with the
main project we based on c3, but that may take at least 2 months.

salu2

Thorsten Scherler thorsten.at.apache.org
codeBusters S.L. - web based systems
consulting, training and solutions
http://www.codebusters.es/



Re: [C3] Concurrency issues with ComponentProvider

2012-03-29 Thread Thorsten Scherler

On 03/29/2012 12:15 PM, Steven Dolg wrote:

Hey guys,

has there been any progress in this matter? Any new insights?


Sorry last stand was that Javier is working on a block to reproduce the 
issue outside our production env but he is ATM bombed with other tasks 
since we entered the final testing phase of the app. The last thing he 
showed me was that in the rampup phase the first request were always 
wrong, but he may be more specific on that.




We have a jira issue classified as Major Bug accusing us of 
concurrency issues - IMO the worst thing that can happen to a web 
application framework - and there's been no word for almost 2 weeks.


Due to the patch we applied it is not directly open but I share your 
point we should get to the bottom of the issue.




I'd like to see that resolved ASAP.
Anything I can do to help?


@Javier can you mockup something we have and state the steps we need to 
reproduce, so Steve may see the problem right away.


salu2



Steven


Am 17.03.2012 03:25, schrieb Thorsten Scherler:

On 03/16/2012 02:33 PM, Javier Puerto wrote:

...

Controllers in general (or your specific one) could be causing
problems. (The synchronized in the SpringComponentProvider
could even cause parts of the execution before it to be executed
sequential instead of parallel).
There's also no controller involved in Thorsten's test project,
so this would be consistent with what I saw yesterday.


We need time to isolate the problem in our webapp removing 
components till we found the problematic component. We can provide 
then a better test block and probably the fix for the problematic 
component if we can detect it.


I am ATM creating a static domain in the httpd frontend  and I 
observed that with the dojo block we reach 100 requests for the 
homepage, so I suspect that dojo maybe *the* component that can 
produce the problems.


...need to finish up now that is why I am so brief.

salu2
--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/





--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: c3: null pointer exception in ResponseHeaderCollector.isModifiedResponse

2012-03-27 Thread Thorsten Scherler

On 03/27/2012 08:47 PM, Lars Huttar wrote:

Thorsten wrote,


Hmm, did actually somebody tried c3 on win before?

I just downloaded the file on a pet project I have and it works 
without any prob on linux.


So let us do the clean routine: cd $c3_home svn up mvn clean install 
cd /c3/theParent mvn clean install cd ethnologue-17-pub/ mvn jetty:run


Does the error persists? I can remember i came in contact with 
DataStore, when I created a jms based pipe and did not enter a c3 
context, but this is not your case at all.




I don't actually have a $c3_home envt variable - maybe that was just 
shorthand? I did a svn up in c:\Program Files\Apache Software 
Foundation\c3, which is *a* place that I installed C3. I may have 
installed it in more than one place, and if so, I don't know which 
place is the relevant one. Is there any way to find out? I also did 
mvn clean install in that directory.


Then I went to theParent (which is not under the folder where I did 
svn up) and did

mvn clean install
cd ethnologue-17-pub
mvn jetty:run

Yes, the error persists. I get this in the cocoon.log:

...


Javier wrote this morning something that he was on a vm windows and 
could reproduce the problem. Need to talk to him when he comes into 
work. Further I will ask our intern to try on windows. Really seems to 
be a problem with windows. Will keep you informed.


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: c3: null pointer exception in ResponseHeaderCollector.isModifiedResponse

2012-03-26 Thread Thorsten Scherler

On 03/26/2012 04:49 PM, Francesco Chicchiriccò wrote:

On 26/03/2012 16:42, Lars Huttar wrote:

I sent this email at the start of the weekend, so it may not have been
seen much.
However the NPE is blocking progress, so I'd like to see if anyone can
help me with it.
Anybody have ideas?

Lars,
do you have any chance to share your project somewhere (github,
gitorius...) so that it would be much easier to take a look at it?


After the difficulties of the last week or two, I'm starting to wonder
if we'd be better off going back to Cocoon 2.1.11. A colleague asked
me, why take the risk and time to move to Cocoon 3, when we have
Cocoon 2.1.11 working well? I gave the standard 2.1.11 is several
years old and will be increasingly unsupported answer, but I had to
admit that the decision was not looking as good now as it seemed last
summer when C3 had a recent new alpha and even a beta candidate.

Please don't take this as criticism of the Cocoon developers ... I
have been continually impressed at the readiness of the committers to
debug problems quickly and implement fixes. However I do wonder
whether there is just too much debugging left, to reach a stable state
in time for our work. Also I am concerned that since there doesn't
seem to be a roadmap for feature freeze, there may be no point at
which bugs will settle down so that a stable release can be completed.

Cocoon 3 is alpha state, but you are working on a SNAPSHOT release of
beta-1: this means that Cocoon 3.0 does not pretend - yet - to be
officially stable.

Despite of this, I can assure that my company and at least a couple of
other companies have several production applications based on Cocoon
3.0, so my suggestion would be keep pushing ;-)


This said, I should have said much earlier something but the discussion 
about c3 belongs on the dev list until we have an official release. If 
you want to keep up with your development I strongly recommend to sync 
c3 trunk regular.


Now to the NPE, without seeing the code is hard to say something but

!-- {map:1} = generator name, {map:2} = param, {map:3} = value --
map:match pattern=generator/*/*/*/source
map:generate src=generators/{map:1}.xml /
map:serialize type=xml/
/map:match

resolves


2012-03-23 14:33:30,598 DEBUG 11202659@qtp-14536088-0 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=generator/*/*/*/source, 
testValue=generator/languages-in-country/country_id/77/source, 
result={3=77, 2=country_id, 1=languages-in-country, 
0=generator/languages-in-country/country_id/77/source}
2012-03-23 14:33:30,598 DEBUG 11202659@qtp-14536088-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
GenerateNode(src=generators/{map:1}.xml, 
type=url).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-23 14:33:30,598 DEBUG 11202659@qtp-14536088-0 
org.apache.cocoon.pipeline.AbstractPipeline - Adding component 
XMLGenerator(hashCode=29969233 
internalGenerator=URLGenerator(hashCode=19145797 
source=file:/C:/Users/HuttarL/Documents/work/c3/theParent/ethnologue-17-pub/src/main/resources/COB-INF/generators/languages-in-country.xml)) 
to pipeline [CachingPipeline(hashCode=7335482 components=[])].
2012-03-23 14:33:30,598 DEBUG 11202659@qtp-14536088-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
SerializeNode(type=xml).invoke(/generator/languages-in-country/country_id/77/source)


So goes there should be a file generators/languages-in-country.xml which 
you said exists.


What does
map:generate src=generators/languages-in-country.xml / gives you if 
you add it directly?


It is really weird since we are talking about

 public static boolean isModifiedResponse() {
return (Boolean) collectorDataStore.get(KEY_PIPELINE_EXECUTED);
}

So either collectorDataStore is null (what should not since it gets 
instanced on start) or the result of the get which points to that the 
pipeline-executed infos got lost.


I never saw this behavior before let us see what the direct use test gives.

salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: c3: null pointer exception in ResponseHeaderCollector.isModifiedResponse

2012-03-26 Thread Thorsten Scherler

On 03/26/2012 07:09 PM, Lars Huttar wrote:

On 3/26/2012 11:47 AM, Thorsten Scherler wrote:

On 03/26/2012 04:49 PM, Francesco Chicchiriccò wrote:

...
Despite of this, I can assure that my company and at least a couple of
other companies have several production applications based on Cocoon
3.0, so my suggestion would be keep pushing ;-)


This said, I should have said much earlier something but the 
discussion about c3 belongs on the dev list until we have an official 
release. If you want to keep up with your development I strongly 
recommend to sync c3 trunk regular.


Ok, thanks for this tip. I will send future questions to the dev list.



...
What does
map:generate src=generators/languages-in-country.xml / gives you 
if you add it directly?


For that we get a very similar result:

2012-03-26 12:02:32,052 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servletservice.DispatcherServlet - 
DispatcherServlet: service 
servlet=org.apache.cocoon.servlet.XMLSitemapServlet@1e247e2 mountPath= 
servletPath= 
pathInfo=/generator/languages-in-country/country_id/77/source
2012-03-26 12:02:32,065 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Setting the baseURL to 
file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/./src/main/resources/COB-INF/
2012-03-26 12:02:32,149 INFO  4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Performing GET request at 
/generator/languages-in-country/country_id/77/source
2012-03-26 12:02:32,149 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - The base URL for this 
request is 
file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/./src/main/resources/COB-INF/
2012-03-26 12:02:32,169 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelinesNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,170 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelineNode(caching).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,191 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
MatchNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=test.html, 
testValue=generator/languages-in-country/country_id/77/source, 
result=null
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
MatchNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=generator/languages-in-country/country_id/77/source, 
testValue=generator/languages-in-country/country_id/77/source, 
result={0=generator/languages-in-country/country_id/77/source}
2012-03-26 12:02:32,198 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
GenerateNode(src=generators/languages-in-country.xml, 
type=url).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,210 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.pipeline.AbstractPipeline - Adding component 
XMLGenerator(hashCode=21679729 
internalGenerator=URLGenerator(hashCode=7501974 
source=file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/src/main/resources/COB-INF/generators/languages-in-country.xml)) 
to pipeline [CachingPipeline(hashCode=3632323 components=[])].
2012-03-26 12:02:32,210 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
SerializeNode(type=xml).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,320 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.pipeline.AbstractPipeline - Adding component 
XMLSerializer(hashCode=9852500) to pipeline 
[CachingPipeline(hashCode=3632323 
components=[XMLGenerator(hashCode=21679729 
internalGenerator=URLGenerator(hashCode=7501974 
source=file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/src/main/resources/COB-INF/generators/languages-in-country.xml))])].
2012-03-26 12:02:32,321 INFO  4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Sitemap execution for 
/generator/languages-in-country/country_id/77/source took 171.6865 ms.
2012-03-26 12:02:32,329 ERROR 4650852@qtp-775647-0 
org.apache.cocoon.servlet.XMLSitemapServlet - Cocoon can't process the 
request.

java.lang.NullPointerException: null
at 
org.apache.cocoon.servlet.collector.ResponseHeaderCollector.isModifiedResponse(ResponseHeaderCollector.java:176) 
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:354) 
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:92

Re: c3: null pointer exception in ResponseHeaderCollector.isModifiedResponse

2012-03-26 Thread Thorsten Scherler

On 03/27/2012 12:39 AM, Thorsten Scherler wrote:

On 03/26/2012 07:09 PM, Lars Huttar wrote:

On 3/26/2012 11:47 AM, Thorsten Scherler wrote:

On 03/26/2012 04:49 PM, Francesco Chicchiriccò wrote:

...
Despite of this, I can assure that my company and at least a couple of
other companies have several production applications based on Cocoon
3.0, so my suggestion would be keep pushing ;-)


This said, I should have said much earlier something but the 
discussion about c3 belongs on the dev list until we have an 
official release. If you want to keep up with your development I 
strongly recommend to sync c3 trunk regular.


Ok, thanks for this tip. I will send future questions to the dev list.



...
What does
map:generate src=generators/languages-in-country.xml / gives you 
if you add it directly?


For that we get a very similar result:

2012-03-26 12:02:32,052 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servletservice.DispatcherServlet - 
DispatcherServlet: service 
servlet=org.apache.cocoon.servlet.XMLSitemapServlet@1e247e2 
mountPath= servletPath= 
pathInfo=/generator/languages-in-country/country_id/77/source
2012-03-26 12:02:32,065 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Setting the baseURL to 
file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/./src/main/resources/COB-INF/
2012-03-26 12:02:32,149 INFO  4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Performing GET request 
at /generator/languages-in-country/country_id/77/source
2012-03-26 12:02:32,149 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - The base URL for this 
request is 
file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/./src/main/resources/COB-INF/
2012-03-26 12:02:32,169 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelinesNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,170 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
PipelineNode(caching).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,191 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
MatchNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=test.html, 
testValue=generator/languages-in-country/country_id/77/source, 
result=null
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
MatchNode.invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,197 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.MatchNode$MatcherContext - Matching: 
expression=generator/languages-in-country/country_id/77/source, 
testValue=generator/languages-in-country/country_id/77/source, 
result={0=generator/languages-in-country/country_id/77/source}
2012-03-26 12:02:32,198 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
GenerateNode(src=generators/languages-in-country.xml, 
type=url).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,210 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.pipeline.AbstractPipeline - Adding component 
XMLGenerator(hashCode=21679729 
internalGenerator=URLGenerator(hashCode=7501974 
source=file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/src/main/resources/COB-INF/generators/languages-in-country.xml)) 
to pipeline [CachingPipeline(hashCode=3632323 components=[])].
2012-03-26 12:02:32,210 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.sitemap.node.AbstractSitemapNode - 
SerializeNode(type=xml).invoke(/generator/languages-in-country/country_id/77/source)
2012-03-26 12:02:32,320 DEBUG 4650852@qtp-775647-0 
org.apache.cocoon.pipeline.AbstractPipeline - Adding component 
XMLSerializer(hashCode=9852500) to pipeline 
[CachingPipeline(hashCode=3632323 
components=[XMLGenerator(hashCode=21679729 
internalGenerator=URLGenerator(hashCode=7501974 
source=file:/C:/Users/HuttarL/Documents/work/c3/theParent/e-17-pub/src/main/resources/COB-INF/generators/languages-in-country.xml))])].
2012-03-26 12:02:32,321 INFO  4650852@qtp-775647-0 
org.apache.cocoon.servlet.RequestProcessor - Sitemap execution for 
/generator/languages-in-country/country_id/77/source took 171.6865 ms.
2012-03-26 12:02:32,329 ERROR 4650852@qtp-775647-0 
org.apache.cocoon.servlet.XMLSitemapServlet - Cocoon can't process 
the request.

java.lang.NullPointerException: null
at 
org.apache.cocoon.servlet.collector.ResponseHeaderCollector.isModifiedResponse(ResponseHeaderCollector.java:176) 
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT]
at 
org.apache.cocoon.servlet.RequestProcessor.sendSitemapResponse(RequestProcessor.java:354) 
~[cocoon-servlet-3.0.0-beta-1-SNAPSHOT.jar:3.0.0-beta-1-SNAPSHOT

[c3] sitemap SelectNode has no SELECT_CATEGORY, why?

2012-03-23 Thread Thorsten Scherler

Hi all,

I need the exist selector [1] in our project to use it in one general 
match. However I found out that SelectNode has no SELECT_CATEGORY so 
making it impossible to have different types of select.


Is this a design decission or is just TBD?

salu2

[1] http://cocoon.apache.org/2.1/userdocs/resourceexists-selector.html

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



[c3] Action how to configure them from the sitemap

2012-03-23 Thread Thorsten Scherler

Hi all,

I was trying to use an action instead of a selector, but now I find that 
actions are not providing setConfiguration. Meaning I cannot do


map:act type=exists src=resources/screens/{map:../2}.xml
map:parameter name=src value=resources/screens/{map:../2}.xml /
map:parameter name=isUser value={shiro:authenticated} /
/map:act

The first @src is ignored and the map:parameter approach is neither 
working since setConfiguration are not called on actions.


So now my question is how am I suppossed to pass parameters from the 
sitemap to the action?


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



[jira] [Created] (COCOON3-94) Extend Action to allow to use @src and parameter from within the sitemap

2012-03-23 Thread Thorsten Scherler (Created) (JIRA)
Extend Action to allow to use @src and parameter from within the sitemap


 Key: COCOON3-94
 URL: https://issues.apache.org/jira/browse/COCOON3-94
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Critical
 Fix For: 3.0.0-beta-1


In cocoon 2.x you can use the src attribute and further use map:parameter to 
configure an action. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Closed] (COCOON3-94) Extend Action to allow to use @src and parameter from within the sitemap

2012-03-23 Thread Thorsten Scherler (Closed) (JIRA)

 [ 
https://issues.apache.org/jira/browse/COCOON3-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thorsten Scherler closed COCOON3-94.


Resolution: Fixed

Committed revision 1304459.

 Extend Action to allow to use @src and parameter from within the sitemap
 

 Key: COCOON3-94
 URL: https://issues.apache.org/jira/browse/COCOON3-94
 Project: Cocoon 3
  Issue Type: Improvement
  Components: cocoon-sitemap
Affects Versions: 3.0.0-beta-1
Reporter: Thorsten Scherler
Priority: Critical
 Fix For: 3.0.0-beta-1


 In cocoon 2.x you can use the src attribute and further use map:parameter to 
 configure an action. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Re: [DISCUSS] online APIs doc

2012-03-20 Thread Thorsten Scherler

On 03/20/2012 08:46 AM, Simone Tripodi wrote:

Hi all guys,

after many users request - last just received on user@ - I would
suggest to deploy APIs doc on SVN to make them available online.
If no objections will be shown in the next 72h, I'll proceed on
deploying the C3 - guess I'll need help on deploying the C2.X
versions.

WDYT?



https://issues.apache.org/jira/browse/COCOON3-92

I am all for javadocs, but the above issue says all. To be meaningful 
they need content.


salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: [DISCUSS] online APIs doc

2012-03-20 Thread Thorsten Scherler

On 03/20/2012 10:47 AM, Francesco Chicchiriccò wrote:

On 20/03/2012 10:17, Thorsten Scherler wrote:

On 03/20/2012 08:46 AM, Simone Tripodi wrote:

Hi all guys,

after many users request - last just received on user@ - I would
suggest to deploy APIs doc on SVN to make them available online.
If no objections will be shown in the next 72h, I'll proceed on
deploying the C3 - guess I'll need help on deploying the C2.X
versions.

WDYT?



https://issues.apache.org/jira/browse/COCOON3-92

I am all for javadocs, but the above issue says all. To be meaningful 
they need content.


True, but this applies to C3's only; C2.1 and C2.2 are quite full of 
content.




Very true.

salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: [VOTE] release Apache Cocoon Thien Maven Skin 1.0.1

2012-03-19 Thread Thorsten Scherler

On 03/17/2012 01:47 PM, Simone Tripodi wrote:

Hi all,

last year I did some work on the Thien Skin in order to match the
brand requirements from ASF, you can see the Cocoon 3 site where logo
has the ™ character and the footer reports the needed disclaimer.
I also took advantage to optimize js/css, now included in compressed
version, the code google-code-prettify has been updated and optimized
at site generation time.

So, time to make a new release and update docs :)

Notice that I didn't change the release procedure because the skin is
still included in the old C2.X branch; moreover, a component like the
skin shoudln't require nothing more than maven artifacts, no
tarballs/zip archives.

Tag is located on

 
https://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.2/cocoon-thien-maven-site-skin/cocoon-thien-maven-site-skin-1.0.1/

Artifacts are deployed on people.apache.org

 
people.apache.org:/www/people.apache.org/builds/cocoon/org/apache/cocoon/cocoon-thien-maven-site-skin/1.0.1/

They can be browsable from HTTP:

 
http://people.apache.org/builds/cocoon/org/apache/cocoon/cocoon-thien-maven-site-skin/1.0.1/

Vote is open for the next 72h and will close on March 20th at ~12:45am.

Once (and if) vote will succeed, I will provide to deploy artifacts on
Central Repo.

Many thanks in advance for reviewing, all the best and have a nice weekend!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



+1

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



Re: [C3] Concurrency issues with ComponentProvider

2012-03-16 Thread Thorsten Scherler

On 03/16/2012 02:33 PM, Javier Puerto wrote:

...

Controllers in general (or your specific one) could be causing
problems. (The synchronized in the SpringComponentProvider could
even cause parts of the execution before it to be executed
sequential instead of parallel).
There's also no controller involved in Thorsten's test project, so
this would be consistent with what I saw yesterday.


We need time to isolate the problem in our webapp removing components 
till we found the problematic component. We can provide then a better 
test block and probably the fix for the problematic component if we 
can detect it.


I am ATM creating a static domain in the httpd frontend  and I observed 
that with the dojo block we reach 100 requests for the homepage, so I 
suspect that dojo maybe *the* component that can produce the problems.


...need to finish up now that is why I am so brief.

salu2

--
Thorsten Scherlerscherler.at.gmail.com
codeBusters S.L. - web based systems
consulting, training and solutions

http://www.codebusters.es/



  1   2   3   4   5   >