IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Java EE Discussion :

Un exception incompréhensible lors du déploiement de mon EJB


Sujet :

Java EE

  1. #1
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut Un exception incompréhensible lors du déploiement de mon EJB
    Bonjour,

    Je voudrais déployer mon projet EJB sous Glassfish V3 (J2EE6). J'utilise EclipseLink (JPA2.0).
    J'arrive à faire tourner mon application sous forme de stand alone avec l'implémentation JPA en son sein (je gère les entity manager à la main) mais impossible de faire fonctionner JPA côté EJB.
    Apparemment j'ai un problème de "weaving" d'une entité...

    Voici l'exception:
    Tome 1:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    ATTENTION: Weaver encountered an exception while trying to weave class entities/Personne.  The exception was: java.lang.NullPointerException
    Tome 2:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
     
    GRAVE: java.lang.NullPointerException
            at org.eclipse.persistence.descriptors.ClassDescriptor.createMultipleTableInsertOrder(ClassDescriptor.java:871)
            at org.eclipse.persistence.descriptors.ClassDescriptor.adjustMultipleTableInsertOrder(ClassDescriptor.java:503)
            at org.eclipse.persistence.descriptors.ClassDescriptor.preInitialize(ClassDescriptor.java:3341)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:429)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
            at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
            at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
            at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
            at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
            at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
            at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
            at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
            at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
            at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
            at java.lang.Thread.run(Thread.java:637)
    Tome 3 T_T:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    GRAVE: Local Exception Stack: 
    Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.IntegrityException
    Descriptor Exceptions: 
    ---------------------------------------------------------
    Exception [EclipseLink-60] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The method [_persistence_setadresse_vh] or [_persistence_getadresse_vh] is not defined in the object [entities.Personne].
    Internal Exception: java.lang.NoSuchMethodException: entities.Personne._persistence_getadresse_vh()
    Mapping: org.eclipse.persistence.mappings.OneToOneMapping[adresse]
    Descriptor: RelationalDescriptor(entities.Personne --> [DatabaseTable(PERSONNE)])
    Exception [EclipseLink-60] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The method [_persistence_setcompteVision_vh] or [_persistence_getcompteVision_vh] is not defined in the object [entities.Personne].
    Internal Exception: java.lang.NoSuchMethodException: entities.Personne._persistence_getcompteVision_vh()
    Mapping: org.eclipse.persistence.mappings.OneToOneMapping[compteVision]
    Descriptor: RelationalDescriptor(entities.Personne --> [DatabaseTable(PERSONNE)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-93] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: The table [PERSONNE] is not present in this descriptor.
    Descriptor: RelationalDescriptor(entities.Utilisateur --> [DatabaseTable(UTILISATEUR)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.ConnexionVision --> [DatabaseTable(CONNEXIONVISION)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.NotationAgent --> [DatabaseTable(NOTATIONPERSONNE), DatabaseTable(NOTATIONAGENT)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.Exploitation --> [DatabaseTable(SITE), DatabaseTable(EXPLOITATION)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.LienUtilisateurAgence --> [DatabaseTable(LIENUTILISATEURAGENCE)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.LienUtilisateurExploitation --> [DatabaseTable(LIENUTILISATEUREXPLOITATION)])
    Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: A non-read-only mapping must be defined for the sequence number field.
    Descriptor: RelationalDescriptor(entities.NotationPersonne --> [DatabaseTable(NOTATIONPERSONNE)])
    Runtime Exceptions: 
    ---------------------------------------------------------
    java.lang.NullPointerException
    java.lang.NullPointerException
    java.lang.NullPointerException
    java.lang.NullPointerException
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:478)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
            at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
            at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
            at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
            at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
            at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
            at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
            at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
            at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
            at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
            at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
            at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
            at java.lang.Thread.run(Thread.java:637)
    Voici mon entité Personne incriminée:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
     
    @Entity
    @Inheritance(strategy=InheritanceType.JOINED)
    public abstract class Personne implements Serializable  {
     
     
        @OneToOne(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
        private CompteVision compteVision;
     
        @OneToMany(mappedBy = "personne", cascade=CascadeType.ALL)
        private List<Candidature> candidatures;
     
     
        /**
         * @return the serialVersionUID
         */
        public static long getSerialVersionUID() {
            return serialVersionUID;
        }
     
        /**
         * @param aSerialVersionUID the serialVersionUID to set
         */
        @OneToMany(mappedBy = "personne", cascade=CascadeType.ALL)
        private List<ElementSalaire> elementsSalaire;
        @OneToMany(mappedBy = "executeur", cascade=CascadeType.ALL)
        private List<Action> actionsExecution;
        @OneToMany(mappedBy = "emetteur", cascade=CascadeType.ALL)
        private List<Action> actionsEmission;
        @OneToMany(mappedBy = "recepteur", cascade=CascadeType.ALL)
        private List<Action> actionsReception;
        @OneToMany(mappedBy = "evalue", cascade=CascadeType.ALL)
        private List<NotationPersonne> notationsPersonne;
        private static long serialVersionUID = 1L;
        @Id
        @GeneratedValue(strategy = GenerationType.AUTO)
        private Long id;
     
        private String nom="";
        private String prenom="";
     
        @OneToOne(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
        private Adresse adresse;
     
        @Temporal(javax.persistence.TemporalType.DATE)
        private java.util.Date dateNaissance;
     
        private String tel="";
        private String portable="";
        private String fax="";
        private String mail="";
        private String lieuNaissance="";
        private String id2="";
        private String titre="";
        private String nationalite="";
     
    //getters et setters
    }
    Je n'arrive pas à trouver le bug... J'ai vraiment du mal à comprendre ce qu'il ne va pas. Quelqu'un pourrait-il m'aider?

    Merci

    Edit: J'ai trouvé un post sur le forum Eclipse qui ressemble à mon problème:
    http://www.eclipse.org/forums/index....g&goto=509871&

  2. #2
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Je me permet de faire un petit up parce que j'ai vraiment besoin d'aide la T_T.
    Impossible de trouver une info sur mon problème...

  3. #3
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    En faisant quelques recherches j'ai pu désactiver le weaver de EclipseLink.

    J'ai ajouté au persistence.xml:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <properties>
            <property name="eclipselink.weaving" value="false"/>
        </properties>
    Maintenant ça fonctionne mais j'aurait bien aimé savoir ce que je perd en le désactivant.

  4. #4
    Membre expérimenté Avatar de nathieb
    Homme Profil pro
    DevOps
    Inscrit en
    Mai 2004
    Messages
    1 057
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : DevOps
    Secteur : Service public

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 057
    Points : 1 532
    Points
    1 532
    Par défaut Pas simple l'histoire
    Bonjour,

    Je connaissais pas encore, mais il semble que cela soit lié au mécanisme de eclipseLinK, un sorte de mise en cache des objets au chargement. Dans le cadre de ta déclaration ton adresse est OneToOne avec l'option Lazy.

    Dans le cadre du conteneur cela peux poser des problèmes, j'ai pas encore tout compris, mais j'ai trouvé les docs oracles toujours aussi simple ....


    http://wiki.eclipse.org/Configuring_a_Mapping_(ELUG)#Configuring_Indirection_.28Lazy_Loading.29

    a suivre ...

    Sinon je viens de comprendre grâce à cette article très bien fait.
    http://blog.xebia.fr/2008/05/02/java...z-vos-classes/

    il y a une parenthèse sur le weaving. une nouvelle piste ...

    olivier
    Architecte destructurant,
    be cool, be free

    Il nous reste Debian bien sûr

  5. #5
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Merci je vais essayer de comprendre tout ça! ^^

  6. #6
    Membre régulier
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2010
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2010
    Messages : 42
    Points : 111
    Points
    111
    Par défaut
    Bonjour,
    Je ne savais pas qu'un conteneur EJB pouvait instancier une classe abstraite

    public abstract class Personne implements Serializable {

    Ton problème ne viendrait il pas de là ?

  7. #7
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Le conteneur n'instancie jamais la classe Personne, uniquement les classes filles.

    Edit: Ce n'est pas vraiment le conteneur mais l'implémentation de JPA.

  8. #8
    Membre régulier
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2010
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2010
    Messages : 42
    Points : 111
    Points
    111
    Par défaut
    Citation Envoyé par saveriu Voir le message
    Le conteneur n'instancie jamais la classe Personne, uniquement les classes filles.
    Merci pour cette précision. Ton problème va m'inciter à revoir certaine chose. Je n'avais pas vu un EJB sous cet aspect.

  9. #9
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Les entités abstraites sont pratiques pour les requête JPQL, sinon il vaut mieux utiliser les @MappedSuperclass ^^.

  10. #10
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    En mettant le logging en FINEST voila ce que j'ai trouvé:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
     
    LE PLUS FIN: Begin weaver class transformer processing class [entities/Personne].
    ATTENTION: Weaver encountered an exception while trying to weave class entities/Personne.  The exception was: java.lang.NullPointerException
    LE PLUS FIN: java.lang.NullPointerException
            at org.eclipse.persistence.internal.libraries.asm.commons.SerialVersionUIDAdder.visitField(SerialVersionUIDAdder.java:104)
            at org.eclipse.persistence.internal.jpa.weaving.ClassWeaver.visitField(ClassWeaver.java:1183)
            at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(ClassReader.java:359)
            at org.eclipse.persistence.internal.jpa.weaving.PersistenceWeaver.transform(PersistenceWeaver.java:95)
            at org.glassfish.persistence.jpa.JPADeployer$ProviderContainerContractInfoImpl$1.transform(JPADeployer.java:202)
            at com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:672)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
            at java.lang.Class.privateGetPublicMethods(Class.java:2547)
            at java.lang.Class.privateGetPublicMethods(Class.java:2557)
            at java.lang.Class.getMethods(Class.java:1410)
            at com.sun.ejb.codegen.RemoteGenerator.<init>(RemoteGenerator.java:108)
            at com.sun.ejb.EJBUtils.loadGeneratedRemoteBusinessClasses(EJBUtils.java:499)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:598)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:150)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:144)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:99)
            at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
            at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
            at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
            at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
            at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
            at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
            at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
            at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
            at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
            at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
            at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
            at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
            at java.lang.Thread.run(Thread.java:637)
    Je vais peut être y arriver...

  11. #11
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Et ben voila j'ai trouvé!

  12. #12
    Membre expérimenté Avatar de nathieb
    Homme Profil pro
    DevOps
    Inscrit en
    Mai 2004
    Messages
    1 057
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : DevOps
    Secteur : Service public

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 057
    Points : 1 532
    Points
    1 532
    Par défaut et donc
    Bonjour,

    Tu as trouvé mais la conclusion ?

    Si cela peux aider d'autres c'est mieux de partager

    olivier
    Architecte destructurant,
    be cool, be free

    Il nous reste Debian bien sûr

  13. #13
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    139
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 139
    Points : 50
    Points
    50
    Par défaut
    Bien sur!

    En fait cette ligne m'a mis la puce à l'oreille:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    at org.eclipse.persistence.internal.libraries.asm.commons.SerialVersionUIDAdder.visitField(SerialVersionUIDAdder.java:104)
    La classe Personne avait l'attribut serialVersionUID (autogénèré par Netbeans) qui apparaissait aussi dans les classes filles. Je l'ai tout simplement supprimé.
    La grosse prise de tête...

  14. #14
    Membre expérimenté Avatar de nathieb
    Homme Profil pro
    DevOps
    Inscrit en
    Mai 2004
    Messages
    1 057
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 57
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : DevOps
    Secteur : Service public

    Informations forums :
    Inscription : Mai 2004
    Messages : 1 057
    Points : 1 532
    Points
    1 532
    Par défaut cool
    Bonjour,

    merci pour cette heureuse conclusion.

    olivier
    Architecte destructurant,
    be cool, be free

    Il nous reste Debian bien sûr

  15. #15
    Membre à l'essai
    Profil pro
    Inscrit en
    Août 2008
    Messages
    14
    Détails du profil
    Informations personnelles :
    Localisation : Canada

    Informations forums :
    Inscription : Août 2008
    Messages : 14
    Points : 15
    Points
    15
    Par défaut EclipseLink-93 Exception Description: The table [item] is not present in this descriptor
    Bonjour,

    J'obtenais également l'erreur «EclipseLink-93 Exception Description: The table [item] is not present in this descriptor» après avoir modifié substantiellement plusieurs de mes entités.

    Il appert que la source de mes problèmes résidait dans des oublis de ma part qui engendraient des instructions incohérentes et qui faisaient que mes entités ne collaient plus avec ma base de données et ni avec les nouveaux liens entre mes tables.

    Le lien suivant m'avait mis sur la piste :
    http://stackoverflow.com/questions/1...ent-in-this-de

    Concrètement j'avais les deux erreurs d'identification suivantes dans mon code :

    1) Le nom de la table spécifié dans la balise @Table ne correspondait pas à la bonne table dans la BD:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    @Entity
    @Table(name = "droits")
    public class DroitsCSM implements Serializable {
    La correction : @Table(name = "droits_csm")

    2) Le nom du champ dans une relation @OneToMany était erronné :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    @JoinColumn(name = "comite")
    @ManyToOne
    private ComitesNoms comite;

    La correction : private Comites comite;

    Donc, si vous obtenez cette erreur, vérifiez attentivement la cohérence de votre code...

Discussions similaires

  1. Exceptions lévée lors du déploiement sur GlassFish
    Par yannick midou dans le forum Glassfish et Payara
    Réponses: 2
    Dernier message: 14/11/2014, 12h26
  2. [Débutant] Problème lors du déploiement de mon application - VB.NET
    Par Aiman.elmachi dans le forum VB.NET
    Réponses: 1
    Dernier message: 22/06/2014, 22h53
  3. Erreur lors du déploiement de mon application
    Par M0llusk59 dans le forum C#
    Réponses: 1
    Dernier message: 19/07/2013, 17h03
  4. Une exception au déploiement de mon Ear incompréhensible
    Par seifdev dans le forum Glassfish et Payara
    Réponses: 0
    Dernier message: 21/04/2010, 23h53
  5. Exception lors du déploiement de petclinic
    Par redsonic dans le forum Spring
    Réponses: 2
    Dernier message: 28/05/2009, 22h47

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo