aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Commented] (ARIES-1270) ClasscastException or incompatible type when persistence unit bundle is refreshed
Date Fri, 13 Feb 2015 11:13:11 GMT


Christian Schneider commented on ARIES-1270:

I found that restarting the hibernate osgi bundle made it work again. Does this mean this
is a problem with classloading in hibernate?

> ClasscastException or incompatible type when persistence unit bundle is refreshed
> ---------------------------------------------------------------------------------
>                 Key: ARIES-1270
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: JPA
>    Affects Versions: jpa-container-1.0.2, jpa-container-context-1.0.4, jpa-container-context-1.0.3
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>            Priority: Critical
>             Fix For: jpa-container-1.0.3, jpa-container-context-1.0.5
> How to reproduce:
> Follow installation instructions of my tasklist-cdi tutorial
> - After installation the example work
> - refresh
> - When accessing http://localhost:8181/tasklist you get the exception below
> - After a restart of karaf it works again
> So the problem seems to be that with a refresh you get a new classloader for the model
bundle but the persistence unit (EnityManagerFactory) is not renewed so it still uses the
old classloader.
> I am not yet sure if the problem is in jpa.container or jpa.container.context.
> I will try to recreate this error in an itest for jpa so we can track it easily.
> ---
> java.lang.IllegalArgumentException: Type specified for TypedQuery []
is incompatible with query return type [class]
> 	at org.hibernate.ejb.AbstractEntityManagerImpl.resultClassChecking(
> 	at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(
> 	at 

This message was sent by Atlassian JIRA

View raw message