I am in a distress on getting the solution to this problem. I have an ADF 11.1.2.3 Fusion application, on which i've set some inputUpload components that are use to upload documents of images. Everything seems to work pretty well while deployed in ADF's integrated application server (WebLogic). But when i go on production (i.e. the app is deployed on Glassfish 3.1.2), it generates some really weird errors like follows:
org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl beginRequest
SEVERE:
java.io.EOFException
at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler._readLine(MultipartFormHandler.java:252)
at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler._readLine(MultipartFormHandler.java:236)
at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler._skipBoundary(MultipartFormHandler.java:222)
at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler.<init>(MultipartFormHandler.java:101)
at org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler.<init>(MultipartFormHandler.java:74)
at org.apache.myfaces.trinidadinternal.config.upload.FileUploadConfiguratorImpl.beginRequest(FileUploadConfiguratorImpl.java:107)
at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._startConfiguratorServiceRequest(GlobalConfiguratorImpl.java:469)
at org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.beginRequest(GlobalConfiguratorImpl.java:206)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:124)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:80)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:331)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)
This happens each time i try to upload smthg and only on Glassfish. It seems like the error is linked to the file size, but i've already set up the required configuration and the files are really small. Please help.
It is a bug on that the version of Glassfish server you are using. Check this listed bugs for reference: TRINIDAD-10033
&& GLASSFISH-18446. You have just to upgrade from 3.1.2 to 3.1.2.2 as it is fixed on the later.
Related
When trying to create an MUnit test in Anypoint Studio by right clicking on a flow then selecting 'Create new text.xml Suite' I see the following dialog appear:
This has the disadvantage of not offering any stack trace to follow, however, looking in the error log i can see the following stack trace.
java.lang.NullPointerException
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1003)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:972)
at org.apache.velocity.runtime.RuntimeSingleton.parse(RuntimeSingleton.java:265)
at org.apache.velocity.app.Velocity.evaluate(Velocity.java:274)
at org.mule.tooling.ui.contribution.munit.MunitResourceUtils.createXMLConfigurationFromTemplate(MunitResourceUtils.java:214)
at org.mule.tooling.ui.contribution.munit.actions.CreateTestSuiteAction.createMunitFile(CreateTestSuiteAction.java:86)
at org.mule.tooling.ui.contribution.munit.actions.CreateTestSuiteAction.createAndOpenMunitFile(CreateTestSuiteAction.java:73)
at org.mule.tooling.ui.contribution.munit.actions.CreateTestSuiteAction.doRun(CreateTestSuiteAction.java:59)
at org.mule.tooling.ui.contribution.munit.actions.AbstractFlowEditorMunitAction.run(AbstractFlowEditorMunitAction.java:105)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
I am using MUnit version 1.4.3, Anypoint Studio version 6.2.5 and java 1.8.0_131
Has anyone else faced this who is able to suggest a solution?
Could you please verify that you have maven correctly install and working ?
Also, can you check that you have munit plugin install in Anypoint Studio ? Check Help Menu >> installation details >> search for munit anypoint studio plugin
Go to Anypoint Navigation bar
->Help
->Install New Softwares
->Work with - Munit Update Sites
->Install All updates
It will work after that.
I've have similar issues in the past. My solution as suggested by MuleSoft support was to:
Please, try to create a new workspace, since the workspaces sometimes may get corrupted and produce some weird errors.
I had similar issue. I installed Munit from below plugin URL
Mule 3 installation plugin URL - http://studio.mulesoft.org/r6/munit
It worked fine after installation.
Mule 4 user can use - http://studio.mulesoft.org/s4/munit
I am trying to run the following query on Sesame:
PREFIX dbp-ontology: <http://dbpedia.org/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbpedia-owl: <http://dbpedia.org/owl/>
PREFIX dbpedia-prop: <http://dbpedia.org/property/>
select ?country ?capital
where{
SERVICE <http://factforge.net/sparql>{
?country a dbp-ontology:Country .
?country dbpedia-prop:capital ?capital .
}
} LIMIT 100
The query gets successfully executed on one computer where I have Sesame installed. On another computer, Sesame reports the following error:
Query evaluation error: org.openrdf.query.QueryEvaluationException: Failed to get server protocol; no such resource on this server: http://factforge.net/sparql?queryLn=SPARQL&query=PREFIX+dbp-ontology%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E+PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E+PREFIX+dbpedia-owl%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fowl%2F%3E+PREFIX+dbpedia-prop%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E+PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+PREFIX+sesame%3A+%3Chttp%3A%2F%2Fwww.openrdf.org%2Fschema%2Fsesame%23%3E+PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E+PREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E+PREFIX+fn%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23%3E+SELECT++%3Fcountry+WHERE+%7B+%3Fcountry+a+dbp-ontology%3ACountry+.+%7D&infer=true
What is causing this? How can it be resolved? The hyperlink above actually displays the results of the query in a browser.
UPDATE: All this is for the computer where the connection with FactForge cannot be established:
I am using 2.7.16
Executing the query via the workbench
Following is from the log file named tomcat8-stderr:
31-Jul-2015 15:15:37.717 WARNING [http-nio-8080-exec-3] org.openrdf.http.client.HTTPClient.getErrorInfo Server reports problem: Query evaluation error: org.openrdf.query.QueryEvaluationException:
31-Jul-2015 15:15:37.718 WARNING [http-nio-8080-exec-3] org.openrdf.workbench.commands.QueryServlet.handleStandardBrowserRequest org.openrdf.repository.http.HTTPQueryEvaluationException: Query evaluation error: org.openrdf.query.QueryEvaluationException:
org.openrdf.repository.http.HTTPQueryEvaluationException: Query evaluation error: org.openrdf.query.QueryEvaluationException:
at org.openrdf.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:59)
at org.openrdf.workbench.util.QueryEvaluator.evaluateTupleQuery(QueryEvaluator.java:152)
at org.openrdf.workbench.util.QueryEvaluator.evaluate(QueryEvaluator.java:287)
at org.openrdf.workbench.util.QueryEvaluator.extractQueryAndEvaluate(QueryEvaluator.java:120)
at org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:382)
at org.openrdf.workbench.commands.QueryServlet.handleStandardBrowserRequest(QueryServlet.java:216)
at org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:206)
at org.openrdf.workbench.base.TransformationServlet.service(TransformationServlet.java:109)
at org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:163)
at org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:142)
at org.openrdf.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:104)
at org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:222)
at org.openrdf.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:151)
at org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:119)
at org.openrdf.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:131)
at org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:142)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openrdf.workbench.proxy.CacheFilter.doFilter(CacheFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.openrdf.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
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)
Caused by: org.openrdf.repository.RepositoryException: Query evaluation error: org.openrdf.query.QueryEvaluationException:
at org.openrdf.http.client.HTTPClient.handleHTTPError(HTTPClient.java:953)
at org.openrdf.http.client.HTTPClient.sendTupleQueryViaHttp(HTTPClient.java:718)
at org.openrdf.http.client.HTTPClient.getBackgroundTupleQueryResult(HTTPClient.java:602)
at org.openrdf.http.client.HTTPClient.sendTupleQuery(HTTPClient.java:367)
at org.openrdf.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:53)
... 42 more
This is a repeatable issue
There are two differences between the computers:
Functional Sesame Computer - Windows 8, The folder path where Sesame data is stored is visible in the 'About' page
Sub-functional Sesame Computer - Windows 7. Folder path is not mentioned.
Solved the issue by reinstalling everything starting from jre. There were two versions of jre on the computer and I guess reinstalling just one after removing the previous ones did the trick. Along with jre (i.e., as a component of the Java SE package), I also reinstalled Tomcat and Sesame.
I'am trying to install worklight server in the production server. I'am using :
Worklight V.6.0
WAS ND 8.5.5.2
DB2 10.1.0.2
I have managed to install AppCenter and accessed it. I've run the 'database' and 'install' ant task from 'configure-wasnd-server-db2.xml'.
But when I deployed app to the server and tried to access the Worklight console, I got this following error :
8/20/14 10:43:32:721 WIT] 00000099 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[8/20/14 10:43:32:722 WIT] 00000099 webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletNameNotFound]: java.lang.NullPointerException
at com.worklight.core.auth.impl.AuthenticationContext.getOrCreateAuthenticationContext(AuthenticationContext.java:99)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:119)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
Can anyone help me? Thanks in advance.
UPDATE:
I cannot find 'adminstall' and 'admdatabases' ant task from the 'configure-wasnd-server-db2.xml'. Do I need these files? Will it cause error if I don't run it? If yes, where can I find these files?
Per this support document, the following are possible reasons for this issue:
Incorrect deployment of project runtime (.war file), for example invalid datasource configuration
Suggestion:
Update to the latest available iFix of Worklight 6.0.0.x
Follow the runtime deployment instructions
I have four virtual servers that were all cloned from an original system. I have installed javamelody on all four but on two of them, the graphs do not appear in the monitoring pages. Other images show fine. I get the following error on both servers that are not working correctly.
I have found the suggestions to add: -Djava.awt.headless=true but the two servers that are working correctly do not have this in place. Any suggestions?
Here is the Stack Trace of the error:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)
at org.jrobin.graph.ImageWorker.resize(Unknown Source)
at org.jrobin.graph.ImageWorker.<init>(Unknown Source)
at org.jrobin.graph.RrdGraph.<init>(Unknown Source)
at net.bull.javamelody.JRobin.graph(JRobin.java:217)
at net.bull.javamelody.MonitoringController.doGraph(MonitoringController.java:342)
at net.bull.javamelody.MonitoringController.doReport(MonitoringController.java:168)
at net.bull.javamelody.MonitoringController.doActionIfNeededAndReport(MonitoringController.java:141)
at net.bull.javamelody.MonitoringFilter.doMonitoring(MonitoringFilter.java:340)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:170)
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:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)`
I'm deploying my Rails 3 application to a Tomcat 6 server. I've been using warble to package my project up into a war file and so far have not had any troubles, until now. I just added a cache_sweeper to my application. When I tried hitting the application, I received the standard 500 error page.
Looking at my logs, I saw this:
org.jruby.rack.RackInitializationException: undefined method `cache_sweeper' for ApplicationController:Class
It can't find the cache_sweeper method? Isn't that part of Rails?
This doesn't happen while in development mode, though in development I'm using MRI ruby and using the rails server instead.
Anyone have any ideas?!
Full error:
SEVERE: Application Error
org.jruby.rack.RackInitializationException: undefined method `cache_sweeper' for ApplicationController:Class
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/app/controllers/application_controller.rb:239:in `require'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:227:in `load_dependency'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:346:in `require_or_load'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:491:in `load_missing_constant'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
from C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:181:in `each'
... 39 levels...
from file:/C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/lib/jruby-rack-1.0.3.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in `initialize'
from <script>:2:in `new'
from <script>:2
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:184)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:59)
at org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:94)
at org.jruby.rack.servlet.DefaultServletDispatcher.process(DefaultServletDispatcher.java:36)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:59)
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:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:619)
For whatever reason, you have to include the module when using jruby/warble. However, this step is not necessary when using MRI and the rails server.
I added this to my ApplicationController and it worked:
class ApplicationController < ActionController::Base
include ActionController::Caching::Sweeping if defined?(JRUBY_VERSION)
...
end