Re: Type 'serverpages' does not exist for 'map:generate'
XSP is not available in Cocooon 2.2 - see: http://marc.info/?l=xml-cocoon-usersm=120349702914226w=2 where the developers suggest you migrate your code to use java objects + flowscript + template. Alternatively, stick to Cocoon 2.1 unless you have some other critical reasons to use 2.2 On 2008/06/03 at 07:09, in message [EMAIL PROTECTED], jantje [EMAIL PROTECTED] wrote: I can't use XSP in cocoon2.2 There is almost no documentation available. Where can I find information? Thanks jantje wrote: Hi there, For cocoon 2.2, with maven, i have this pipeline in my experimental sitemap-file: map:sitemap xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd; xmlns:map=http://apache.org/cocoon/sitemap/1.0; map:flow language=javascript/ map:pipelines map:pipeline map:match pattern=myFourthPipeline map:generate type=serverpages src=fourth.xsp/ map:transform src=myXml2PdfFile.xslt type=xslt/ map:serialize type=xml/ /map:match /map:pipelines /map:sitemap On starting 'mvn jetty-run', I get this error: javax.servlet.ServletException: org.apache.avalon.framework.configuration.ConfigurationException: Type 'serverpages' does not exist for 'map:generate' Is there something missing in my sitemap? Or is there something i have to do with maven? F.i. mvn compile??? Greetings and thanks for helping! -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Type 'serverpages' does not exist for 'map:generate'
On 04.06.2008 02:25, Derek Hohls wrote: XSP is not available in Cocooon 2.2 - see: http://marc.info/?l=xml-cocoon-usersm=120349702914226w=2 where the developers suggest you migrate your code to use java objects + flowscript + template. Alternatively, stick to Cocoon 2.1 unless you have some other critical reasons to use 2.2 XSP is available, it's just that the block infrastructure has not been migrated yet to Cocoon 2.2/Maven. I don't think (but somebody might correct me here) that actual code needs to be changed. So the migration should be rather easy. Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SendMail Transformer (Cocoon 2.1.11, Windows XP)
Hello Matthew, -Original Message- From: Matthew Monkan [mailto:[EMAIL PROTECTED] Sent: dinsdag 3 juni 2008 23:29 To: users@cocoon.apache.org Subject: SendMail Transformer (Cocoon 2.1.11, Windows XP) Okay, I'm having more trouble than I probably should with mail in Cocoon. I made the smallest possible application, which was fine. I'm okay with the XML and sitemap. I just need clarification on what exactly needs to be done with the mail.jar and activation.jar files. I have the Cocoon folder on my C:\ drive and my app is in cocoon's build\webapp\ directory. (C:\cocoon\build\webapp\mail) There is a lib folder at the root directory and a lib folder in the build\webapp\WEB-INF directory. Which do I need to worry about? I don't know which version of the documentation you are looking at, but [1] mentions WEB-INF/lib And even if I get rid of the geromino jars and put in the fresh mail and activation jars, how does Cocoon know to use those? Do I need to change a path to them in some other file? The SendmailTransformer caches the host/port settings, but does not invalidate that cache. If you have used it with the wrong settings, you need to restart Cocoon after you have changed the host and port. I've tried a million things, but I always get: Could not connect to SMTP host: localhost, port: 2525 (java.net.ConnectException: Connection refused: connect) Is there an SMTP server listening on localhost:2525? If not, change the SMTP host (and probably port: 25 is default, not 2525). I realize this error is mentioned in the online documentation, but the way the documentation is worded and laid out, I feel like I am missing a step or I am missing a step that is implied I should know. Can anyone provide me step-by-step instructions that leaves no room for error? Again, I'm confused because Cocoon's root lib folder has a jars.xml file (mentioned in the documentation), but the lib folder in build\webapp\WEB-INF does not, and I thought this is what affected my application since it is in build\webapp. Which Cocoon version are you using? View this message in context: http://www.nabble.com/SendMail-Transformer-%28Cocoon-2.1.11%2C -Windows-XP%29-tp17634181p17634181.html Sent from the Cocoon - Users mailing list archive at Nabble.com. [1] http://cocoon.apache.org/2.2/blocks/mail/1.0/1099_1_1.html Regards, Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jboss 5.0.0.CR1 / Cocoon.war deployment issue - java.lang.IllegalAccessError: class javax.xml.parsers.SecuritySupport12
Many thanks for the link, Joerg. The closest I got is [1]. From that I'd guess you should avoid to deploy the mentioned classes and to the webapp's WEB-INF/lib directory. [1] http://qaix.com/java-programming/30-567-jboss-3-tomcat-4-0-3-illegalaccesserror-read.shtml unfortunately moving the jar files to server\default\lib did not resolve the issue. What am I overlooking here? Many thanks in advance. -- Regards Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [REPOST] Setting multi-value widget values for dynamically createdforms
Robin Thanks! This worked - with the modification that you only need: var values = new java.util.ArrayList(); Derek On 2008/06/03 at 03:57, in message [EMAIL PROTECTED], Robin Wyles [EMAIL PROTECTED] wrote: I'm not sure if it's the best way, but off the top of my head... var values = new Packages.com.java.util.ArrayList(); values.add(option 1); values.add(option 2); values.add(someMethodToGetAString()); values.add(someOtherMethodToGetAString()); fwidget.setValue(values.toArray()); Basically, the trick is to pass a simple array to the multi-value widget containing only the values you need to set... Cheers, Robin On 3 Jun 2008, at 14:48, Derek Hohls wrote: Robin How would you create the array programmtically ie. values array needs to be populated via data values sourced elsewhere ( and typically available in a string variable) rather than from a static list. Thanks Derek On 2008/06/03 at 03:32, in message F6853221-59B6-4F99- [EMAIL PROTECTED], Robin Wyles [EMAIL PROTECTED] wrote: Hi Derek, As far as I can remember you just need to set the multi-value widget value to a simple array, and I don't think you should initialise the array with 10 values if you are only setting 1. Something like this maybe: var values = [option1, option2]; // these are the values to pre- select fwidget.setValue(values); Cheers, Robin On 3 Jun 2008, at 08:13, Derek Hohls wrote: I am reposting in the hope that someone can find a few moments to look at this - I'm sure I am missing something simple, but cannot see what it is... On 2008/05/21 at 12:55, in message [EMAIL PROTECTED], Derek Hohls [EMAIL PROTECTED] wrote: I have a dynamically created form which I then access from flowscript var qit = newForm.getWidget().getChildren(); if (qit != null) { while ( qit.hasNext() ) { fwidget = qit.next() ; ... to get each widget. I now need to pre-select some values for all of the multi-value widgets. (Note that the widget below has a datatype of string). Approach 1 is what I *think* is correct; Approach 2 I know is wrong but it does confirm that the widget I am accessing is a MultiValueField. Any ideas as to how to make this work properly? Thanks Derek (Side note: if I omit this step, the rest of the form displays as expected, and values for other widget types are set OK.) Approach 1: var values = java.lang.reflect.Array.newInstance(java.lang.String, 10); values[0] = Option 1; fwidget.setValue(values); //NB also tried fwidget.setValues(values); Result 1: java.lang.NullPointerException at org.apache.cocoon.forms.formmodel.MultiValueField.setValues (MultiValueField.java:190) at org.apache.cocoon.forms.formmodel.MultiValueField.setValue (MultiValueField.java:180) ... Approach 2: fwidget.setValue(Option 1); Result 2: java.lang.RuntimeException: Cannot set value of field q-25--6 with an object of type java.lang.String at org.apache.cocoon.forms.formmodel.MultiValueField.setValue (MultiValueField.java:182) ... -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
REPOST: Database connection overload
Anyone have any ideas on this? On 2008/05/27 at 09:15, in message [EMAIL PROTECTED], Derek Hohls [EMAIL PROTECTED] wrote: Running Cocoon 2.1.8 It seems to be the case that, when the number of allowed database connections are exceeded (called by a getConnection in flowscript), the application will then freeze - is there any mechanism to detect and avoid this condition - and is there any means to reboot the application without restarting the whole servlet container (which affects all the other Cocoon applications which are running there)? Thanks Derek -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Derek, the only condition I am aware of which might make the application freeze is when connections are not properly closed and returned to the connection pool. Could you post the javascript code you use to obtain a connection from the DB and then close it ? Regards, Johannes Derek Hohls schrieb: Anyone have any ideas on this? On 2008/05/27 at 09:15, in message [EMAIL PROTECTED], Derek Hohls [EMAIL PROTECTED] wrote: Running Cocoon 2.1.8 It seems to be the case that, when the number of allowed database connections are exceeded (called by a getConnection in flowscript), the application will then freeze - is there any mechanism to detect and avoid this condition - and is there any means to reboot the application without restarting the whole servlet container (which affects all the other Cocoon applications which are running there)? Thanks Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sql transformer - display another site during transformer's work
Hallo, I use sql transformer. Some heavy SELECTs takes a long time (hours). Is some possibility to display another site during transformer's work and when work is finished show the result. Thanks. Pavel Navrkal -- View this message in context: http://www.nabble.com/sql-transformer---display-another-site-during-transformer%27s-work-tp17643261p17643261.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Johannes This was my thought too. I have numerous modules functions that open (and should close!) connections. On manual inspection they all seem to be OK, but possibly there is one somewhere which is not correct. Hence my need to try and prevent this; or have the system in some way report exactly when where this is happening so I can fix the offending code. Any ideas on how to do this? Thanks Derek On 2008/06/04 at 11:18, in message [EMAIL PROTECTED], Johannes Textor [EMAIL PROTECTED] wrote: Derek, the only condition I am aware of which might make the application freeze is when connections are not properly closed and returned to the connection pool. Could you post the javascript code you use to obtain a connection from the DB and then close it ? Regards, Johannes Derek Hohls schrieb: Anyone have any ideas on this? On 2008/05/27 at 09:15, in message [EMAIL PROTECTED], Derek Hohls [EMAIL PROTECTED] wrote: Running Cocoon 2.1.8 It seems to be the case that, when the number of allowed database connections are exceeded (called by a getConnection in flowscript), the application will then freeze - is there any mechanism to detect and avoid this condition - and is there any means to reboot the application without restarting the whole servlet container (which affects all the other Cocoon applications which are running there)? Thanks Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Derek Hohls schrieb: Johannes This was my thought too. I have numerous modules functions that open (and should close!) connections. On manual inspection they all seem to be OK, but possibly there is one somewhere which is not correct. Hence my need to try and prevent this; or have the system in some way report exactly when where this is happening so I can fix the offending code. Any ideas on how to do this? I am not aware of any method which would allow one to inspect the current state of the pool. Perhaps the best way would be to log any opening and closing of connections, including the name of the component which uses them, and scan the log files for connections which are not correctly closed. The problem is in the design itself (opening and closing JDBC connections in several places scattered around the application) which makes such applications a mess to debug (been through it myself). A common source for this problem is when error messages get thrown which interrupt the execution of the flow script. Unless you use something like the OpenSessionInViewFilter which gets rid of this kind of problem, in the case of an unexpected error your connections normally remain open. This means that after 10 error messages or so your pool is exhausted and you're stuck. If you are not the kind of Java guy to implement the Open Session in View Concept (which should work with JDBC connections too, not just Hibernate Sessions), I'd recommend you use the try - catch - finally idiom in *every* flowscript function which uses a JDBC connection. Regards, Johannes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sql transformer - display another site during transformer's work
Hello Pavel, -Original Message- From: navrc [mailto:[EMAIL PROTECTED] Sent: woensdag 4 juni 2008 12:03 To: users@cocoon.apache.org Subject: sql transformer - display another site during transformer's work Hallo, I use sql transformer. Some heavy SELECTs takes a long time (hours). Is some possibility to display another site during transformer's work and when work is finished show the result. What is the purpose of those heavy SELECTs? If it's for data replication, I wouldn't use Cocoon for that. If it's for live data retreival, nobody wants to wait hours for a response. View this message in context: http://www.nabble.com/sql-transformer---display-another-site-d uring-transformer%27s-work-tp17643261p17643261.html Sent from the Cocoon - Users mailing list archive at Nabble.com. Regards, Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sql transformer - display another site during transformer's work
At the and of month we make some reports in pdf, there is lots of big tables in the DB. So the selects take long time. Pavel -- View this message in context: http://www.nabble.com/sql-transformer---display-another-site-during-transformer%27s-work-tp17643261p17643824.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sql transformer - display another site during transformer's work
I agree with Jasha, that a background task would be the best solution. Another solution would be that if it takes minutes, you could try to use Ajax for generating the files in the background and displaying a processing task to the user. Jeroen -Original Message- From: Jasha Joachimsthal [mailto:[EMAIL PROTECTED] Sent: Wed 6/4/2008 12:59 PM To: users@cocoon.apache.org Subject: RE: sql transformer - display another site during transformer's work -Original Message- From: navrc [mailto:[EMAIL PROTECTED] Sent: woensdag 4 juni 2008 12:43 To: users@cocoon.apache.org Subject: RE: sql transformer - display another site during transformer's work At the and of month we make some reports in pdf, there is lots of big tables in the DB. So the selects take long time. Is the DB locked during the SELECT? Where do you store the reports or do you display them directly from the pipeline? If so, you can better make a background tak (cron job) generate the reports, write them to disk and display the reports on the site from that location on the filesystem. View this message in context: http://www.nabble.com/sql-transformer---display-another-site-d uring-transformer%27s-work-tp17643261p17643824.html Sent from the Cocoon - Users mailing list archive at Nabble.com. Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sql transformer - display another site during transformer's work
-Original Message- From: navrc [mailto:[EMAIL PROTECTED] Sent: woensdag 4 juni 2008 12:43 To: users@cocoon.apache.org Subject: RE: sql transformer - display another site during transformer's work At the and of month we make some reports in pdf, there is lots of big tables in the DB. So the selects take long time. Is the DB locked during the SELECT? Where do you store the reports or do you display them directly from the pipeline? If so, you can better make a background tak (cron job) generate the reports, write them to disk and display the reports on the site from that location on the filesystem. View this message in context: http://www.nabble.com/sql-transformer---display-another-site-d uring-transformer%27s-work-tp17643261p17643824.html Sent from the Cocoon - Users mailing list archive at Nabble.com. Jasha Joachimsthal www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Johannes Thanks for the detailed insight into issues. I had hoped to avoid patching hundreds of functions. but I guess its inevitable. Would a function like the following be able to avoid the problem I have been having: function accessDB() { try { //get connection //do stuff... //close connection //return result } catch(e) { cocoon.log.error (Unable to complete function accessDB); return null; } } (I'm not sure how this will ensure the connection is closed?) Thanks Derek On 2008/06/04 at 12:28, in message [EMAIL PROTECTED], Johannes Textor [EMAIL PROTECTED] wrote: Derek Hohls schrieb: Johannes This was my thought too. I have numerous modules functions that open (and should close!) connections. On manual inspection they all seem to be OK, but possibly there is one somewhere which is not correct. Hence my need to try and prevent this; or have the system in some way report exactly when where this is happening so I can fix the offending code. Any ideas on how to do this? I am not aware of any method which would allow one to inspect the current state of the pool. Perhaps the best way would be to log any opening and closing of connections, including the name of the component which uses them, and scan the log files for connections which are not correctly closed. The problem is in the design itself (opening and closing JDBC connections in several places scattered around the application) which makes such applications a mess to debug (been through it myself). A common source for this problem is when error messages get thrown which interrupt the execution of the flow script. Unless you use something like the OpenSessionInViewFilter which gets rid of this kind of problem, in the case of an unexpected error your connections normally remain open. This means that after 10 error messages or so your pool is exhausted and you're stuck. If you are not the kind of Java guy to implement the Open Session in View Concept (which should work with JDBC connections too, not just Hibernate Sessions), I'd recommend you use the try - catch - finally idiom in *every* flowscript function which uses a JDBC connection. Regards, Johannes -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Derek, you should use the power of the finally construct, which is also available in JS: function accessDB() { try { //get connection //do stuff... //return result } catch(e) { cocoon.log.error (Unable to complete function accessDB); return null; } finally { //close connection } } The finally block is meant to contain instructions which must *always* be executed, no matter what happens in the try and catch blocks. Regardless of that, having hundreds of different places where connections are opened and closed in flowscript seems like a bad idea. Regards, Johannes Derek Hohls schrieb: Johannes Thanks for the detailed insight into issues. I had hoped to avoid patching hundreds of functions. but I guess its inevitable. Would a function like the following be able to avoid the problem I have been having: function accessDB() { try { //get connection //do stuff... //close connection //return result } catch(e) { cocoon.log.error (Unable to complete function accessDB); return null; } } (I'm not sure how this will ensure the connection is closed?) Thanks Derek On 2008/06/04 at 12:28, in message [EMAIL PROTECTED], Johannes Textor [EMAIL PROTECTED] wrote: Derek Hohls schrieb: Johannes This was my thought too. I have numerous modules functions that open (and should close!) connections. On manual inspection they all seem to be OK, but possibly there is one somewhere which is not correct. Hence my need to try and prevent this; or have the system in some way report exactly when where this is happening so I can fix the offending code. Any ideas on how to do this? I am not aware of any method which would allow one to inspect the current state of the pool. Perhaps the best way would be to log any opening and closing of connections, including the name of the component which uses them, and scan the log files for connections which are not correctly closed. The problem is in the design itself (opening and closing JDBC connections in several places scattered around the application) which makes such applications a mess to debug (been through it myself). A common source for this problem is when error messages get thrown which interrupt the execution of the flow script. Unless you use something like the OpenSessionInViewFilter which gets rid of this kind of problem, in the case of an unexpected error your connections normally remain open. This means that after 10 error messages or so your pool is exhausted and you're stuck. If you are not the kind of Java guy to implement the Open Session in View Concept (which should work with JDBC connections too, not just Hibernate Sessions), I'd recommend you use the try - catch - finally idiom in *every* flowscript function which uses a JDBC connection. Regards, Johannes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Johannes OK - and I assume the } finally { //close connection } won't throw an error if the connection is *not* open? PS If there are any low entry barriers (i.e. not getting into Java, or having to rewrite everything for Hibernate...) to improving this approach, I would be very happy to hear about them. Thanks Derek On 2008/06/04 at 01:42, in message [EMAIL PROTECTED], Johannes Textor [EMAIL PROTECTED] wrote: Derek, you should use the power of the finally construct, which is also available in JS: function accessDB() { try { //get connection //do stuff... //return result } catch(e) { cocoon.log.error (Unable to complete function accessDB); return null; } finally { //close connection } } The finally block is meant to contain instructions which must *always* be executed, no matter what happens in the try and catch blocks. Regardless of that, having hundreds of different places where connections are opened and closed in flowscript seems like a bad idea. Regards, Johannes Derek Hohls schrieb: Johannes Thanks for the detailed insight into issues. I had hoped to avoid patching hundreds of functions. but I guess its inevitable. Would a function like the following be able to avoid the problem I have been having: function accessDB() { try { //get connection //do stuff... //close connection //return result } catch(e) { cocoon.log.error (Unable to complete function accessDB); return null; } } (I'm not sure how this will ensure the connection is closed?) Thanks Derek On 2008/06/04 at 12:28, in message [EMAIL PROTECTED], Johannes Textor [EMAIL PROTECTED] wrote: Derek Hohls schrieb: Johannes This was my thought too. I have numerous modules functions that open (and should close!) connections. On manual inspection they all seem to be OK, but possibly there is one somewhere which is not correct. Hence my need to try and prevent this; or have the system in some way report exactly when where this is happening so I can fix the offending code. Any ideas on how to do this? I am not aware of any method which would allow one to inspect the current state of the pool. Perhaps the best way would be to log any opening and closing of connections, including the name of the component which uses them, and scan the log files for connections which are not correctly closed. The problem is in the design itself (opening and closing JDBC connections in several places scattered around the application) which makes such applications a mess to debug (been through it myself). A common source for this problem is when error messages get thrown which interrupt the execution of the flow script. Unless you use something like the OpenSessionInViewFilter which gets rid of this kind of problem, in the case of an unexpected error your connections normally remain open. This means that after 10 error messages or so your pool is exhausted and you're stuck. If you are not the kind of Java guy to implement the Open Session in View Concept (which should work with JDBC connections too, not just Hibernate Sessions), I'd recommend you use the try - catch - finally idiom in *every* flowscript function which uses a JDBC connection. Regards, Johannes -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: REPOST: Database connection overload
Derek Hohls schrieb: Johannes OK - and I assume the } finally { //close connection } won't throw an error if the connection is *not* open? It would throw an error in this case, but you could check if the connection is open before closing it. However, the error would not be harmful by leaving any open connections. PS If there are any low entry barriers (i.e. not getting into Java, or having to rewrite everything for Hibernate...) to improving this approach, I would be very happy to hear about them. I'm not sure if I have anything to recommend - accessing the DB directly from flowscript is usually considered messy for a reason. But since I have done this myself in the past when I just tried to get things done quickly with the few things I knew about cocoon, I'm pretty sure there are still lots of people out there who do this, even though it's not supposed to be done like this. Whatever, something I tried to avoid these complications was to implement the Data Access Object pattern in flowscript to abstract away the JDBC calls and push them to a central location. (Yes, you can write nice object oriented code in Javascript, too). This way I just had to debug these DAO classes for unclosed connections. I tried to make sure my methods were atomary transactions, that is, a JDBC connection was opened at the beginning of the method and closed at the end of it. Maybe this approach would be something for you to try, if you don't want to go and implement an Open Session in View filter in Java, which is still the most elegant solution to the problem by far, but unfortunately can't be done in flowscript AFAIK. Regards, Johannes Thanks Derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Content aggregation / performance
The best way is to make sure all separate parts are properly cached. The include transformer is really optimal for content aggregation, but won't be of any help if the part that is included is not properly cacheable -Ard Hello I have a question about the optimal way (in respect of performance) of content aggregation in Cocoon 2.1. In our current system we uses the sitemap aggregator and a xsl-stylesheet to aggregate some xhtml-fragments. The xhtml-fragments are generated in a plain xsp/xsl pipelines and some a cacheable (by overriding getKey and getValidity) and some not. I have experimented with cinclude with some success, the aggregation time was almost the half. The problem with cinclude is that it does not properly handle caching and I therefore had to put the caching-key in the fragment URL. In a discussion about deprecating cinclude someone highly recommended the use of IncludeTransformer instead of cinclude. When I tried the performance of IncludeTransformer seems no better than sitemap aggregation. And here comes the question, what is the best way of content aggregation in my situation? Regards Svend - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RESOLVED, but quick question
Okay, I got it to work. My connection settings were correct, but I had to rename the mail and activation jars to the geronimo ones and replace the geronimo ones to get the mail to work. My question is, what file has the code that decides what mail activation jars to use? My app is in Cocoon's build\webapp\ folder. Torsten Curdt wrote: I've tried a million things, but I always get: Could not connect to SMTP host: localhost, port: 2525 (java.net.ConnectException: Connection refused: connect) Well, that sounds like there is no SMTP server listening on localhost port 2525 What happens when you do a 'telnet localhost 2525' ? cheers -- Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/SendMail-Transformer-%28Cocoon-2.1.11%2C-Windows-XP%29-tp17634181p17648991.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
map:serialize type=servletService/
Hi there, i have this in my sitemap (the cocoon 2.2 examples): map:pipeline map:match pattern=view/* map:generate src=view/{1}.jx type=jx / !-- Make use of servlet services -- map:serialize type=servletService map:parameter name=service value=servlet:style-default:/service/blocks/dynamic-page2html/ /map:serialize /map:match /map:pipeline This uses, in serialize, the file dynamic-page2html.xsl 1) Why is this file named dynamic-page2html and not dynamic-page2html.xsl 2) How can I use a file, which is in the same directory as sitemap.xmap. So, for example: value=servlet:style-default:dynamic-page2html/ (I can't get this to work) 3. Where is some basic information about map:serialize type=servletService Thanks, jantje... -- View this message in context: http://www.nabble.com/%3Cmap%3Aserialize-type%3D%22servletService%22-%3E-tp17651467p17651467.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Building problem
Hello, This seems like I miss something very obvious, can somebody please help? svn co http://svn.apache.org/repos/asf/cocoon/trunk cd trunk rm -rf ~/.m2/repository mvn -Dmaven.test.skip=true -P allblocks install This results in a build error: [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. Missing: -- 1) org.apache.cocoon:cocoon-pipeline-impl:test-jar:tests:1.1.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.apache.cocoon -DartifactId=cocoon-pipeline-impl \ -Dversion=1.1.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.apache.cocoon -DartifactId=cocoon-pipeline-impl \ -Dversion=1.1.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.apache.cocoon:cocoon-pipeline-components:jar:1.1.0-SNAPSHOT 2) org.apache.cocoon:cocoon-pipeline-impl:test-jar:tests:1.1.0-SNAPSHOT -- 1 required artifact is missing. for artifact: org.apache.cocoon:cocoon-pipeline-components:jar:1.1.0-SNAPSHOT from the specified remote repositories: apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository), central (http://repo1.maven.org/maven2) Thanks, Alexander
Re: RESOLVED, but quick question
On Jun 4, 2008, at 17:05, Matthew Monkan wrote: Okay, I got it to work. My connection settings were correct, but I had to rename the mail and activation jars to the geronimo ones and replace the geronimo ones to get the mail to work. You had to rename jars to get it working? ...hm ...that's does not sound like the real reason - but anyway. If it works :) My question is, what file has the code that decides what mail activation jars to use? My app is in Cocoon's build\webapp\ folder. Well, the ones in the class path. There is no code that does that. If you have multiple versions in the classpath the renaming might have changed the order. cheers -- Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail + File Generation
Okay, so I know how to generate an Excel document with data from a DB, and I know how to send an e-mail with an attachment. Is there a way to use only one URI to send an e-mail containing a generated Excel document? This is a requirement. For example: map:match pattern=revenueAlert map:generate type=file src=content/main.xml / map:transform type=sql map:parameter name=use-connection value=eta / /map:transform map:transform type=xslt src=style/main.xsl / map:serialize type=xls / !-- Now I need to e-mail this Excel document as an attachment to someone. -- map:generate type=file src=content/main.xml / map:transform type=sendmail / map:serialize type=xml / /map:match Also, I notice that when anything goes through a serializer, it just opens the created file in an application or browser. Is there a way to store the output of a serializer to some destination instead of manually saving the file? Thanks, Matt -- View this message in context: http://www.nabble.com/Mail-%2B-File-Generation-tp17655330p17655330.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bump
-- View this message in context: http://www.nabble.com/Database-to-Excel-Spreadsheet-tp17562564p17656567.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multithreaded Content Aggregator migration from 2.1 to 2.2
Hi last night i wasted 5 hrs overs this without any success .. i guess it has something to do with passing the RequestContextListener to the spring context .. i have initialized the listener in my web.xml and also added the config in applicationcontext.xml .. i checked everything on my end .. everything seems to be fine .. is something wrong with the cachemanager present in cocoon ? any help will be greatly appreciated !! .. awaiting response regards Imran Imran Pariyani wrote: Hello all, we have multithreaded Content Aggregator which is based on the CIncludeTransformer and it also implements CacheableProcessingComponent for caching .. it used to work fine for cocoon 2.1.x but with cocoon 2.2 it gives strange error .. it is actually a generator and it gives error in the generate method .. the code where it gives error // generate... for (Part part : this.parts) { if (this.manager.hasService(IncludeCacheManager.ROLE)) { part.uri = this.cacheManager.load(part.uri, this.cachingSession); } else { this.getLogger().error( The ContentAggregator: aggregator cannot find the IncludeCacheManager); } } // aggregate... StreamPipe streamPipe = new StreamPipe(this.contentHandler); for (Part part : this.parts) { streamPipe.firstElement(part.element, this.rootElement, part.stripRootElement); try { System.out.println(ParallelContentAgg.part.uri: + part.uri); this.cacheManager.stream(part.uri, this.cachingSession, streamPipe); } finally { streamPipe.lastElement(part.element); } } it gives the following error Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.org.apache.cocoon.el.objectmodel.ObjectModel': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:184) at $Proxy2.cleanupLocalContext(Unknown Source) at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:382) at org.apache.cocoon.components.source.util.SourceUtil.toSAX(SourceUtil.java:111) at org.apache.cocoon.components.source.util.SourceUtil.toSAX(SourceUtil.java:170) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:63) at org.apache.cocoon.transformation.helpers.DefaultIncludeCacheManager$LoaderThread.run(DefaultIncludeCacheManager.java:415) at org.apache.cocoon.environment.CocoonRunnable.doRun(CocoonRunnable.java:64) at org.apache.cocoon.environment.internal.EnvironmentHelper$AbstractCocoonRunnable.run(EnvironmentHelper.java:453) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source) ... 1 more am new to spring so its difficult to figure out where the problem is .. any help would be appreciated ... Regards Imran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- Mit freundlichen GrĂ¼ssen Imran Pariyani Senior Software Developer Triplemind OHG Berliner Str. 2 63065 Offenbach a.M. Netzwerk: http://www.urlaubstage.de http://www.unterkunft.de http://www.urlaub.com http://www.tourismus.de u.a. Fon: +49 69 698628574 +49 69 82367670 Fax: +49 69 82367654 Unternehmensdaten: GF: M. Ziegler, C. Gaffga Eingetragen im HR Offenbach a.M. 40202 UST-ID: DE210080643 Bankverbindung: Postbank Frankfurt BLZ: 500 100 60 Kto-Nr: 563 581 608 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multithreaded Content Aggregator migration from 2.1 to 2.2
Imran Pariyani pisze: Hi Hi Imran, last night i wasted 5 hrs overs this without any success .. i guess it has something to do with passing the RequestContextListener to the spring context .. i have initialized the listener in my web.xml and also added the config in applicationcontext.xml .. i checked everything on my end .. everything seems to be fine .. is something wrong with the cachemanager present in cocoon ? any help will be greatly appreciated !! .. Unfortunately, it looks like you stumbled across rather complicated (and obscure) bug. It's related to the fact how Spring's request scope works (objects are tied to the thread). If you run multithreaded aggregation then child threads don't have an access to beans defined with 'request' scope because they are visible only in parent thread. More details below... snip/ org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:382) The failing code is: if (touchedOM) { //Because of complicated flow of this source it must maintain the cleaness of OM on its own ObjectModel newObjectModel; try { newObjectModel = (ObjectModel)manager.lookup(ObjectModel.ROLE); } catch (ServiceException e) { throw new SAXException(Couldn't look up Object Model, e); } newObjectModel.cleanupLocalContext(); touchedOM = false; } Here, manager.lookup fails because ObjectModel is a bean with request scope. To be honest, I don't have an idea how this should be fixed. I guess it's a bug of CocoonRunnable class but I don't know how to give child threads access to parent thread variables in a safe way. This would require more investigation that I have no time for at the moment, unfortunately. I hope it helped you a little to understand the problem. Maybe you will find someone on dev@ mailing list that has an idea how to fix it. -- Grzegorz Kossakowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]