[jboss-jira] [JBoss JIRA] Assigned: (JBMETA-259) Metadata creation for a servlet with empty load-on-startup value fails with exception

jaikiran pai (JIRA) jira-events at lists.jboss.org
Mon Mar 1 05:08:16 EST 2010


     [ https://jira.jboss.org/jira/browse/JBMETA-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jaikiran pai reassigned JBMETA-259:
-----------------------------------

    Assignee: Remy Maucherat  (was: Alexey Loubyansky)


Assigning to Remy, since he looks into web metadata these days.


> Metadata creation for a servlet with empty load-on-startup value fails with exception
> -------------------------------------------------------------------------------------
>
>                 Key: JBMETA-259
>                 URL: https://jira.jboss.org/jira/browse/JBMETA-259
>             Project: JBoss Metadata
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: web
>            Reporter: jaikiran pai
>            Assignee: Remy Maucherat
>         Attachments: load-on-startup-testcase.patch
>
>
> A web.xml (2.5 version of web-app) with the following empty load-on-startup fails with exception during metadata creation:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5"
>    xmlns="http://java.sun.com/xml/ns/javaee"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>    
>     
>     
>    <servlet>
>       <servlet-name>EmptyLoadOnStartup</servlet-name>
>       <servlet-class>dummyclass</servlet-class>
>       <load-on-startup/>
>    </servlet>
> ...
> The exception reported is:
> Caused by: java.lang.RuntimeException: QName {http://java.sun.com/xml/ns/javaee}load-on-startup error setting property loadOnStartup with value  to org.jboss.metadata.web.spec.ServletMetaData at 8032804
> 	at org.jboss.xb.builder.runtime.PropertyHandler.handle(PropertyHandler.java:65)
> 	at org.jboss.xb.builder.runtime.AbstractPropertyHandler.doHandle(AbstractPropertyHandler.java:98)
> 	at org.jboss.xb.builder.runtime.BeanHandler.setParent(BeanHandler.java:207)
> 	at org.jboss.xb.builder.runtime.BuilderParticleHandler.setParent(BuilderParticleHandler.java:80)
> 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.setParent(SundayContentHandler.java:1331)
> 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:1230)
> 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:236)
> 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:373)
> 	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
> 	at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> 	at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
> 	... 30 more
> Caused by: java.lang.IllegalArgumentException: Wrong arguments. setLoadOnStartup for target org.jboss.metadata.web.spec.ServletMetaData at 1682a53 expected=[int] actual=[java.lang.String]
> 	at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
> 	at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:69)
> 	at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
> 	at org.jboss.beans.info.plugins.DefaultPropertyInfo.set(DefaultPropertyInfo.java:143)
> 	at org.jboss.xb.spi.AbstractBeanAdapter.set(AbstractBeanAdapter.java:95)
> 	at org.jboss.xb.builder.runtime.PropertyHandler.handle(PropertyHandler.java:61)
> 	... 50 more
> More details about the exception are in the referenced forum thread.
> Also attached is a testcase (against the current metadata/web/trunk) which shows this bug.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list