Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] problem with criteria The type [null] is not the expected [EntityType] for the key class [class br.com.thinkit.db.Ativos] - try upgrade past 8141.

Daniel,
    Hi, this is unfortunate - I will try to help narrow down the issue.
    You may be experiencing some outstanding issues with the critical child bug 303063 of 266912 that was fixed in rev# 8141 in early Sept 2010, or your issue may be a reproduction of DI 101 depending on the rev# you are running on.  It is hard to narrow down your issue unless we know what type of model you are using (IE: is your @Id singular/composite, is it defined on a @MappedSuperclass superclass or chain), and whether you are running on a container, what type of container (GlassFish?) or just SE (where predeploy and deploy happen in sequence).

    Short answer:
    - check your revision is past 8141 - from my forensic analysis cross-referencing your 152 stack trace line to the 160 expected source - it looks like your rev is pre 8006
https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8141
    - After you refresh past 8141 - verify you are not seeing DI 95 or 101 - that should be fixed
    - see if you are experiencing outstanding DI 101

    Long answer:

    The following issues were fixed surrounding premature metamodel initialization before the metadata was fully processed
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_95:_20091017:_Attribute.getJavaMember.28.29_returns_null_for_a_BasicType_on_a_MappedSuperclass_because_of_an_uninitialized_accessor
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_106:_20100810:_322585:Metamodel_initialization_via_EMF.getMetamodel.28.29_before_EM_deploy_results_in_an_invalid_Metamodel_because_of_UNINITIALIZED_descriptor.initializationStage
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322585
https://fisheye2.atlassian.com/changelog/eclipselink/?cs=8141
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303063

    However, the fix for 322585 in 8141 will not fix all instances (The Metamodel API must assume that all RelationalDescriptors are initialized - with both their class and className set) - we may have a one or more scenarios where the RelationalDescriptor is not ready to use - these are very difficult to reproduce - see the references for design issue 101
http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_101:_20100218:_Descriptor.javaClass_is_null_on_a_container_EM_for_a_specific_case
https://bugs.eclipse.org/bugs/show_bug.cgi?id=315041#c6

    The reproduction of DI 101 could only occur if one of the 3 API calls below is called and the underlying ''RelationalDescriptor'' is invalid
       MetamodelImpl.embeddable()
       MetamodelImpl.entity()
       MetamodelImpl.managedType()

    Forensics:
    From your stack trace I see that you have called MetamodelImpl.entity() and that the stacktrace indicates you are on line 152.
    The current trunk version (8492) is 8 lines ahead and would show as :160
at org.eclipse.persistence.internal.jpa.metamodel.MetamodelImpl.entity(MetamodelImpl.java:152)
     The 8 lines were added in SVN rev# 8006 on Aug 6 - you therefore are using a version before 8006 and the larger fix in 8141
https://fisheye2.atlassian.com/browse/eclipselink/trunk/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metamodel/MetamodelImpl.java?r2=8006&r1=7480

    I would like to know if your model reproduced DI 101?
    You can also raise an EclipseLink bug so that it can get prioritized and/or voted on.
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EclipseLink


    thank you
    /michael
    http://www.eclipselink.org

Daniel Gomes-THINK IT wrote:

 

 

Hi, I try to developer one application with netbeans platform (RCP) with eclipselink, but sometimes I got the following error:

 java.lang.IllegalArgumentException: The type [null] is not the expected [EntityType] for the key class [class br.com.thinkit.db.Ativos].

        at org.eclipse.persistence.internal.jpa.metamodel.MetamodelImpl.entity(MetamodelImpl.java:152)

        at br.com.thinkit.ConsultaAtivoImpl.<init>(ConsultaAtivoImpl.java:50)

        at br.com.thinkit.Installer.restored(Installer.java:38)

        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:426)

        at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:366)

        at org.netbeans.ModuleManager.enable(ModuleManager.java:944)

        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:318)

        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:254)

        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:286)

        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)

        at org.netbeans.core.startup.Main.start(Main.java:302)

        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:114)

[catch] at java.lang.Thread.run(Thread.java:662)

Daniel Gomes

TI Infra

Tel:+55 (11) 3049-6035

Fax:+55 (11) 3045-9506

 

Banco Fator

R Dr Renato Paes de Barros, 1017 - 11º ,12º e 13º andares
Itaim Bibi - 04530-001 - São Paulo - SP
www.bancofator.com.br

 

P  Evite o desperdício: imprima somente o necessário.

 



Pontos de vista e opiniões inclusos nesta mensagem são de responsabilidade do remetente a menos que claramente mencionado como originados pelas Empresas do Conglomerado Fator. Comunicações pela internet não podem ser garantidas quanto à sua segurança ou inexistência de erros e vírus. As empresas controladas pelo Banco Fator, por esta razão, não assumem responsabilidade por qualquer erro ou omissão no contexto da mensagem, decorrente da transmissão via internet. Essa mensagem pode conter informação confidencial. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não poderá usar, copiar ou divulgar as informações nela contidas ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor, avise imediatamente o remetente, respondendo este e-mail e em seguida apagando-o. Agradecemos a sua cooperação.

Points of view and opinions herein expressed are the responsibility of sender unless clearly stated otherwise as having been originated in companies of the Fator Conglomerate. Communications via the Internet cannot be guaranteed with regards to safety or the absence of errors and viruses. For this reason, Banco Fator-controlled companies shall not assume responsibility for errors or omissions in the context of a transmission via the Internet. This e-mail may be confidential. If you are not the intended recipient or the authorized person to receive this message, you may not use, copy or publicize information therein contained or take any action based on such information. If you are not the intended addressee, please advise sender immediately by replying to this e-mail and delete if obtained in error. We appreciate your cooperation.

SAC (Customer Care): 0800-770-7229 / sac@xxxxxxxxxxxxxxxxx
Ouvidoria (Ombudsperson): 0800-77-32867 / ouvidoria@xxxxxxxxxxxxxxxxx
Rua Dr. Renato Paes de Barros, 1017, 12o.andar – Itaim Bibi - São Paulo – SP – 04530-001.

_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top