Thanks! I used the hibernate-annotations.jar that comes with hibernate-annotations-3.3.0.GA. The problem still persists though.
If it would help, here is the main file
Code:
package hello;
import java.util.*;
import javax.persistence.*;
public class HelloWorld
{
public HelloWorld()
{
}
public static void main(String[] args)
{
EntityManagerFactory emf = Persistence.createEntityManagerFactory("helloworld");
EntityManager em = emf.createEntityManager();
EntityTransaction tx = em.getTransaction();
tx.begin();
Message message = new Message("Hello World");
em.persist(message);
tx.commit();
em.close();
EntityManager newEm = emf.createEntityManager();
EntityTransaction newTx = newEm.getTransaction();
newTx.begin();
List messages = newEm.createQuery("select m from Message m order by m.text asc")
.getResultList();
System.out.println( messages.size() + " message(s) found: " );
for (Object m : messages)
{
Message loadedMsg = (Message)m;
System.out.println( loadedMsg.getText() );
}
newTx.commit();
newEm.close();
emf.close();
}
}
Here are the list of jars in my lib folder
Quote:
ant-1.6.5.jar
ant-antlr-1.6.5.jar
ant-junit-1.6.5.jar
ant-launcher-1.6.5.jar
ant-swing-1.6.5.jar
antlr-2.7.5.jar
antlr-2.7.6.jar
asm-attrs.jar
asm.jar
c3p0-0.9.1.jar
cglib-2.1.3.jar
checkstyle-all.jar
cleanimports.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
concurrent-1.3.2.jar
connector.jar
dom4j-1.6.1.jar
ehcache-1.2.3.jar
ejb3-persistence.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-entitymanager.jar
hibernate-search.jar
hibernate-tools.jar
hibernate-validator.jar
hibernate3.jar
hsqldb.jar
jaas.jar
jacc-1_0-fr.jar
jars.txt
javassist.jar
jaxen-1.1-beta-7.jar
jboss-archive-browsing.jar
jboss-cache.jar
jboss-common.jar
jboss-jmx.jar
jboss-system.jar
jdbc2_0-stdext.jar
jgroups-2.2.8.jar
jms.jar
jta.jar
junit-3.8.1.jar
log4j-1.2.11.jar
lucene-core-2.1.0.jar
oscache-2.1.jar
proxool-0.8.3.jar
swarmcache-1.0rc2.jar
syndiag2.jar
versioncheck.jar
xerces-2.6.2.jar
xml-apis.jar