You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2004/11/15 18:29:14 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker/util ClassHelper.java
arminw 2004/11/15 09:29:14
Modified: src/java/org/apache/ojb/broker/util ClassHelper.java
Log:
add more detailed error message
Revision Changes Path
1.13 +7 -2 db-ojb/src/java/org/apache/ojb/broker/util/ClassHelper.java
Index: ClassHelper.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/ClassHelper.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ClassHelper.java 14 Sep 2004 16:36:14 -0000 1.12
+++ ClassHelper.java 15 Nov 2004 17:29:14 -0000 1.13
@@ -402,7 +402,12 @@
{
// 1. create an empty Object (persistent classes need a public default constructor)
Constructor con = cld.getZeroArgumentConstructor();
-
+ if(con == null)
+ {
+ throw new ClassNotPersistenceCapableException(
+ "A needed zero argument constructor was not provided! Class was '"
+ + cld.getClassNameOfObject() + "'");
+ }
result = ConstructorHelper.instantiate(con);
}
catch (InstantiationException e)
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org