Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.JBossXBRuntimeException


            null
         );
      }
      catch(JBossXBException e)
      {
         throw new JBossXBRuntimeException("Failed to parse annotation string: " + annotation + ": " + e.getMessage(),
            e
         );
      }
   }
View Full Code Here


            }
         }

         if(javaType == null)
         {
            throw new JBossXBRuntimeException("Failed to bind element " +
               name +
               " to any non-abstract Java type. Parent is " +
               parentType +
               ", field is " +
               fieldType
View Full Code Here

            {
               javaType = Thread.currentThread().getContextClassLoader().loadClass(elBasedClsName);
            }
            catch(ClassNotFoundException e1)
            {
               throw new JBossXBRuntimeException("Failed to bind element " +
                  name +
                  " using XSD type (" +
                  typeBasedClsName +
                  ") and element name (" +
                  elBasedClsName +
View Full Code Here

               break;
            case FieldGroupBinding.CHOICE:
               ((FieldGroupChoiceBindingImpl)group).bindGroup(subgroup);
               break;
            case FieldGroupBinding.FIELD:
               throw new JBossXBRuntimeException("Field binding can't contain nested field groups!");
            default:
               throw new JBossXBRuntimeException("Unexpected field group category: " + group.getCategory());
         }
      }
View Full Code Here

               field = ownerClass.getField(fieldName);
               fieldType = field.getType();
            }
            catch(NoSuchFieldException e)
            {
               throw new JBossXBRuntimeException(
                  "Failed to bind field " + fieldName + " in " + owner + ": neither field nor getter were found."
               );
            }
         }
View Full Code Here

   public AttributeBinding(SchemaBinding schema, QName qName, TypeBinding type, AttributeHandler handler)
   {
      if(qName == null)
      {
         throw new JBossXBRuntimeException("Each attribute should have a non-null QName!");
      }

      if(type == null || !type.isSimple() && type.getValueAdapter() == ValueAdapter.NOOP)
         throw new JBossXBRuntimeException("The type of the attribute " + qName +
            " must be simple or complex with a value adapter: " + type);
     
      this.schema = schema;
      this.qName = qName;
      this.type = type;
View Full Code Here

            {
               domBuilder = factory.newDocumentBuilder();
            }
            catch(ParserConfigurationException e)
            {
               throw new JBossXBRuntimeException("Failed to create document builder instance", e);
            }
            doc = domBuilder.newDocument();
         }
         return doc;
      }
View Full Code Here

               {
                  Dom2Sax.dom2sax(e, ch);
               }
               catch (SAXException e1)
               {
                  throw new JBossXBRuntimeException("Failed to SAX the DOM");
               }
            }
         }
      );
   }
View Full Code Here

                  ch.endElement(null, ge.getLocalName(), ge.getLocalName());
               }
               catch(Exception e)
               {
                  throw new JBossXBRuntimeException(e);
               }
            }
         }
      );
   }
View Full Code Here

               {
               }

               public void error(SAXParseException e)
               {
                  throw new JBossXBRuntimeException("Error", e);
               }

               public void fatalError(SAXParseException e)
               {
                  throw new JBossXBRuntimeException("Fatal error", e);
               }

               public InputSource resolveEntity(String publicId, String systemId)
               {
                  if(resolver != null)
                  {
                     try
                     {
                        return resolver.resolveEntity(publicId, systemId);
                     }
                     catch(Exception e)
                     {
                        throw new IllegalStateException("Failed to resolveEntity " + systemId + ": " + systemId);
                     }
                  }
                  else
                  {
                     return new InputSource(new StringReader(xsd));
                  }
               }
            }
         );
      }
      catch(Exception e)
      {
         throw new JBossXBRuntimeException("Parsing failed.", e);
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.JBossXBRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.