Re: Problems (string index out of range) when generating HelmaDoc

"Hannes Wallnoefer" <[email protected]>
Newsgroups gmane.comp.java.helma.general
Message-ID <[email protected]>
Hi Anton,

obviously you get a EOL token with an offset of -1, which obviously
shouldn't happen. I can't say if this is something to worry about or
to safely ignore/workaround without some further investigation.

The simplest thing would be if you could send me the
code\objectFunctions.js file from your app (via private mail), so I
could try to reproduce this locally. If that's not possible for some
reason, I could commit some code that would provide more info on where
exactly in your file this problem occurs. Let me know which way you
prefer to proceed.

hannes

2007/3/9, Anton Pirker <[email protected]>:
> Hi List!
>
> I'm trying to generate the Helma Doc for an app of mine.
> The first time i hit the "renderAPI" and whenever i hit the "showApi"
> link in manage i get a lot of exceptions in my logfile like this one:
>
> 113172 [TX-manage] ERROR helma.myapp.event  - Couldn't parse file
> C:\data\helma\helma\apps\myapp\modLicense\code\objectFunctions.js
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at java.lang.String.substring(String.java:1905)
>         at helma.doc.Util.extractString(Util.java:85)
>         at helma.doc.DocFunction.scanFunctions(DocFunction.java:110)
>         at helma.doc.DocFunction.newFunctions(DocFunction.java:84)
>         at helma.doc.DocPrototype.readFiles(DocPrototype.java:100)
>         at helma.doc.DocApplication.readApplication(DocApplication.java:103)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:149)
>         at
> org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:204)
>         at
> org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119)
>         at
> org.mozilla.javascript.gen.c299._c1(C:\data\helma\helma\apps\manage\DocApplication\actions.js:2)
>         at
> org.mozilla.javascript.gen.c299.call(C:\data\helma\helma\apps\manage\DocApplication\actions.js)
>         at
> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:386)
>         at
> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2772)
>         at
> org.mozilla.javascript.gen.c299.call(C:\data\helma\helma\apps\manage\DocApplication\actions.js)
>         at org.mozilla.javascript.Context.call(Context.java:520)
>         at helma.scripting.rhino.RhinoEngine.invoke(RhinoEngine.java:278)
>         at
> helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:384)
>         at java.lang.Thread.run(Thread.java:619)
>
>
> In the webbrowser i get the following:
> rendering API ...
> wrote 1186 files
>
> so, no error messages here.
>
> the apidoc is somehow generated, but it seems that nearly no macros,
> skins or actions are included. i have all the skins and type.properties
> in the apidoc but nothing about the actual code.
> has anyone else this problem? is this some helma-issue or is it a
> problem with my application?
>
> thanks for every hint,
> Anton
> _______________________________________________
> Helma-user mailing list
> [email protected]
> http://helma.org/mailman/listinfo/helma-user
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.