Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i tell Hibernate not to fetch files from internet

 
Java Bugger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

i use hibernate, and it tries to download the XSD definition used from an persistance.xml file.

The persistance.xml looks like:


The stacktrace looks like this:



How can i tell hibernate that it should not fetch the XSD file from internet? Because my application cannot be started up when it has no internet or java.sun.com delivers a non-XSD document (like happened her) or the delivery just hangs up.

Any ideas?
Chers
JB
 
Ramon Anger
Ranch Hand
Posts: 56
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi JB,

according to the missing XSD your stacktrace shows only a warning.
You could download the XSD, place it in a local directory, and change the schema location in your persistence.xml to that local path. With that, the warning should be gone.

By the way, don't you think the problem of your application not starting is more related to line 155 in the stacktrace you've posted?

Regards,
Ramon
 
Java Bugger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem was JPA2 is not supported in this version JBoss 5. If you want to put an XSD not known by JBoss, you need to put it in the libraries folder. but i changed JPA version from 2 to 1.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic