openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbee <t...@tbee.org>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Wed, 25 Apr 2007 07:26:26 GMT



Marina Vatkina wrote:
> 
> I don't see nl/reinders/bm/generated/... classes listed in
> persistence.xml. 
> While the provider might find that a superclass is an entity, for a spec 
> compliant application, you must list all of them.
> 

Ok...

		<class>nl.reinders.bm.Contract</class>
		...
		<class>nl.reinders.bm.Websort</class>

		<class>nl.reinders.bm.generated.Contract</class>
		...
		<class>nl.reinders.bm.generated.Websort</class>


No difference:

47  reinders  INFO   [main] openjpa.Runtime - Starting OpenJPA
0.9.7-incubating
156  reinders  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.InformixDictionary".
Exception in thread "main" <0.9.7-incubating fatal user error>
org.apache.openjpa.persistence.ArgumentException: Could not locate metadata
for the class using alias "Article". Registered alias mappings:
"{Article=null}"
	at
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:348)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:167)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:145)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:214)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:184)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:177)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500(JPQLExpressionBuilder.java:64)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1671)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:55)
	at
org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:148)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:649)
	at
org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:630)
	at
org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:596)
	at
org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:658)
	at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1483)
	at
org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:219)
	at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:269)
	at nl.reinders.bm.BMTestOpenJPA.main(BMTestOpenJPA.java:41)


How about there being two classes with the same shortname?

-- 
View this message in context: http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata-for-the-class-using-alias-tf3561516.html#a10175675
Sent from the open-jpa-dev mailing list archive at Nabble.com.


Mime
View raw message