[mayaa-user:743] JSP 2.1 のカスタムタグ使用時の例外について
BABA,Yasuyuki
[E-MAIL ADDRESS DELETED]
2009年 1月 30日 (金) 15:42:06 JST
馬場です。
以下のような JSP2.1 仕様の TLD を含む jar ファイルをもつアプリケーション
に Mayaa の jar ファイルを追加すると、アプリケーションサーバー起動時に例
外のスタックトレースがログに記録されます(メールの末尾をご参照ください)。
<taglib xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
web-jsptaglibrary_2_1.xsd"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.1">
〜中略〜
</taglib>
ここで例外が出るカスタムタグは Mayaa からは使用できませんでした。
Mayaa が JSP 2.1 のスキーマを持っていないからだとは思うのですが、JSP 2.1
のタグを Mayaa から使えるようにする、または、例外が表示されないようにす
る、などできないでしょうか?
また、JSF の実装をもつアプリケーションサーバーでは同様の現象が発生するこ
とがありました。(参考: http://d.hatena.ne.jp/shin/20090113)
以下、起動時のログです。
INFO 2009-01-29 20:34:25,116 [main] init start
INFO 2009-01-29 20:34:25,124 [main] prepareLibraries start
INFO 2009-01-29 20:34:25,149 [main] marshall factory:
/org.seasar.mayaa.provider.ProviderFactory
WARN 2009-01-29 20:34:25,902 [main] Entity not resolved locally,
publicId=null, systemId=file:///META-INF/web-jsptaglibrary_2_1.xsd
WARN 2009-01-29 20:34:25,916 [main] schema_reference.4: Failed to read
schema document 'web-jsptaglibrary_2_1.xsd', because 1) could not find
the document; 2) the document could not be read; 3) the root element of
the document is not <xsd:schema>.
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema
document 'web-jsptaglibrary_2_1.xsd', because 1) could not find the
document; 2) the document could not be read; 3) the root element of the
document is not <xsd:schema>.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown
Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown
Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown
Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.seasar.mayaa.impl.util.XMLUtil.parse(XMLUtil.java:49)
at
org.seasar.mayaa.impl.builder.library.TLDDefinitionBuilder.build(TLDDefinitionBuilder.java:53)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.buildAll(LibraryManagerImpl.java:158)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.prepareLibraries(LibraryManagerImpl.java:143)
at org.seasar.mayaa.impl.MayaaServlet.init(MayaaServlet.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
ERROR 2009-01-29 20:34:25,918 [main] cvc-elt.1: Cannot find the
declaration of element 'taglib'.
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
element 'taglib'.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.seasar.mayaa.impl.util.XMLUtil.parse(XMLUtil.java:49)
at
org.seasar.mayaa.impl.builder.library.TLDDefinitionBuilder.build(TLDDefinitionBuilder.java:53)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.buildAll(LibraryManagerImpl.java:158)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.prepareLibraries(LibraryManagerImpl.java:143)
at org.seasar.mayaa.impl.MayaaServlet.init(MayaaServlet.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
ERROR 2009-01-29 20:34:25,919 [main] TLD parse error on
/META-INF/cubby-tags.tld
java.lang.RuntimeException: org.xml.sax.SAXParseException: cvc-elt.1:
Cannot find the declaration of element 'taglib'.
at org.seasar.mayaa.impl.util.xml.XMLHandler.error(XMLHandler.java:162)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown
Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.seasar.mayaa.impl.util.XMLUtil.parse(XMLUtil.java:49)
at
org.seasar.mayaa.impl.builder.library.TLDDefinitionBuilder.build(TLDDefinitionBuilder.java:53)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.buildAll(LibraryManagerImpl.java:158)
at
org.seasar.mayaa.impl.builder.library.LibraryManagerImpl.prepareLibraries(LibraryManagerImpl.java:143)
at org.seasar.mayaa.impl.MayaaServlet.init(MayaaServlet.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'taglib'.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
... 36 more
INFO 2009-01-29 20:34:26,214 [main] loaded library -
/META-INF/cubby-functions.tld - http://www.seasar.org/cubby/functions
--
BABA,Yasuyuki
[E-MAIL ADDRESS DELETED]
mayaa-user メーリングリストの案内