kazu2012 / persevere-framework

Automatically exported from code.google.com/p/persevere-framework
0 stars 0 forks source link

JavaScript code corrupts JavaScriptDB #265

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Put the code attached below in a file under jslibs/ while a persevere
instance is running. 
2. Restart the persevere instance

What is the expected output? What do you see instead?

PersevereFilter fails to start an throws the following exception:

java.lang.OutOfMemoryError: Java heap space
        at
org.persvr.util.BufferedDataInput.readString(BufferedDataInput.java:
79)
        at
org.persvr.datasource.JavaScriptDB.readEntity(JavaScriptDB.java:412)
        at
org.persvr.datasource.JavaScriptDB.restartTransactions(JavaScriptDB.java:
479)
        at
org.persvr.datasource.JavaScriptDB.initialize(JavaScriptDB.java:464)
        at
org.persvr.datasource.JavaScriptDBSource.initialize(JavaScriptDBSource.java:
88)
        at
org.persvr.data.DataSourceManager.<clinit>(DataSourceManager.java:258)
        at
org.persvr.data.Identification.idForString(Identification.java:48)
        at org.persvr.Persevere.load(Persevere.java:145)
        at org.persvr.job.SampleData.execute(SampleData.java:14)
        at org.persvr.job.Upgrade.execute(Upgrade.java:13)
        at org.persvr.remote.PersevereFilter.init(PersevereFilter.java:
123)
        at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
620)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:
140)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1234)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:460)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:
152)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollect
ion.java:
156)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
        at org.persvr.util.JettyStart.startJetty(JettyStart.java:204)
        at org.persvr.util.JettyStart.main(JettyStart.java:145) 

What version of the product are you using? On what operating system?

persevere1.0.1.rc2.tar.gz on Windows.

Please provide any additional information below.

All identifiers are replaced with "xxxx" because it doesn't seem to make a
difference when I choose other names.

In my application I experienced the error too, with additional output of
persevere

First restart: 

SEVERE: Error occurred during indexing, the index may need to be rebuilt
java.lang.OutOfMemoryError: Java heap space
syntax error (function#1)

Second restart:

syntax error (function#1)
15.03.2010 16:58:31 org.persvr.datasource.JavaScriptDB readEntity
SEVERE: Corrupt properties found on Page/14

Original issue reported on code.google.com by stefan.f...@gmx.at on 15 Mar 2010 at 4:16

Attachments: