Error on tomcat console in Jruby on rails project

Hi,

I am developping a rails project and i am using jruby instead of ruby.

I got this error continuously on my console:

java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

Could anyone tell me what the reason could be?

Environment:
Jruby version 1.5.0
Rails version 2.3.5
Postgre SQL database 8.3
apache-tomcat-6.0.26

Also the error appears continuously in the console:

java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

I have created a war of my app thru warbler and have deployed the same
in tomcat.

In tomcat console i get the errror.

I think you need to provide some more detail - what do you mean by your
console? Is this when you start up the rails console?

On Wed, 2010-06-16 at 07:47 +0200, Yani Y. wrote:

at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

Could anyone tell me what the reason could be?

Environment:
Jruby version 1.5.0
Rails version 2.3.5
Postgre SQL database 8.3
apache-tomcat-6.0.26


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Im getting the same error as well with jruby 1.5.1 oracle 10g rails
2.3.8 tomcat 2.0.24

warble.rb config settings

config.gems += [“activerecord-jdbc-adapter”,
“jruby-openssl”,“activerecord-oracle_enhanced-adapter”,“jruby-ldap”]
config.gems[“rails”] = “2.3.8”
config.gems << “rack”

in catalina.out

java.lang.NullPointerException
at com.kenai.jffi.Function.finalize(Function.java:177)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

Does anybody have a fix for this?

sorry make that tomcat 2.0.26

I have noticed when you stop the tomcat server

SEVERE: A web application appears to have started a thread named [Poller
SunPKCS11-Darwin] but has failed to stop it. This is very likely to
create a memory leak.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearReferencesJdbc
SEVERE: A web application registered the JBDC driver
[oracle.jdbc.driver.OracleDriver] but failed to unregister it when the
web application was stopped. To prevent a memory leak, the JDBC Driver
has been forcibly unregistered.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [com.kenai.jaffl.provider.StringIO$1@156e5f3e]) and a value of
type [java.lang.ref.SoftReference] (value
[java.lang.ref.SoftReference@12eea70]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [org.joni.StackMachine$1@2f215fab]) and a value of type
[java.lang.ref.WeakReference] (value
[java.lang.ref.WeakReference@380febb9]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [com.kenai.jaffl.provider.StringIO$1@156e5f3e]) and a value of
type [java.lang.ref.SoftReference] (value
[java.lang.ref.SoftReference@1d3cdb70]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [org.joni.StackMachine$1@2f215fab]) and a value of type
[java.lang.ref.WeakReference] (value
[java.lang.ref.WeakReference@66aa50f]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [com.kenai.jaffl.provider.StringIO$1@156e5f3e]) and a value of
type [java.lang.ref.SoftReference] (value
[java.lang.ref.SoftReference@437a7f13]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.catalina.loader.WebappClassLoader
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null]
(value [org.joni.StackMachine$1@2f215fab]) and a value of type
[java.lang.ref.WeakReference] (value
[java.lang.ref.WeakReference@1f2cdb01]) but failed to remove it when the
web application was stopped. To prevent a memory leak, the ThreadLocal
has been forcibly removed.
Jul 7, 2010 10:57:19 AM org.apache.coyote.http11.Http11Protocol destroy

One work around we havd got was to stop tomcat server and then deploy
the war and then start the server

Basically avoid hot deploy.

However once again even after doing this once we got the above error in
console.

Any idea if we are doing anything wrong anywhere?

It seems like an error you get after you reload or reinstall a warble
created war file.