You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by sac sha <sa...@gmail.com> on 2011/02/21 18:25:44 UTC

Error creating a new publication in lenya 2.1.x

Hi All

I am trying to build lenya 2.1.x checked out from VPN. Following are
the configuration I am using:

Container: Jetty (In built)
Java: 1.6
Lenya: 2.1.X (SVN)

It builds fine and throws no error. Default publication works fine as
well. The problem comes when I try to create a new publication. It
throws following error:

[object Error] (file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js#393)

Stacktrace:

org.mozilla.javascript.JavaScriptException: [object Error]
(file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js#393)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:2461)
	at script.executeUsecase(file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js:393)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2251)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:161)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:340)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2758)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:159)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:915)
	at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:764)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:139)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
	...more

Please suggest if anybody experienced this error before.

TIA

Regards
Sac

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Error creating a new publication in lenya 2.1.x

Posted by sac sha <sa...@gmail.com>.
Hi Rudolf

Thanks for pointing out and correcting. When I replaced the code as
suggested by you it worked for me as well.

Regards
Sac

On Wed, Feb 23, 2011 at 12:33 AM, Rudolf Korhummel <ru...@korhummel.de> wrote:
> Hi all,
> Am 21.02.2011 um 20:03 schrieb Rainer Schöpf:
>
>> On Mon, 21 Feb 2011 at 22:55 +0530, sac sha wrote:
>>
>>> Hi All
>>>
>>> I am trying to build lenya 2.1.x checked out from VPN. Following are
>>> the configuration I am using:
>>>
>>> Container: Jetty (In built)
>>> Java: 1.6
>>> Lenya: 2.1.X (SVN)
>>>
>>> It builds fine and throws no error. Default publication works fine as
>>> well. The problem comes when I try to create a new publication. It
>>> throws following error:
>>>
>>> [object Error]
>>> (file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js#393)
>>
>> Yes, I can confirm this. Can you please submit a bug report?
>
> if I revert the following  changes coming with:
>
> r1054381 | andreas | 2011-01-02 11:32:43 +0100 (So, 02 Jan 2011) | 1 line
>
> Improve relative URI rewriting (code simplification, better correctness).
> ------------------------------------------------------------------------
>
> ===================================================================
> ---
> src/modules-core/linking/java/src/org/apache/lenya/cms/linking/OutgoingLinkRewriter.java
>    (revision 1070049)
> +++
> src/modules-core/linking/java/src/org/apache/lenya/cms/linking/OutgoingLinkRewriter.java
>    (working copy)
> @@ -127,7 +127,7 @@
>     }
>
>     public Bologna matches(String url) {
> -        return url.equals("") || url.startsWith("/");
> +        return url.startsWith("/");
>     }
>
>     private Map<String, Publication> publicationCache = new HashMap<String,
> Publication>();
>
> the  creation of  publications works again.
>
> I'm not sure if there are  side effects if I commit.
> @andreas: Do you remember why you did this change ?
> Should I commit ?
>
> Rudolf
>
>>
>> Thanks
>>  Rainer
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: user-help@lenya.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>
>



-- 
Regards
Sachin Sharma

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Error creating a new publication in lenya 2.1.x

Posted by Rainer Schöpf <ra...@gmx.net>.
Hi Andreas,

 > Hi Rudolf,
 > 
 > Am 22.02.11 20:03, schrieb Rudolf Korhummel:
 > 
 > […]
 > 
 > > public Bologna matches(String url) {
 >          ^
 > LOL – was that the spell checker of your email client? :)
 > 
 > > - return url.equals("") || url.startsWith("/");
 > > + return url.startsWith("/");
 > > }
 > > 
 > > private Map<String, Publication> publicationCache = new HashMap<String,
 > > Publication>();
 > > 
 > > the creation of publications works again.
 > > 
 > > I'm not sure if there are side effects if I commit.
 > > @andreas: Do you remember why you did this change ?
 > > Should I commit ?
 > 
 > I'll take a look at it as soon as I find the time.

FWIW: the bug triggers an error in the OutgoingLinkRewriterTest.

I wonder whether empty strings should be matched only for a relative URL.

 Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: uscase editors.insertAssets : heap memory problems

Posted by Andreas Hartmann <an...@apache.org>.
Am 26.02.11 09:53, schrieb Rudolf Korhummel:
> We have a publication with about 1000 assets. If we try to insert new
> assets with the usecase editors.insertAsset from the oneform editor the
> heap raises up 1 GB which runs into out of heap memory when we call it a
> second time and lenya stops working.
>
> I think the problem is that the metadata of all assets have to be read
> to build up the listing.
>
> Here a two suggestions to solve this problem:
>
> 1) Use a usecase like editors.insertLink for images and assets. Only the
> metadata of the child documents have to be read.

+1

Additionally it would be nice to add a search form for title and keyword 
search.

I'm not sure if the tree structure is the way to go here, though. I 
doubt that many people find a tree-based structure straightforward for 
storing assets. Maybe a keyword/tag-based storage makes more sense? That 
raises the question of tag definitions, though, which is a whole new 
topic altogether.

Anyway, the Dojo DataGrid could be a good starting point for the GUI:
http://dojocampus.org/explorer/#Dojox_Grid_Basic
It supports lazy loading of data via asynchronous requests while scrolling.

Combining the grid for presentation with a live search input field could 
be quite user-friendly. We have done this for another project (although 
with Apache Cayenne, not with Lucene).

> 2) Provide the information for the listing in the sitetree, so no
> metadata file content is needed.

-1

The sitetree in the current form (static in-memory structure, serialized 
and restored as a single XML structure) is already a bottleneck. Making 
it even heavier will further reduce the performance and increase memory 
consumption.

-- Andreas

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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


uscase editors.insertAssets : heap memory problems

Posted by Rudolf Korhummel <ru...@korhummel.de>.
Hi all,

We have a publication with about 1000 assets. If we try to insert new  
assets with the usecase editors.insertAsset from the oneform editor  
the heap raises up 1 GB which runs into out of heap memory when we  
call it a second time and lenya stops working.

I think the problem is that the metadata of all assets have to be read  
to build up the listing.

Here a two suggestions to solve this problem:

1) Use a usecase  like editors.insertLink for images and assets. Only  
the metadata of the child documents have to be read.

2) Provide the information for the listing in the sitetree, so no  
metadata file content is needed.

WDYT

Rudolf
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Error creating a new publication in lenya 2.1.x

Posted by ru...@uniklinik-freiburg.de.
Hi Andreas,

Andreas Hartmann <an...@apache.org> schrieb am 24.02.2011 11:46:50:
>
> > public Bologna matches(String url) {
>           ^
> LOL – was that the spell checker of your email client? :)
>

I used cut and paste. I think you're right. :)

>
> I'll take a look at it as soon as I find the time.
>
TIA

Rudolf

Re: Error creating a new publication in lenya 2.1.x

Posted by Andreas Hartmann <an...@apache.org>.
Hi Rudolf,

Am 22.02.11 20:03, schrieb Rudolf Korhummel:

[…]

> public Bologna matches(String url) {
          ^
LOL – was that the spell checker of your email client? :)

> - return url.equals("") || url.startsWith("/");
> + return url.startsWith("/");
> }
>
> private Map<String, Publication> publicationCache = new HashMap<String,
> Publication>();
>
> the creation of publications works again.
>
> I'm not sure if there are side effects if I commit.
> @andreas: Do you remember why you did this change ?
> Should I commit ?

I'll take a look at it as soon as I find the time.
Thanks for investigating!

-- Andreas

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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Error creating a new publication in lenya 2.1.x

Posted by Rudolf Korhummel <ru...@korhummel.de>.
Hi all,
Am 21.02.2011 um 20:03 schrieb Rainer Schöpf:

> On Mon, 21 Feb 2011 at 22:55 +0530, sac sha wrote:
>
>> Hi All
>>
>> I am trying to build lenya 2.1.x checked out from VPN. Following are
>> the configuration I am using:
>>
>> Container: Jetty (In built)
>> Java: 1.6
>> Lenya: 2.1.X (SVN)
>>
>> It builds fine and throws no error. Default publication works fine as
>> well. The problem comes when I try to create a new publication. It
>> throws following error:
>>
>> [object Error] (file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js 
>> #393)
>
> Yes, I can confirm this. Can you please submit a bug report?

if I revert the following  changes coming with:

r1054381 | andreas | 2011-01-02 11:32:43 +0100 (So, 02 Jan 2011) | 1  
line

Improve relative URI rewriting (code simplification, better  
correctness).
------------------------------------------------------------------------

===================================================================
--- src/modules-core/linking/java/src/org/apache/lenya/cms/linking/ 
OutgoingLinkRewriter.java	(revision 1070049)
+++ src/modules-core/linking/java/src/org/apache/lenya/cms/linking/ 
OutgoingLinkRewriter.java	(working copy)
@@ -127,7 +127,7 @@
      }

      public Bologna matches(String url) {
-        return url.equals("") || url.startsWith("/");
+        return url.startsWith("/");
      }

      private Map<String, Publication> publicationCache = new  
HashMap<String, Publication>();

the  creation of  publications works again.

I'm not sure if there are  side effects if I commit.
@andreas: Do you remember why you did this change ?
Should I commit ?

Rudolf

>
> Thanks
>  Rainer
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
> For additional commands, e-mail: user-help@lenya.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Error creating a new publication in lenya 2.1.x

Posted by Rainer Schöpf <ra...@gmx.net>.
On Mon, 21 Feb 2011 at 22:55 +0530, sac sha wrote:

 > Hi All
 > 
 > I am trying to build lenya 2.1.x checked out from VPN. Following are
 > the configuration I am using:
 > 
 > Container: Jetty (In built)
 > Java: 1.6
 > Lenya: 2.1.X (SVN)
 > 
 > It builds fine and throws no error. Default publication works fine as
 > well. The problem comes when I try to create a new publication. It
 > throws following error:
 > 
 > [object Error] (file:///home/sachin/workspace/BRANCH_2_1_X/build/lenya/webapp/lenya/modules/usecase/usecases.js#393)

Yes, I can confirm this. Can you please submit a bug report?

 Thanks
  Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org