Note that there are some explanatory texts on larger screens.

plurals
  1. POjava.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.addAnnotatedClass
    primarykey
    data
    text
    <p>I am new to JPA &amp; hibernate, when I try this <a href="http://www.vogella.com/articles/JavaPersistenceAPI/article.html" rel="nofollow">tutorial</a> . I added the following provider in my persistence.xml,</p> <pre><code>&lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt; </code></pre> <p>and I am getting this error..</p> <pre><code>log4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.cfg.Configuration.addAnnotatedClass(Ljava/lang/Class;)Lorg/hibernate/cfg/Configuration; at org.hibernate.ejb.Ejb3Configuration.addAnnotatedClass(Ejb3Configuration.java:1421) at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1391) at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:1184) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1048) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:291) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:373) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) at de.vogella.jpa.simple.main.Main.main(Main.java:17) </code></pre> <p>Kindly help to resolve this error . Thank you</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload