deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KONSTANTINIDIS Panagiotis <Panagiotis.KONSTANTINI...@intrasoft-intl.com>
Subject RE: Data module - EntityMetadataInitializer strange exception
Date Tue, 19 May 2020 18:35:09 GMT
Thanks for you fast response Thomas!

Got it after all.

One of the other deltaspike repositories in our codebase was setup with a class which had
no @Entity annotation.
That unfortunately, probably because of some kind of deltaspike repository scanning, caused
all the other repositories ineffective!

P.S. room for improvement? 😉

Best Regards,
Panos Konstantinidis

-----Original Message-----
From: Thomas Andraschko <andraschko.thomas@gmail.com>
Sent: Tuesday, May 19, 2020 8:31 PM
To: users@deltaspike.apache.org
Subject: Re: Data module - EntityMetadataInitializer strange exception

Hi,

Could you try to add a unittest in the data-impl module? I can fix it then.

KONSTANTINIDIS Panagiotis <Panagiotis.KONSTANTINIDIS@intrasoft-intl.com>
schrieb am Di., 19. Mai 2020, 18:28:

> Hello,
>
> This is a long shot, but I thought to give it a try.
>
> We are using DeltaSpike v1.9.3 in our JEE web application which is
> deployed to openliberty 19.
>
> Simple repository class:
>
> @Repository
> public interface RiskAssessmentResultsRepository
>     extends EntityRepository<RiskAssessmentResultsE, String>,
>     EntityManagerDelegate<RiskAssessmentResultsE> { .....
>
> The save method is invoked from a class started in a separate JEE
> thread (if that makes any difference).
>
> And the stack trace:
>
> [INFO] Caused by: java.lang.ClassCastException:
> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be
> cast to java.lang.Class [INFO]  at
> org.apache.deltaspike.data.impl.meta.EntityMetadataInitializer.extract
> (EntityMetadataInitializer.java:74)
> ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.EntityMetadataInitializer.extract
> (EntityMetadataInitializer.java:82)
> ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.EntityMetadataInitializer.init(En
> tityMetadataInitializer.java:37)
> ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.EntityMetadataInitializer$Proxy$_
> $$_WeldClientProxy.init(Unknown
> Source) ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.RepositoryMetadataInitializer.ini
> t(RepositoryMetadataInitializer.java:83)
> ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.RepositoryMetadataInitializer$Pro
> xy$_$$_WeldClientProxy.init(Unknown
> Source) ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.RepositoryMetadataHandler.init(Re
> positoryMetadataHandler.java:50)
> ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at sun.reflect.GeneratedMethodAccessor1065.invoke(Unknown
> Source) ~[?:?] [INFO]  at
> java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131] [INFO]
> at
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invo
> keMethods(DefaultLifecycleCallbackInvoker.java:83)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.post
> Construct(DefaultLifecycleCallbackInvoker.java:66)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.injection.producer.BasicInjectionTarget.postConstruct(B
> asicInjectionTarget.java:122)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:164)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.contexts.AbstractContext.get(AbstractContext.java:96)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstan
> ceStrategy.get(ContextualInstanceStrategy.java:100)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContex
> tualInstanceStrategy.get(Contextu
> [INFO] alInstanceStrategy.java:140)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
> ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanI
> nstance.java:102) ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHa
> ndler.java:131) ~[com.ibm.ws.org.jboss.weld3_1.0.35.jar:3.1.1.Final]
> [INFO]  at
> org.apache.deltaspike.data.impl.meta.RepositoryMetadataHandler$Proxy$_
> $$_WeldClientProxy.lookupMetadata(Unknown
> Source) ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandl
> er.java:91) ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.data.impl.handler.QueryHandler$Proxy$_$$_WeldCli
> entProxy.invoke(Unknown
> Source) ~[deltaspike-data-module-impl-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.proxy.spi.invocation.DeltaSpikeProxyInvocationHa
> ndler.proceed(DeltaSpikeProxyInvocationHandler.java:97)
> ~[deltaspike-proxy-module-api-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.proxy.spi.invocation.DeltaSpikeProxyInvocationHa
> ndler.invoke(DeltaSpikeProxyInvocationHandler.java:78)
> ~[deltaspike-proxy-module-api-1.9.3.jar:1.9.3]
> [INFO]  at
> org.apache.deltaspike.proxy.spi.invocation.DeltaSpikeProxyInvocationHa
> ndler$Proxy$_$$_WeldClientProxy.invoke(Unknown
> Source) ~[deltaspike-proxy-module-api-1.9.3.jar:1.9.3]
> [INFO]  at
> com.intrasoft.hermes.cwm.control.adapter.outbound.persistence.reposito
> ry.dossier.DeclarationRepository$$DSPartialBeanProxy.save(Unknown
> Source) ~[control-adapter-0.0.1-SNAPSHOT.jar:?]
> [INFO]  at
> com.intrasoft.hermes.cwm.control.adapter.outbound.persistence.service.
> DeclarationDossierRepositoryAdapter.save(DeclarationDossierRepositoryA
> dapter.java:88) ~[control-adapter-0.0.1-SNAPSHOT.jar:?]
> [INFO]  ... 50 more
> [INFO]
>
> Tried using abstract class repository instead of interface but the
> same issue. Same issue on deltaspike version 1.8.2 & 1.9.1.
>
> Best Regards,
> Panos Konstantinidis
>
> Think before you print. This e-mail, and any files and attachments
> transmitted with it, is confidential. It is intended for the sole use
> of the named recipients(s) only. If you have received this message in
> error, please immediately notify us by replying to this message and
> then permanently delete it. Any views and opinions expressed are those
> of the individual author/sender and are not necessarily shared or
> endorsed by INTRASOFT International SA or any associated or related
> company. This e-mail transmission is not binding for the purposes of
> forming a contract and does not form a contractual obligation of any type.
>
Think before you print. This e-mail, and any files and attachments transmitted with it, is
confidential. It is intended for the sole use of the named recipients(s) only. If you have
received this message in error, please immediately notify us by replying to this message and
then permanently delete it. Any views and opinions expressed are those of the individual author/sender
and are not necessarily shared or endorsed by INTRASOFT International SA or any associated
or related company. This e-mail transmission is not binding for the purposes of forming a
contract and does not form a contractual obligation of any type.
Mime
View raw message