Spring Hibernate – Could not obtain transaction-synchronized Session for current thread

You must enable the transaction support (<tx:annotation-driven> or @EnableTransactionManagement) and declare the transactionManager and it should work through the SessionFactory. You must add @Transactional into your @Repository With @Transactional in your @Repository Spring is able to apply transactional support into your repository. Your Student class has no the @javax.persistence.* annotations how @Entity, I am assuming …

Read more

What kind of Java type is “[B”?

That my friend is an array of bytes. In JNI, [B is used to describe an array ([) of bytes (B). An array of ints is [I etc. You can get a bit more information on field descriptors here:JNI Types and Data Structures (Table 3-2 should be what you are looking for).

Hibernate dialect for Oracle Database 11g?

Use the Oracle 10g dialect. Also Hibernate 3.3.2+ is required for recent JDBC drivers (the internal class structure changed – symptoms will be whining about an abstract class). Dialect of Oracle 11g is same as Oracle 10g (org.hibernate.dialect.Oracle10gDialect). Source: http://docs.jboss.org/hibernate/orm/3.6/reference/en-US/html/session-configuration.html#configuration-optional-dialects

Hibernate problem – “Use of @OneToMany or @ManyToMany targeting an unmapped class”

Your annotations look fine. Here are the things to check: make sure the annotation is javax.persistence.Entity, and not org.hibernate.annotations.Entity. The former makes the entity detectable. The latter is just an addition. if you are manually listing your entities (in persistence.xml, in hibernate.cfg.xml, or when configuring your session factory), then make sure you have also listed the ScopeTopic entity make …

Read more