[JBoss JIRA] Created: (JBXB-209) Enum parsing requires value equal to type name
by Thomas Diesler (JIRA)
Enum parsing requires value equal to type name
----------------------------------------------
Key: JBXB-209
URL: https://jira.jboss.org/jira/browse/JBXB-209
Project: JBoss XML Binding (JBossXB)
Issue Type: Bug
Affects Versions: JBossXB-2.0.1.GA
Reporter: Thomas Diesler
Caused by: java.lang.RuntimeException: Invalid value mandatory valid are [MANDATORY, OPTIONAL]
at org.jboss.xb.builder.runtime.EnumValueAdapter.cast(EnumValueAdapter.java:136)
at org.jboss.xb.builder.runtime.AbstractPropertyHandler.attribute(AbstractPropertyHandler.java:115)
at org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler.attributes(AttributesHandler.java:51)
at org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.attributes(DefaultElementHandler.java:65)
at org.jboss.xb.builder.runtime.BeanHandler.startParticle(BeanHandler.java:124)
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:630)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
public enum TAvailability
{
MANDATORY("mandatory"),
OPTIONAL("optional");
private final String value;
TAvailability(String v)
{
value = v;
}
public String value()
{
return value;
}
public static TAvailability fromValue(String v)
{
for (TAvailability c : TAvailability.values())
{
if (c.value.equals(v))
{
return c;
}
}
throw new IllegalArgumentException(v);
}
}
--
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
12 years, 11 months
[JBoss JIRA] Created: (JBXB-201) Cannot parse schema/jbxb_1_0.xsd
by Thomas Diesler (JIRA)
Cannot parse schema/jbxb_1_0.xsd
--------------------------------
Key: JBXB-201
URL: https://jira.jboss.org/jira/browse/JBXB-201
Project: JBoss XML Binding (JBossXB)
Issue Type: Bug
Reporter: Thomas Diesler
This code
String jbxbSchema = "schema/jbxb_1_0.xsd";
URL jbxbXSD = context.getBundle().getResource(jbxbSchema);
if (jbxbXSD == null)
throw new IllegalStateException("Cannot find: " + jbxbSchema);
XSModel xsModel = Util.loadSchema(jbxbXSD.toExternalForm(), (SchemaBindingResolver)null);
if (xsModel == null)
throw new IllegalStateException("Cannot load schema: " + jbxbSchema);
fails with
Caused by: org.jboss.xb.binding.JBossXBRuntimeException: -1:-1 94:47 src-element.3: Element 'class' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
at org.jboss.xb.binding.sunday.unmarshalling.XsdBinderTerminatingErrorHandler.handleError(XsdBinderTerminatingErrorHandler.java:40)
at org.apache.xerces.impl.xs.XMLSchemaLoader.reportDOMFatalError(Unknown Source)
at org.apache.xerces.impl.xs.XSLoaderImpl.loadURI(Unknown Source)
at org.jboss.xb.binding.Util.loadSchema(Util.java:367)
--
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
12 years, 11 months
[JBoss JIRA] Created: (JBXB-202) Incosistent initialization of XSImplementation
by Thomas Diesler (JIRA)
Incosistent initialization of XSImplementation
----------------------------------------------
Key: JBXB-202
URL: https://jira.jboss.org/jira/browse/JBXB-202
Project: JBoss XML Binding (JBossXB)
Issue Type: Bug
Reporter: Thomas Diesler
Fix For: JBossXB-2.0.1.GA
In Util there is
private static XSImplementation xsImpl;
which gets initialized lazily in
public static XSModel loadSchema(String xsdURL, SchemaBindingResolver schemaResolver)
{
if(xsImpl == null)
{
xsImpl = getXSImplementation();
}
All other loadSchema method do not reuse the static property
Also,
private static XSImplementation getXSImplementation()
relies on the thread context classloader, which is not available in an OSGi environment.
Could you please provide an JBossXB initialization entry point that is public and does not make an assumption on the availability of the TCCL
--
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
12 years, 11 months