Spooky Exceptions (10) – An exception occurred while creating a query in EntityManager


Umgebung

  • Wildfly 13
  • EE7
  • Eclipselink

Situation

Bei dem Aufruf einer JPA Query kommt eine Exception

 
  2018-06-22 12:45:43,615 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: 
  EJB Invocation failed on component DataPrivacyStatementAcceptanceFacade
  for method public abstract de.schoeso.festival.ejb.mde.DataPrivacyStatementAcceptanceList 
  de.schoeso.festival.ejb.mde.facade.DataPrivacyStatementAcceptanceFacadeLocal.findByVariousParameters(): javax.ejb.EJBException: 
  java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:  
  Exception Description: Problem compiling [SELECT x FROM DataPrivacyStatementAcceptance x]. 
  [14, 44] The abstract schema type 'DataPrivacyStatementAcceptance' is unknown.
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:223)
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:418)

Lösung

Ursache dieses Kompilierungsproblems und des fehlenden “abstract schema type” war, dass die Entität nicht in der persistence.xml eingetragen war (bzw. nicht erkannt wurde).

Du hast Fragen oder Anmerkungen? Kontakt: arndt@schoenb.de

,