Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JiBX Unmarshalling - No enum Const error
JiBX Unmarshalling - No enum Const error [message #534261] Tue, 18 May 2010 14:06
Bill  is currently offline Bill Friend
Messages: 5
Registered: March 2010
Junior Member
Im confused. I have 2 different enumerations in my xsd. For some reason when unmarshalling 1 of them it doesn't work. And i get the valueOf error with No enum const class.

java.lang.IllegalArgumentException: No enum const class com.soa.empiorg.HierarchyRequest$Hierarchy Type.immediate
at java.lang.Enum.valueOf(
at com.soa.empiorg.HierarchyRequest$Hierarchy Type.valueOf(

   public static enum HierarchyType { 
        EXTENDED("extended"), IMMEDIATE("immediate"); 
        private final String value; 

        private HierarchyType(String value) { 
            this.value = value; 

        public String toString() { 
            return value; 

        public static HierarchyType convert(String value) { 
            for (HierarchyType inst : values()) { 
                if (inst.toString().equals(value)) { 
                    return inst; 
            return null; 

<xs:attribute name="hierarchyType"> 
        <xs:restriction base="xs:string"> 
           <xs:enumeration value="extended"/> 
           <xs:enumeration value="immediate"/> 

Input XML:
<?xml version="1.0" encoding="iso-8859-1"?> 
<EMPIORG:HierarchyRequest xmlns:EMPIORG="http://x/EMPIOrg" relTypeNumber="1" hierarchyType="immediate"> 
        <EMPIORG:Header sending="Cesar"/> 

[Updated on: Tue, 18 May 2010 14:06]

Report message to a moderator

Previous Topic:'Updating JSP Index' has encountered a problem.
Next Topic:Updating a struts.xml page
Goto Forum:

Current Time: Tue Mar 09 05:07:27 GMT 2021

Powered by FUDForum. Page generated in 0.03573 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top