manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CONNECTORS-564) Velocity is apparently trying to write to velocity.log, which is not correct
Date Tue, 06 Nov 2012 08:36:12 GMT

     [ https://issues.apache.org/jira/browse/CONNECTORS-564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Karl Wright updated CONNECTORS-564:
-----------------------------------

    Attachment: CONNECTORS-564.patch
    
> Velocity is apparently trying to write to velocity.log, which is not correct
> ----------------------------------------------------------------------------
>
>                 Key: CONNECTORS-564
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-564
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Framework core
>    Affects Versions: ManifoldCF 0.6, ManifoldCF 1.0, ManifoldCF 1.0.1
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 1.1
>
>         Attachments: CONNECTORS-564.patch
>
>
> When running under tomcat, Velocity apparently tries to create a velocity.log file under
the current working directory, and does NOT use the ManifoldCF logging.ini file.  Here's the
stack trace.
> {code}
> HTTP Status 500 -
> type Exception report
> message
> description The server encountered an internal error () that prevented it from fulfilling
this request.
> exception
> org.apache.jasper.JasperException: org.apache.jasper.JasperException: java.lang.RuntimeException:
Velocity could not be initialized!
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> org.apache.jasper.JasperException: java.lang.RuntimeException: Velocity could not be
initialized!
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> java.lang.RuntimeException: Velocity could not be initialized!
> org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:307)
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1531)
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
> org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:158)
> org.apache.manifoldcf.authorities.authorities.activedirectory.Messages.outputResourceWithVelocity(Messages.java:136)
> org.apache.manifoldcf.authorities.authorities.activedirectory.ActiveDirectoryAuthority.outputConfigurationHeader(ActiveDirectoryAuthority.java:467)
> org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.outputConfigurationHeader(AuthorityConnectorFactory.java:78)
> org.apache.jsp.editauthority_jsp._jspService(editauthority_jsp.java:434)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize
an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
> org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:875)
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
> org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:302)
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1531)
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
> org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:158)
> org.apache.manifoldcf.authorities.authorities.activedirectory.Messages.outputResourceWithVelocity(Messages.java:136)
> org.apache.manifoldcf.authorities.authorities.activedirectory.ActiveDirectoryAuthority.outputConfigurationHeader(ActiveDirectoryAuthority.java:467)
> org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.outputConfigurationHeader(AuthorityConnectorFactory.java:78)
> org.apache.jsp.editauthority_jsp._jspService(editauthority_jsp.java:434)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> org.apache.velocity.exception.VelocityException: Failed to initialize an instance of
org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
> org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:220)
> org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269)
> org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871)
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
> org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:302)
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1531)
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
> org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:158)
> org.apache.manifoldcf.authorities.authorities.activedirectory.Messages.outputResourceWithVelocity(Messages.java:136)
> org.apache.manifoldcf.authorities.authorities.activedirectory.ActiveDirectoryAuthority.outputConfigurationHeader(ActiveDirectoryAuthority.java:467)
> org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.outputConfigurationHeader(AuthorityConnectorFactory.java:78)
> org.apache.jsp.editauthority_jsp._jspService(editauthority_jsp.java:434)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> java.lang.RuntimeException: Error configuring Log4JLogChute : 
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
> org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
> org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
> org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
> org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
> org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269)
> org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871)
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
> org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:302)
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1531)
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
> org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:158)
> org.apache.manifoldcf.authorities.authorities.activedirectory.Messages.outputResourceWithVelocity(Messages.java:136)
> org.apache.manifoldcf.authorities.authorities.activedirectory.ActiveDirectoryAuthority.outputConfigurationHeader(ActiveDirectoryAuthority.java:467)
> org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.outputConfigurationHeader(AuthorityConnectorFactory.java:78)
> org.apache.jsp.editauthority_jsp._jspService(editauthority_jsp.java:434)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause
> java.io.FileNotFoundException: velocity.log (Permission denied)
> java.io.FileOutputStream.openAppend(Native Method)
> java.io.FileOutputStream.<init>(FileOutputStream.java:192)
> java.io.FileOutputStream.<init>(FileOutputStream.java:116)
> org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
> org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
> org.apache.log4j.FileAppender.<init>(FileAppender.java:110)
> org.apache.log4j.RollingFileAppender.<init>(RollingFileAppender.java:79)
> org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
> org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
> org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
> org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269)
> org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871)
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
> org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:302)
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1531)
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:343)
> org.apache.manifoldcf.ui.i18n.Messages.outputResourceWithVelocity(Messages.java:158)
> org.apache.manifoldcf.authorities.authorities.activedirectory.Messages.outputResourceWithVelocity(Messages.java:136)
> org.apache.manifoldcf.authorities.authorities.activedirectory.ActiveDirectoryAuthority.outputConfigurationHeader(ActiveDirectoryAuthority.java:467)
> org.apache.manifoldcf.authorities.interfaces.AuthorityConnectorFactory.outputConfigurationHeader(AuthorityConnectorFactory.java:78)
> org.apache.jsp.editauthority_jsp._jspService(editauthority_jsp.java:434)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
> org.apache.jsp.execute_jsp._jspService(execute_jsp.java:548)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> {code}
> According to Velocity documentation, the fact that Log4JLogChute is in the trace means
that it correctly discovered the log4j logger and is using that: http://velocity.apache.org/engine/devel/developer-guide.html#Configuring_Logging
> The problem is that although it is using our logger, it seems to be overriding the output
file!!  The logging.ini typically says to log to logs/manifoldcf.log, but velocity output
goes to velocity.log, which is in the wrong directory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message