0

I've got this error when i try to execute my Java application with Maven and Hibernate:

"Error acessing stax stream"

The origin is my SessionFactory in my the HibernateUtils class:

The topic bellow haven't helped:

Error message: Exception in thread "main" org.hibernate.HibernateException: Error accessing stax stream

And nether any other of the same problem.

I have no idea what it could be.

Bellow the print of my main class with the console showing the error after execute:

enter image description here

HibernateUtils class:

enter image description here

My POM.xml: I know that it is very messed and with a lot of non used dependencies, but I copy this from somewhere and I don't know exacly what I can remove.

enter image description here enter image description here enter image description here enter image description here enter image description here

Lucas
  • 157
  • 1
  • 12
  • 1
    Based on the first image (which shouldn't be done) I can see that you are not following Maven's conventions over configuration. Your directory layout is not that way...cause it looks like `src/Main`...which should be `src/main/java` where the java files are for your production code should be located .... – khmarbaise Mar 10 '19 at 20:47
  • Maven project does not created the directorys main/java inside "src". I though that when I create a Maven project in Eclipse, it comes already with the correct convention directors created. Because of it, i just puted my packeges on "src", thinking that it was rigth. But this are no afecting my app and causing my problem isn't it? – Lucas Mar 10 '19 at 20:57
  • 1
    you have also a compile error in your project as the image shows in Controllers...that should be fixed first...and follow conventions I strongly recommend to do that... – khmarbaise Mar 11 '19 at 08:08
  • Oh yes. I have not seen it, thanks. – Lucas Mar 12 '19 at 00:20
  • I've fixed the compile error, but the same error message stills. – Lucas Mar 12 '19 at 00:24
  • The next error is the parse error which is in the image...I suppose your hibernate.cfg.xml is not correct... – khmarbaise Mar 12 '19 at 12:09

0 Answers0