NullPointerException when using persistent code cache

Rahman USTA rahman.usta.88 at gmail.com
Mon Aug 24 14:30:51 UTC 2015


Thank you Hannes;

I was getting that, but now I dont get that exception.

Also sometimes, I'm getting this message "java.lang.ClassCastException:
Cannot cast jdk.nashorn.internal.scripts.JO4 to
netscape.javascript.JSObject"

Thanks.

2015-08-24 14:08 GMT+03:00 Hannes Wallnoefer <hannes.wallnoefer at oracle.com>:

> Hi Rahman,
>
> I have filed a bug for this:
>
> https://bugs.openjdk.java.net/browse/JDK-8134304
>
> Thanks for the report!
>
> Hannes
>
>
> Am 2015-08-22 um 19:05 schrieb Rahman USTA:
>
>> Hello;
>>
>> After enabling persistent code cache I'm getting the following error;
>>
>> java.lang.NullPointerException
>> at jdk.nashorn.internal.runtime.Context.getContext(Context.java:1178)
>> at
>> jdk.nashorn.internal.runtime.Context.getContextTrusted(Context.java:1166)
>> at jdk.nashorn.internal.runtime.Context.getContext(Context.java:338)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence.getLogger(OptimisticTypesPersistence.java:442)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence.access$700(OptimisticTypesPersistence.java:82)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence$4.run(OptimisticTypesPersistence.java:321)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence$4.run(OptimisticTypesPersistence.java:305)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence.createCacheDirPrivileged(OptimisticTypesPersistence.java:305)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence.createCacheDir(OptimisticTypesPersistence.java:297)
>> at
>>
>> jdk.nashorn.internal.codegen.OptimisticTypesPersistence.<clinit>(OptimisticTypesPersistence.java:100)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore.getVersionDir(CodeStore.java:269)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore.access$000(CodeStore.java:206)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore$1.run(CodeStore.java:245)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore$1.run(CodeStore.java:242)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore.checkDirectory(CodeStore.java:242)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore.<init>(CodeStore.java:235)
>> at
>>
>> jdk.nashorn.internal.runtime.CodeStore$DirectoryCodeStore.<init>(CodeStore.java:222)
>> at jdk.nashorn.internal.runtime.CodeStore.newCodeStore(CodeStore.java:106)
>> at jdk.nashorn.internal.runtime.Context.<init>(Context.java:531)
>> at jdk.nashorn.internal.runtime.Context.<init>(Context.java:467)
>> at
>>
>> jdk.nashorn.api.scripting.NashornScriptEngine$1.run(NashornScriptEngine.java:129)
>> at
>>
>> jdk.nashorn.api.scripting.NashornScriptEngine$1.run(NashornScriptEngine.java:125)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>>
>> jdk.nashorn.api.scripting.NashornScriptEngine.<init>(NashornScriptEngine.java:125)
>> at
>>
>> jdk.nashorn.api.scripting.NashornScriptEngineFactory.newEngine(NashornScriptEngineFactory.java:232)
>> at
>>
>> jdk.nashorn.api.scripting.NashornScriptEngineFactory.getScriptEngine(NashornScriptEngineFactory.java:195)
>>
>> But nashorn runs normally.
>>
>> Is it a bug ?
>>
>>
>>
>


-- 
Rahman USTA
Istanbul JUG
https://github.com/rahmanusta <http://www.kodcu.com/>


More information about the nashorn-dev mailing list