wso2 - ArrayIndexOutOfBoundsException when adding a new API in wso2am -


i downloaded wso2am-1.9.0.zip macbook , expanded it. did not change of config or else. started bin/wso2server.sh, documented. seemed start successfully. able login api publisher admin/admin, documented. when tried add simple new api (just 1 endpoint) got following stacktrace:

[2015-07-22 12:47:06,801] error - add:jag org.mozilla.javascript.wrappedexception: wrapped java.lang.arrayindexoutofboundsexception: 0 (/publisher/modules/api/add.jag#99)     @ org.mozilla.javascript.context.throwasscriptruntimeex(context.java:1754)     @ org.mozilla.javascript.memberbox.invoke(memberbox.java:148)     @ org.mozilla.javascript.functionobject.call(functionobject.java:386)     @ org.mozilla.javascript.optimizer.optruntime.call1(optruntime.java:32)     @ org.jaggeryjs.rhino.publisher.modules.api.c3._c_anonymous_5(/publisher/modules/api/add.jag:99)     @ org.jaggeryjs.rhino.publisher.modules.api.c3.call(/publisher/modules/api/add.jag)     @ org.mozilla.javascript.scriptruntime.applyorcall(scriptruntime.java:2430)     @ org.mozilla.javascript.basefunction.execidcall(basefunction.java:269)     @ org.mozilla.javascript.idfunctionobject.call(idfunctionobject.java:97)     @ org.mozilla.javascript.optimizer.optruntime.call2(optruntime.java:42)     @ org.jaggeryjs.rhino.publisher.modules.api.c0._c_anonymous_30(/publisher/modules/api/module.jag:98)     @ org.jaggeryjs.rhino.publisher.modules.api.c0.call(/publisher/modules/api/module.jag)     @ org.mozilla.javascript.optimizer.optruntime.call1(optruntime.java:32)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0._c_anonymous_1(/publisher/site/blocks/item-design/ajax/add.jag:100)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0.call(/publisher/site/blocks/item-design/ajax/add.jag)     @ org.mozilla.javascript.optimizer.optruntime.call0(optruntime.java:23)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0._c_script_0(/publisher/site/blocks/item-design/ajax/add.jag:5)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0.call(/publisher/site/blocks/item-design/ajax/add.jag)     @ org.mozilla.javascript.contextfactory.dotopcall(contextfactory.java:394)     @ org.mozilla.javascript.scriptruntime.dotopcall(scriptruntime.java:3091)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0.call(/publisher/site/blocks/item-design/ajax/add.jag)     @ org.jaggeryjs.rhino.publisher.site.blocks.item_design.ajax.c0.exec(/publisher/site/blocks/item-design/ajax/add.jag)     @ org.jaggeryjs.scriptengine.engine.rhinoengine.execscript(rhinoengine.java:567)     @ org.jaggeryjs.scriptengine.engine.rhinoengine.exec(rhinoengine.java:273)     @ org.jaggeryjs.jaggery.core.manager.webappmanager.execute(webappmanager.java:541)     @ org.jaggeryjs.jaggery.core.jaggeryservlet.dopost(jaggeryservlet.java:29)     @ javax.servlet.http.httpservlet.service(httpservlet.java:755)     @ javax.servlet.http.httpservlet.service(httpservlet.java:848)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:303)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.applicationdispatcher.invoke(applicationdispatcher.java:748)     @ org.apache.catalina.core.applicationdispatcher.processrequest(applicationdispatcher.java:486)     @ org.apache.catalina.core.applicationdispatcher.doforward(applicationdispatcher.java:378)     @ org.apache.catalina.core.applicationdispatcher.forward(applicationdispatcher.java:338)     @ org.jaggeryjs.jaggery.core.jaggeryfilter.dofilter(jaggeryfilter.java:21)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122)     @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:501)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103)     @ org.wso2.carbon.tomcat.ext.valves.compositevalve.continueinvocation(compositevalve.java:178)     @ org.wso2.carbon.tomcat.ext.valves.carbontomcatvalve$1.invoke(carbontomcatvalve.java:47)     @ org.wso2.carbon.webapp.mgt.tenantlazyloadervalve.invoke(tenantlazyloadervalve.java:56)     @ org.wso2.carbon.tomcat.ext.valves.tomcatvalvecontainer.invokevalves(tomcatvalvecontainer.java:47)     @ org.wso2.carbon.tomcat.ext.valves.compositevalve.invoke(compositevalve.java:141)     @ org.wso2.carbon.tomcat.ext.valves.carbonstuckthreaddetectionvalve.invoke(carbonstuckthreaddetectionvalve.java:156)     @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:950)     @ org.wso2.carbon.tomcat.ext.valves.carboncontextcreatorvalve.invoke(carboncontextcreatorvalve.java:52)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408)     @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1070)     @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:611)     @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1736)     @ org.apache.tomcat.util.net.nioendpoint$socketprocessor.run(nioendpoint.java:1695)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61)     @ java.lang.thread.run(thread.java:744) caused by: java.lang.arrayindexoutofboundsexception: 0     @ org.wso2.carbon.apimgt.impl.dao.apimgtdao.addapi(apimgtdao.java:6379)     @ org.wso2.carbon.apimgt.impl.apiproviderimpl.addapi(apiproviderimpl.java:395)     @ org.wso2.carbon.apimgt.impl.userawareapiprovider.addapi(userawareapiprovider.java:46)     @ org.wso2.carbon.apimgt.hostobjects.apiproviderhostobject.saveapi(apiproviderhostobject.java:900)     @ org.wso2.carbon.apimgt.hostobjects.apiproviderhostobject.jsfunction_createapi(apiproviderhostobject.java:798)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ org.mozilla.javascript.memberbox.invoke(memberbox.java:126)     ... 58 more 

this issue occurs when give context /{version}. issue [1] identified , in open state , fixed in coming releases. work around can provide other value context , create api. e.g., test/{version} or /{version}/test or test/{version}/somestring

[1] https://wso2.org/jira/browse/apimanager-3977


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -