On 12/13/2010 11:56 AM, Ibrahim hammani wrote:
Hi,
I've create a new action that I called 'PDFForm' , when I try to display a
document using this action everything goes right except that XWiki displays
an error and warn in the console (see below).
For the warn, it happens cuz I used this code :
try {
fopFactory.setFontBaseURL(((Container)
Utils.getComponent(Container.class)).getApplicationContext()
.getResource("/WEB-INF/fonts/").getPath());
} catch (Throwable ex) {
log.warn("Starting with 1.5, XWiki uses the WEB-INF/fonts/
directory as the font directory, "
+ "and it should contain the FreeFont
(
http://savannah.gnu.org/projects/freefont/) fonts. "
+ "FOP cannot access this directory. If this is an upgrade
from a previous version, "
+ "make sure you also copy the WEB-INF/fonts directory from
the new distribution package.");
}
This code doesn't display warn with 'pdf'
action but with my new action.
You could log the exception stack trace (for debugging purpose) to see
what's the real problem, but the most efficient way is to do
http://dev.xwiki.org/xwiki/bin/view/Community/Debugging#HRemoteDebugging .
Hope this helps,
Marius
Can you tell me what i've missed please.
Thank you.
______________________________
- Error creating form bean of class com.nearbeePDFForm
java.lang.NullPointerException
at
org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java
:212)
at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:292)
at
org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:191)
at
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor
.java:331)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:202)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1166)
at
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1157)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilt
er.java:152)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1157)
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1157)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFi
lter(SavedRequestRestorerFilter.java:218)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1157)
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFi
lter(SetCharacterEncodingFilter.java:112)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler
.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerColl
ection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:11
4)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnectio
n.java:915)
at
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582
)
2010-12-13 10:35:28,153
[
http://localhost:8080/xwiki/bin/PDFForm/Sandbox/TestPage1] WARN
impl.PdfExportImpl - Starting with 1.5, XWiki uses the
WEB-INF/fonts/ directory as the font directory, and it should contain the
FreeFont (
http://savannah.gnu.org/projects/freefont/) fonts. FOP cannot
access this directory. If this is an upgrade from a previous version, make
sure you also copy the WEB-INF/fonts directory from the new distribution
package.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs