We recently switched to CF11 and converted some of our file downloads to use cfhtmltopdf.
When there are multiple requests for PDFs the request start to hang as monitored in FusionReactor. I can replicate the issue by opening just three or four tabs and all requesting a PDF simultaneously. The stack trace shows the last CFM line processed was cfhtmltopdf.
It then looks to be acquiring locks on something and then two or three of the requests hang in this state. Sometimes they eventually resolve (after 10 plus minutes), other times they are hung for hours. Can anyone shed some light on this thread dump or the issue? Its is maybe a CF Standard Edition thing where PDF creation is limited?
sun.misc.Unsafe.park(null:???)[Native Method]
- waiting on <0x46295456> (a java.util.concurrent.Semaphore$NonfairSync)
java.util.concurrent.locks.LockSupport.park(null:???)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(null:???)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(null:???)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(null:???)
java.util.concurrent.Semaphore.acquire(null:???)
coldfusion.featurerouter.edition.StandardServerEdition.acquireEnterpriseFeatureLock(StandardServerEdition.java:195)
- locked <0x5f893c6d> (a coldfusion.featurerouter.EFRContext)
coldfusion.featurerouter.edition.StandardServerEdition.allowFeature(StandardServerEdition.java:88)
coldfusion.featurerouter.FeatureRouter.allowFeature(FeatureRouter.java:113)
coldfusion.tagext.lang.HtmlToPdfTag.doStartTag(HtmlToPdfTag.java:807)
cfFileHandlerFunctions2ecfc1831761174$funcCREATEPDF.runFunction(D:\timeclock\lib\functions\FileHandlerFunctions.cfc:308)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457)
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424)
cfTimecardController2ecfc2026185905$funcDOWNLOADHOURLYPDFTIMECARD.runFunction(D:\timeclock\system\controller\TimecardController.cfc:188)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457)
coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424)
coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:399)
coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2987)
cfApplication2ecfc1521604824$funcONCFCREQUEST.runFunction(D:\timeclock\system\Application.cfc:403)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432)
coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402)
coldfusion.runtime.AppEventInvoker.invokeWithReturn(AppEventInvoker.java:147)
coldfusion.runtime.AppEventInvoker.OnCfcRequest(AppEventInvoker.java:323)
coldfusion.filter.ApplicationFilter.callOnCFCMethod(ApplicationFilter.java:598)
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:473)
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:156)
coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
sun.reflect.GeneratedMethodAccessor100.invoke(null:???)
sun.reflect.DelegatingMethodAccessorImpl.invoke(null:???)
java.lang.reflect.Method.invoke(null:???)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:97)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:472)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:312)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:192)
com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:507)
com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)
sun.reflect.GeneratedMethodAccessor99.invoke(null:???)
sun.reflect.DelegatingMethodAccessorImpl.invoke(null:???)
java.lang.reflect.Method.invoke(null:???)
com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:79)
sun.reflect.GeneratedMethodAccessor98.invoke(null:???)
sun.reflect.DelegatingMethodAccessorImpl.invoke(null:???)
java.lang.reflect.Method.invoke(null:???)
com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:53)
com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:???)
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:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
- locked <0x6791a199> (a org.apache.tomcat.util.net.SocketWrapper)
java.util.concurrent.ThreadPoolExecutor.runWorker(null:???)
java.util.concurrent.ThreadPoolExecutor$Worker.run(null:???)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(null:???)
Locked ownable synchronizers:
- java.util.concurrent.ThreadPoolExecutor$Worker#2bc8ea50
Related
This is regarding a rather recent issue that we’ve been facing. We run 2 client instances and 26 apache ignite instances. All are AWS R4.2xLarge nodes. Recently we’ve been seeing this issue where when trying to fetch an atomicLong or atomicReference, the executing thread gets stuck and doesn’t return. This issue usually happens on 1 or 2 ignite instances. I am not sure why this happens and so any help on this would be really appreciated.
This is the thread dump while trying to get an atomicReference:
"main" #1 prio=5 os_prio=0 cpu=3528.41ms elapsed=1067.33s allocated=312M defined_classes=9309 tid=0x00007f4ce4046fc0 nid=0x1537 waiting on condition [0x00007f4cece90000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base#11.0.7/Native Method)
- parking to wait for <0x00007f4cbfe7c7d0> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base#11.0.7/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base#11.0.7/AbstractQueuedSynchronizer.java:885)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1039)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1345)
at java.util.concurrent.CountDownLatch.await(java.base#11.0.7/CountDownLatch.java:232)
at org.apache.ignite.internal.util.IgniteUtils.await(IgniteUtils.java:7612)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.awaitInitialization(DataStructuresProcessor.java:1147)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:506)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicReference(DataStructuresProcessor.java:744)
at org.apache.ignite.internal.IgniteKernal.atomicReference(IgniteKernal.java:3743)
at org.apache.ignite.internal.IgniteKernal.atomicReference(IgniteKernal.java:3732)
at company.explore.cache.persist.SavedAudienceLocationProvider.getSavedAudienceLocation(SavedAudienceLocationProvider.java:27)
at company.explore.listeners.lifecycle.LifecycleListener.configureSavedAudienceLocation(LifecycleListener.java:45)
at company.explore.listeners.lifecycle.LifecycleListener.onLifecycleEvent(LifecycleListener.java:38)
at org.apache.ignite.internal.IgniteKernal.notifyLifecycleBeans(IgniteKernal.java:725)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1156)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:2038)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1730)
- locked <0x00007f4cbf072a38> (a org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1158)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1076)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:962)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:861)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:731)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:700)
at org.apache.ignite.Ignition.start(Ignition.java:348)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:301)
Since this is stuck any Ignition.ignite calls fail as well and cause the job not to go through:
"pub-#22" #48 prio=5 os_prio=0 cpu=5.76ms elapsed=1036.50s allocated=421K defined_classes=6 tid=0x00007f4ce4cf3990 nid=0x1607 waiting on condition [0x00007f40375f6000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base#11.0.7/Native Method)
- parking to wait for <0x00007f4cbf16d9e0> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base#11.0.7/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base#11.0.7/AbstractQueuedSynchronizer.java:885)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1039)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1345)
at java.util.concurrent.CountDownLatch.await(java.base#11.0.7/CountDownLatch.java:232)
at org.apache.ignite.internal.util.IgniteUtils.awaitQuiet(IgniteUtils.java:7657)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.grid(IgnitionEx.java:1671)
at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1389)
at org.apache.ignite.internal.IgnitionEx.grid(IgnitionEx.java:1258)
at org.apache.ignite.Ignition.ignite(Ignition.java:489)
at company.explore.dataload.person.LoadPersonAttributeJob.call(LoadPersonAttributeJob.java:58)
at company.explore.dataload.person.LoadPersonAttributeJob.call(LoadPersonAttributeJob.java:31)
at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C2.execute(GridClosureProcessor.java:1855)
at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:568)
at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6817)
at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:562)
at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:491)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base#11.0.7/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base#11.0.7/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base#11.0.7/Thread.java:834)
Similarly this is an instance where the thread is waiting for CountDownLatch when trying to get atomicLong:
"pub-#489" #608 prio=5 os_prio=0 cpu=16.80ms elapsed=7076.10s allocated=2409K defined_classes=17 tid=0x00007f48c8014c60 nid=0x5bd5 waiting on condition [0x00007f48359e1000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park(java.base#11.0.7/Native Method)
- parking to wait for <0x00007f518aba6060> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(java.base#11.0.7/LockSupport.java:194)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(java.base#11.0.7/AbstractQueuedSynchronizer.java:885)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1039)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(java.base#11.0.7/AbstractQueuedSynchronizer.java:1345)
at java.util.concurrent.CountDownLatch.await(java.base#11.0.7/CountDownLatch.java:232)
at org.apache.ignite.internal.util.IgniteUtils.await(IgniteUtils.java:7612)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.awaitInitialization(DataStructuresProcessor.java:1147)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:506)
at org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:463)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3716)
at org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3705)
at company.explore.cache.persist.person.SerializationStatus.getSerializeCounter(SerializationStatus.java:86)
at company.explore.cache.persist.person.SerializationStatus.startNodeSerialization(SerializationStatus.java:21)
at company.explore.cache.persist.personv2.PersonSerializationJob.serializePeopleData(PersonSerializationJob.java:98)
at company.explore.cache.persist.personv2.PersonSerializationJob.run(PersonSerializationJob.java:75)
at org.apache.ignite.internal.processors.closure.GridClosureProcessor$C4.execute(GridClosureProcessor.java:1944)
at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:568)
at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:6817)
at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:562)
at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:491)
at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base#11.0.7/ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base#11.0.7/ThreadPoolExecutor.java:628)
at java.lang.Thread.run(java.base#11.0.7/Thread.java:834)
These issues have only started coming up as of the past 2 months or so. The system itself has been very stable for a long time.
I haven’t posted the entire thread dump as it would be quite large. If needed, I can post it on pastebin or upload it somewhere.
Since this really isn’t a very consistent issue I am not sure about how to create a reproducer project. But I can provide any logs or so if needed.
EDIT:
The entire thread dumps have been posted on pastebin. Please find the links below:
Atomic Reference related thread dump: pastebin.com/ydNMFSEP
Atomic Long related thread dump: pastebin.com/psJgwi3F
I get the following crash logged on my App that has been uploaded to the Play store. But I simply can not work out why this is happening with the report offered.
I have not been able to replicate this crash - any pointers would be helpful.
java.lang.RuntimeException:
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3965)
at android.app.ActivityThread.access$1500 (ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1875)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7356)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930)
Caused by: android.util.AndroidRuntimeException:
at android.app.ContextImpl.startActivity (ContextImpl.java:952)
at android.app.ContextImpl.startActivity (ContextImpl.java:928)
at android.content.ContextWrapper.startActivity (ContextWrapper.java:383)
at com.example.wb.filterService.manageDrawOverWindows (filterService.java:7)
at com.example.wb.filterService.onCreate (filterService.java:75)
at android.app.ActivityThread.handleCreateService (ActivityThread.java:3953)
at android.app.ActivityThread.access$1500 (ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1875)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7356)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930)
I have Tomcat running on my machine with RDF4J server and RDF4J workbench deployed. I am trying to run a federated query to join two Native Java Stores (NativeStore1 and NativeStore2) and link data from them.
Right now, I am trying to get anything back from NativeStore2 from a query on NatvieStore1, but it is failing. I am running the federated query directly from the workbench. Regular queries work fine.
Is there a better way to do this, or am I just doing it wrong? Any help is very much appreciated.
My SPARQL query from NativeStore1:
select ?a ?b ?name
where
{
?a ?b ?name.
SERVICE <http://localhost:8080/rdf4j-server/repositories/NativeStore2> {
?a ?b ?name1.
}
}
Given error in RDF4j (this is a string of html that gets thrown out directly under the query box):
Apache Tomcat/7.0.77 - Error report HTTP Status 500 - Query evaluation error: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptiontype Status reportmessage Query evaluation error: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptiondescription The server encountered an internal error that prevented it from fulfilling this request.Apache Tomcat/7.0.77
RDF4J Server log:
Query evaluation errororg.eclipse.rdf4j.query.QueryEvaluationException: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptionCaused by: org.eclipse.rdf4j.query.QueryEvaluationException: java.lang.NullPointerExceptionCaused by: java.lang.NullPointerException: null
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:47)
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:19)
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:185)
at org.eclipse.rdf4j.common.iteration.QueueIteration.getNextElement(QueueIteration.java:133)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52)
at org.eclipse.rdf4j.query.algebra.evaluation.federation.JoinExecutorBase.getNextElement(JoinExecutorBase.java:122)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:90)
at org.eclipse.rdf4j.common.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:52)
at org.eclipse.rdf4j.common.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:68)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63)
at org.eclipse.rdf4j.sail.base.SailClosingIteration.hasNext(SailClosingIteration.java:89)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63)
at org.eclipse.rdf4j.sail.helpers.SailBaseIteration.hasNext(SailBaseIteration.java:48)
at org.eclipse.rdf4j.common.iteration.IterationWrapper.hasNext(IterationWrapper.java:63)
at org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:256)
at org.eclipse.rdf4j.http.server.repository.TupleQueryResultView.renderInternal(TupleQueryResultView.java:100)
at org.eclipse.rdf4j.http.server.repository.QueryResultView.render(QueryResultView.java:64)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:300)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:47)
at org.eclipse.rdf4j.http.client.QueueCursor.convert(QueueCursor.java:19)
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:185)
at org.eclipse.rdf4j.common.iteration.QueueIteration.handleClose(QueueIteration.java:172)
at org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration.close(AbstractCloseableIteration.java:51)
at org.eclipse.rdf4j.common.iteration.QueueIteration.checkException(QueueIteration.java:181)
... 48 common frames omitted
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.getService(StrictEvaluationStrategy.java:225)
at org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator.handleBindings(ServiceJoinIterator.java:68)
at org.eclipse.rdf4j.query.algebra.evaluation.federation.JoinExecutorBase.run(JoinExecutorBase.java:67)
at org.eclipse.rdf4j.query.algebra.evaluation.federation.ServiceJoinIterator.<init>(ServiceJoinIterator.java:45)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:911)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:881)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:240)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:783)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:673)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:237)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:706)
at org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategy.evaluate(StrictEvaluationStrategy.java:237)
at org.eclipse.rdf4j.sail.base.SailSourceConnection.evaluateInternal(SailSourceConnection.java:246)
at org.eclipse.rdf4j.sail.helpers.AbstractSailConnection.evaluate(AbstractSailConnection.java:267)
at org.eclipse.rdf4j.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:54)
at org.eclipse.rdf4j.http.server.repository.RepositoryController.handleRequestInternal(RepositoryController.java:208)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
... 30 common frames omitted
Issue should be fixed by rdf4j 2.2.2 see github https://github.com/eclipse/rdf4j/issues/812 and the issue reported by sethdippold https://github.com/eclipse/rdf4j/issues/824
I am trying to upload a huge file size[more than 5 gb] using struts1.2form file and apache.commons.fileupload 1.0. I saw that maximum limit for file upload in struts1 is 256M. Is there any way to change this?
I am getting the below exception.
org.apache.commons.fileupload.FileUploadBase$UnknownSizeException: the request was rejected because its size is unknown
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:305)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(CommonsMultipartRequestHandler.java:182)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:389)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
By default file size limit is 250MB. I have increased to 350MB. It works fine.
After that i have increased it to 10G and got the below exception.
Is it possible to upload a huge file using struts1.2? is there any other way to upload huge file?
configure the maximum limit in struts
controller
controller processorClass="your class" nocache="true" locale="true" contentType="text/html;charset=UTF-8" **maxFileSize="15G"/**
When you are using apache.commons.fileuploa-1.1 there is a constraint that FileUpload refuses parsing requests of unknown length. In the succeeding version stream has been introduced to overcome the size issue.
Below issues were reported in apache.commons.fileupload in 1.2 & 1.3
1. After uploading, temp file is not removed
2. Input stream is not closed which leads to memleak.
REF: refuses parsing request of unknown lenght
Memleak when stream is not closed.
Memleak
Hope it helps....
I have installed this man times now only to get the same issues. Upon clicking stats in the publisher / store i get referred to the wiki and in the carbon i get the errors below -
TID[-1234] [AM] [2014-07-01 15:42:26,892] ERROR
{org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject} - Error
while invoking APIUsageStatisticsClient for ProviderAPIUsage
org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.(APIUsageStatisticsClient.java:115)
org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_getFirstAccessTime(APIProviderHostObject.java:3937)
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)
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
org.jaggeryjs.rhino.publisher.modules.statistics.c1._c_getFirstAccessTime_14(/publisher/modules/statistics/usage.jag:382)
org.jaggeryjs.rhino.publisher.modules.statistics.c1.call(/publisher/modules/statistics/usage.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.statistics.c0._c_anonymous_14(/publisher/modules/statistics/module.jag:31)
org.jaggeryjs.rhino.publisher.modules.statistics.c0.call(/publisher/modules/statistics/module.jag)
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0._c_anonymous_1(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag:47)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag)
org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0._c_script_0(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag:4)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag)
org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.exec(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.jag)
org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
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:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
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:936)
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:744)
FOLLOWED BY
TID[-1234] [AM] [2014-07-01 15:42:26,985] ERROR
{JAGGERY.modules.statistics.usage:jag} -
java.lang.NullPointerException: null
Can any one help please?
Thanks,
Ash.
UPDATE -
After working out it is an issue with API-M reading the RDBMS (Thanks to Nadeesha), I have got this log from the API-M console after attempting to access the publisher stats
[2014-07-02 10:26:03,279] ERROR - APIProviderHostObject Error while
invoking APIUsageStatisticsClient for ProviderAPIUsage
org.wso2.carbon.apimgt.usage.client.exception.APIMgtUsageQueryServiceClientException:
Exception while instantiating API manager core objects
at org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.(APIUsageStatisticsClient.java:115)
at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_getFirstAccessTime(APIProviderHostObject.java:3937)
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:606)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.statistics.c1._c_getFirstAccessTime_14(/publisher/modules/statistics/usage.jag:382)
at org.jaggeryjs.rhino.publisher.modules.statistics.c1.call(/publisher/modules/statistics/usage.jag)
at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430)
at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269)
at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
at org.jaggeryjs.rhino.publisher.modules.statistics.c0._c_anonymous_14(/publisher/modules/statistics/module.jag:31)
at org.jaggeryjs.rhino.publisher.modules.statistics.c0.call(/publisher/modules/statistics/module.jag)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0._c_anonymous_1(/publisher/site/blocks/stats/api-subscriptions/aja
x/stats.jag:47)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.ja
g)
at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0._c_script_0(/publisher/site/blocks/stats/api-subscriptions/ajax/s
tats.jag:4)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.ja
g)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.call(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.ja
g)
at org.jaggeryjs.rhino.publisher.site.blocks.stats.api_subscriptions.ajax.c0.exec(/publisher/site/blocks/stats/api-subscriptions/ajax/stats.ja
g)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:570)
at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432)
at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)
at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744) Caused by: java.io.FileNotFoundException:
C:\WSO2AM~1.0\bin..\repository\conf\billing-conf.xml (The system
cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at java.io.FileInputStream.(FileInputStream.java:101)
at org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.(APIUsageStatisticsClient.java:106)
... 62 more [2014-07-02 10:26:03,404] ERROR - usage:jag java.lang.NullPointerException: null
There are few ways to debug whats going wrong. How API-M and BAM integration works is that
API -> publish stats to BAM
BAM stores the stats in Cassandra
BAM uses Hive scripts to analyse the data and write the results to a RDBMS mentioned in master-datasources.xml
I would recommend you to check the number 2. by checking if stats are published to BAM. You can do this by login into the management console of BAM and going to the Analytic section and adding the following script
select * from APIRequestData;
Execute this script and see if any data is returned. If no data is returned then data is not correctly published from API-M to BAM. If data is available here then there is an issue in reading the data from RDBMS to API-M.
Woohoo i fixed the problem! Thanks to Nadeesha for pointing out that API-M wasnt reading the RDBMS data properly (See here to check that - https://stackoverflow.com/a/24523906/84546)
I then found a mysterious billing-conf.xml not found message in the WSO2 console log, after a little research change the tag inside repository/conf/api-manager.xml from true to false
<!--
Enable/Disable Usage metering and billing for api usage
-->
<EnableBillingAndUsage>**false**</EnableBillingAndUsage>
Voila! It started to work!
Thanks,
Ash.