Hi,
Hopeing someone can help me with the following error.
I'm getting a error at runtime when I instantiate one of my entities:
*
java.lang.NoSuchMethodError:
...core.util.temp_dao.databeans.AbstractDataBean.pcGetManagedFieldCount()I*
* at
...core.util.temp_dao.testobjects.TestDataBean.<clinit>(TestDataBean.java:12)
*
I suspect it might be a problem with entity enhancement (buildtime, using
the Ant task) as I get the following warning during entity enhancement:
*5304 clusterdb WARN [main] openjpa.Runtime - Fields "id" are not a default
persistent type, and do not have any annotations indicating their
persistence strategy. They will be treated as non-persistent. If you
intended for these fields to be persistent, be sure to annotate them
appropriately. Otherwise annotate them with @Transient.
*
I think the OpenJpa implementation might be struggling to determine the
"id" field type in my @MappedSuperclass entity hierarchy:
*@(protected)*
*public abstract class DataBean<DATABASE_KEY, DATABEAN extends
DataBean<DATABASE_KEY, DATABEAN>>*
* implements IDataBean<DATABASE_KEY, DATABEAN> {*
*
*
* @Id*
* private DATABASE_KEY id =null;*
*
*
* /** Required Jpa constructor **/*
* protected DataBean() {*
* }*
*
*
* ...snip*
*}*
*
*
The idea was that I can pass in the type of DATABASE_KEY from a subclass,
but OpenJpa doesn't seem to like it...
(It seems that if OpenJpa can't determine the type of the column it
defaults the column to being of Blob as per this other warning I got during
debugging efforts:
*OpenJPA cannot map field "id" efficiently. It is of an unsupported type.
The field value will be serialized to a BLOB by default.*)
Any insights appreciated - thanks,
Serdyn du Toit