java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory;

Hibernate JIRA | Sam Duke | 2 years ago
  1. 0

    As {{XmlParserHelper}} is always loaded, also if actually there is no XML configuration, a {{NoClassDefFoundError}} is raised on Android, which does not have the {{javax.xml.stream.*}} package. Stacktrace: {code} 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory; 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.xml.XmlParserHelper.<init>(XmlParserHelper.java:66) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.xml.ValidationXmlParser.<init>(ValidationXmlParser.java:60) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration(ConfigurationImpl.java:287) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:361) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:214) {code} Java setup: {code} validator = Validation.byProvider(HibernateValidator.class).providerResolver(new ValidationProviderResolver() { @Override public List<ValidationProvider<?>> getValidationProviders() { List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>(); list.add(new HibernateValidator()); return list; } }).configure().buildValidatorFactory().getValidator(); {code} Gradle setup: {code} compile 'org.hibernate:hibernate-validator:5.1.3.Final' compile 'javax.el:javax.el-api:2.2.4' compile 'org.glassfish.web:javax.el:2.2.4' {code}

    Hibernate JIRA | 2 years ago | Sam Duke
    java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory;
  2. 0

    As {{XmlParserHelper}} is always loaded, also if actually there is no XML configuration, a {{NoClassDefFoundError}} is raised on Android, which does not have the {{javax.xml.stream.*}} package. Stacktrace: {code} 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory; 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.xml.XmlParserHelper.<init>(XmlParserHelper.java:66) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.xml.ValidationXmlParser.<init>(ValidationXmlParser.java:60) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration(ConfigurationImpl.java:287) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:361) 02-19 12:19:40.202 6120-6120/com.myapp W/System.err﹕ at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:214) {code} Java setup: {code} validator = Validation.byProvider(HibernateValidator.class).providerResolver(new ValidationProviderResolver() { @Override public List<ValidationProvider<?>> getValidationProviders() { List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>(); list.add(new HibernateValidator()); return list; } }).configure().buildValidatorFactory().getValidator(); {code} Gradle setup: {code} compile 'org.hibernate:hibernate-validator:5.1.3.Final' compile 'javax.el:javax.el-api:2.2.4' compile 'org.glassfish.web:javax.el:2.2.4' {code}

    Hibernate JIRA | 2 years ago | Sam Duke
    java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory;
  3. 0

    ERROR : java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory;

    Stack Overflow | 9 months ago | LeaPwr
    java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLInputFactory;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to read xlsx file in Apache POI in Android/Java

    Stack Overflow | 2 years ago | user
    java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLEventFactory;
  6. 0

    Android POI : Can't read a xlsx file using apache poi getting ClassNotFoundException

    Stack Overflow | 7 months ago | Paul Lemesnager
    java.lang.RuntimeException: An error occured while executing doInBackground()

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      Failed resolution of: Ljavax/xml/stream/XMLInputFactory;

      at org.hibernate.validator.internal.xml.XmlParserHelper.<init>()
    2. Hibernate Validator Engine
      ConfigurationImpl.buildValidatorFactory
      1. org.hibernate.validator.internal.xml.XmlParserHelper.<init>(XmlParserHelper.java:66)
      2. org.hibernate.validator.internal.xml.ValidationXmlParser.<init>(ValidationXmlParser.java:60)
      3. org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration(ConfigurationImpl.java:287)
      4. org.hibernate.validator.internal.engine.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:361)
      5. org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:214)
      5 frames