Project

General

Profile

May be a bug in rest/stats

Dathan Pattishall
Added about 4 years ago

When calling

http://localhost:8080/rest/stats/

with the following config

config-type=--gen-config-def
--admins=admin@shots.com,admin,admin@shots.com,http@dathan.local,admin@dathan.local
--virt-hosts=shots.com,localhost,ip-10-0-15-171.us-west-2.compute.internal,dathan.local
--vhost-anonymous-enabled=false
--vhost-tls-required=false
--debug=com.shots.xmpp.tigase,com.shots.xmpp.tigase.MessageArchivePlugin,com.shots.api,com.shots.api.cache,server,http
--user-db=mysql
--user-db-uri=jdbc:mysql://localhost:3306/tigasedb?user=root&password=root&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--tigase.level=ALL
--tigase.xml.level=ALL
--java.util.logging.ConsoleHandler.level=ALL
--auth-db=com.shots.xmpp.tigase.ShotsCustomAuth
--user-db=com.shots.xmpp.tigase.ShotsUserRepositoryImpl
--roster-implementation=com.shots.xmpp.tigase.RosterFlat
--domain-filter-policy=LOCAL

sess-man/plugins-conf/jabber\:iq\:roster/dynamic-roster-classes=com.shots.xmpp.tigase.ShotsRosterImpl
sess-man/plugins-conf/jabber\:iq\:roster/db-uri=jdbc:mysql://localhost/mydb?user=tigase&password=tigase
sess-man/plugins-conf/jabber\:iq\:roster/default-domain=shots.com
sess-man/plugins-conf/jabber\:iq\:roster/pass-local-jids-to-queries=true
sess-man/plugins-conf/presence/dynamic-roster-classes=com.shots.xmpp.tigase.ShotsRosterImpl
sess-man/plugins-conf/presence/db-uri=jdbc:mysql://localhost/mydb?user=tigase&password=tigase
sess-man/plugins-conf/presence/default-domain=shots.com
sess-man/plugins-conf/presence/pass-local-jids-to-queries=true
#
--sm-plugins = +shots-message-archive,+message,-msgcarbons,-amp,-msgoffline,-message-archive,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,-jabber:iq:register,+jabber:iq:roster,+presence,-jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,-vcard-temp,+http://jabber.org/protocol/commands,-jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib
--comp-name-1 = muc
--comp-name-2 = pubsub
--comp-class-2 = tigase.pubsub.PubSubComponent
--comp-name-3=http
--comp-class-3=tigase.http.HttpMessageReceiver
rest/port=8080
rest/use-local-server[B]=true
--api-keys=open_access

#--comp-name-2 = pubsub
#--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

I am getting the following Null Pointer exception

2015-01-08 14:46:18.655 [in_0-http]        java_util_logging_Logger$log.call()  WARNING: looking for template for tigase.rest.adhoc.ServerStatsHandler@30e37d82 and method GET got groovy.text.GStringTemplateEngine$GStringTemplate@383fe5ce from 2
2015-01-08 14:46:18.670 [in_0-http]        AbstractMessageReceiver$QueueListener.run()  SEVERE: [in_0-http] Exception during packet processing: from=stats@dathan.local, to=http@dathan.local/7fedf21a-fd1c-4b0a-91f6-8d09c24100bc, DATA=<iq from="stats@dathan.local" to="admin@shots.com" id="1037ebf1-975a-470a-bb5c-88c349ecfbde" type="result"><command xmlns="http://jabber.org/protocol/commands" node="stats/ws2s" status="executing"><x xmlns="jabber:x:data" type="form"><field label="Stats level" var="Stats level" type="list-single"><value>INFO</value><option label="INFO"><value>INFO</value></option><option label="FINE"><value>FINE</value></option><option label="FINER"><value>FINER</value></option><option label="FINEST"><value>FINEST</value></option></field></x><actions execute="complete"><complete/></actions></command></iq>, SIZE=595, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=result
java.lang.NullPointerException
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1008)
    at java.lang.Float.parseFloat(Float.java:452)
    at java_lang_Float$parseFloat.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at groovy.tmp.templates.GStringTemplateScript8$_getTemplate_closure1.doCall(GStringTemplateScript8.groovy:85)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
    at groovy.lang.Closure.call(Closure.java:411)
    at groovy.lang.Closure$WritableClosure.writeTo(Closure.java:841)
    at groovy.lang.Writable$writeTo.call(Unknown Source)
    at tigase.http.rest.RestExtServlet.encodeResults(RestExtServlet.groovy:135)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:361)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
    at tigase.http.rest.RestServlet$_execute_closure4.doCall(RestServlet.groovy:229)
    at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at tigase.rest.adhoc.ServerStatsHandler$_closure1_closure3_closure4.doCall(ServerStats.groovy:166)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at tigase.http.rest.ClosureCallback.onResult(ClosureCallback.groovy:37)
    at tigase.http.HttpMessageReceiver.processResultPacket(HttpMessageReceiver.java:357)
    at tigase.http.HttpMessageReceiver.processPacket(HttpMessageReceiver.java:258)
    at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1490)

Is there any other data you need?


Replies (1)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam about 4 years ago

NPE is always a bug. It should not happen, no matter what you do. I have opened a bug report for this: #2594. Please add yourself to watchers if you want to track progress of this issue.

Regardless, there might be a problem with your configuration or installation. Andrzej will take a look at it and help you out.

    (1-1/1)