PacktPub Press Release Packt Publishing has today launched a new series of Beginner’s Guide books designed to make open source tools and other advanced software accessible and usable for Beginners. “There are thousands of tremendous software tools out there,” says series editor David Barnes. “The way they are designed, built and documented means they can …
Archives for 2008
How to solve QuerySyntaxException (table is not mapped) in hibetnate?
The following exception is very common if you are the beginner for hibernate. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxException: book is not mapped [from book] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158) at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87) at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:255) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056) …
JDBC connection in JDeveloper with MySQL database
The Java Database Connectivity (JDBC) API is used to access a SQL database from a Java application. JDBC also supports tabular data sources, such as a spreadsheet. Oracle JDeveloper is a free Integrated Development Environment (IDE) for modeling, developing, debugging, optimizing, and deploying Java applications. JDeveloper 10g is used to develop J2EE applications comprising the JSPs, …
How to develop Spring Framework MVC application in NetBeans?
This is a step-by-step guide on how to develop a Spring Framework MVC application from scratch using NetBeans.Spring is basically a technology committed to enabling you to build applications using Plain Old Java Objects (POJOs). It enables you to develop components as POJOs containing only our business logic, while the framework takes care of the …
Unit Testing with JUnit 4 Annotations
JUnit 4.0 introduces a completely different API to the older versions. JUnit 4.0 uses Java 5.0 annotations to describe tests instead of using inheritence. It introduces more flexible initialization and cleanup, timeouts, and parameterized test cases. This post describes the new features in JUnit 4.0, and in the end, I show a basic example that …
Pagination using Hibernate and JSP
If the result set is large, then having the entire result set in memory will not be feasible. With large result sets, you cannot afford to have them in memory. In such case, you have to fetch a chunk of data at a time (query based paging). The down side of using query based paging, …
Struts 2.0 and Spring
In this post, I will describe how to do the same using Struts 2.0. The only major step that needs to be done here is to override the default Struts 2.0 OjbectFactory. Changing the ObjectFactory to Spring give control to Spring framework to instantiate action instances etc. Most of the code is from the previous …
Servlet 3.0
Can’t wait to see Servlet 3.0 in action. More details about the specification and the current status is available in its JSR homepage. The introduction of support for non-blocking I/O takes Java Servlets to a new level and this, in my opinion,is the most significant stride in Servlet specification since it was introduced. The benefits …