Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Amit Bhat

Greenhorn
+ Follow
since Jan 30, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amit Bhat

I have the following jars in my classpath:
ant-antlr-1.6.3.jar
asm.jar
asm-attrs.jar
cglib-2.1.jar
commons-collections-2.1.1.jar
commons-logging-1.0.4.jar
dom4j-1.6.jar
jta.jar
log4j-1.2.8.jar
hibernate3.jar
hsqldb.jar
mysql-connector-java-3.1.14-bin.jar

Do I need anyother jar?
These jars were mentioned in the hibernate tutorial.

where Users is a simple java bean mapped to the table (users) in MySQL.

Whenever I call the function containing the line,
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/ANTLRException
at org.hibernate.hql.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:27)
at org.hibernate.impl.SessionFactoryImpl.createQueryTranslators(SessionFactoryImpl.java:357)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:423)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at client.TestClient.getUsersByAge(TestClient.java:84)
at client.TestClient.findByAge(TestClient.java:88)
at client.TestClient.main(TestClient.java:110)
Rules for Legal Identifiers

Definition: Letter = (A-Z, a-z or '$' or '_' )
Definition: Digit = ( 0 -9 )


An Identifier:
Must begin with a letter, '$', or "_".
After the first char, any char that is a letter (including '$' or '_') or digit may be used.
Cannot be a reserved word (aka keyword).
No spaces are allowed in the identifier.
Cannot have a Java operator symbol (because not a letter or digit).
No limit to the number of letters & digits (0 - 9).
14 years ago