# Help - Entity mappings suddenly failing xsd validation

**URL:** <https://discourse.hibernate.org/t/help-entity-mappings-suddenly-failing-xsd-validation/2881>\
**Category:** Hibernate ORM\
**Created:** [June 22, 2019, 9:13pm UTC](https://discourse.hibernate.org/t/help-entity-mappings-suddenly-failing-xsd-validation/2881 "2019-06-22T21:13:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwhite](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@cwhite](https://discourse.hibernate.org/u/cwhite)\
**Post date:** [June 22, 2019, 9:13pm UTC](https://discourse.hibernate.org/t/help-entity-mappings-suddenly-failing-xsd-validation/2881/1 "2019-06-22T21:13:30Z")

</div>

Hi, we have a legacy app that just recently can’t start because it’s referencing an internet xsd file, and it doesn’t seem happy about it now for some reason.

If I download the xsd and place it in a local file, and reference it by full path it works.  
Is there a way to include the xsd file in my jar (with the hbm.xml file) and reference it from there?  
Or - is there a way to disable the validation?

```auto
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence/orm
      http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd"
   version="2.1">

```

Here’s the error we started getting (on multiple machines). (Hibernate v3.6.9)

> Caused by: org.hibernate.InvalidMappingException: Unable to read XML  
> at org.hibernate.util.xml.MappingReader.readMappingDocument(MappingReader.java:101)  
> at org.hibernate.cfg.Configuration.add(Configuration.java:513)  
> at org.hibernate.cfg.Configuration.add(Configuration.java:509)  
> at org.hibernate.cfg.Configuration.add(Configuration.java:716)  
> at org.hibernate.cfg.Configuration.addResource(Configuration.java:775)  
> at ca.digitalrapids.tas.db.impl.DefaultDBMgr.createHibernateConfiguration(DefaultDBMgr.java:137)  
> at ca.digitalrapids.tas.db.impl.DefaultDBMgr.configureHibernate(DefaultDBMgr.java:109)  
> at ca.digitalrapids.tas.db.impl.DefaultDBMgr.startupDatabase(DefaultDBMgr.java:177)  
> at ca.digitalrapids.tas.db.impl.DefaultDBMgr.startupDatabase(DefaultDBMgr.java:164)  
> at ca.digitalrapids.tas.db.impl.DefaultTASDB.startup(DefaultTASDB.java:47)  
> … 19 more  
> Caused by: org.dom4j.DocumentException: Error on line 1 of document [http://xmlns.jcp.org/xml/ns/persistence/orm\_2\_1.xsd](http://xmlns.jcp.org/xml/ns/persistence/orm_2_1.xsd) : Premature end of file. Nested exception: Premature end of file.  
> at org.dom4j.io.SAXReader.read(SAXReader.java:482)  
> at org.hibernate.util.xml.MappingReader.readMappingDocument(MappingReader.java:75)  
> … 28 more
