java.lang.NullPointerException

Hibernate JIRA | Raphael A BEREHOUDOUGOU | 1 decade ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi, I am experiencing the now famous ManyToMany hiberante entity manager bug. I have read the many post on the forum and tried the alternative : using Set instead of collections, using Lazy Fetch type but none of that works for me. The problem is as follow : A product belongs to many Classes of Products A Product belongs to many Famillies of Products So, when creating a product, the product famillies and Classes can be selected. Code: import java.io.Serializable; import java.util.Set; import java.util.TreeSet; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.classification.Classe; import com.elina.commercialis.server.stock.classification.Famille; @Entity @Table(name = "produit") public class Produit implements Serializable, Comparable { private long produitID; private String codeProduit; private String libelleProduit; private Set<Classe> classes; private Set<Famille> familles; private Stock stock; private long version; public Produit() { this.stock = new Stock(); stock.setProduit(this); classes = new TreeSet<Classe>(); familles = new TreeSet<Famille>(); } @Version() @Column(name="version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER) @JoinTable(name = "classe_produit", joinColumns = { @JoinColumn(name = "produit_id") }, inverseJoinColumns = { @JoinColumn(name = "classe_id") }) public Set<Classe> getClasses() { return classes; } public void setClasses(Set<Classe> classes) { this.classes = classes; } @Column(name = "code_produit") public String getCodeProduit() { return codeProduit; } public void setCodeProduit(String codeProduit) { this.codeProduit = codeProduit; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER ) @JoinTable(name = "famille_produit", joinColumns = { @JoinColumn(name = "produit_id") }, inverseJoinColumns = { @JoinColumn(name = "famille_id") }) public Set<Famille> getFamilles() { return familles; } public void setFamilles(Set<Famille> familles) { this.familles = familles; } @Column(name = "libelle_produit") public String getLibelleProduit() { return libelleProduit; } public void setLibelleProduit(String libelleProduit) { this.libelleProduit = libelleProduit; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "produit_id") public long getProduitID() { return produitID; } public void setProduitID(long produitID) { this.produitID = produitID; } @OneToOne(cascade = {CascadeType.ALL}) @JoinColumn(name = "stock_id") public Stock getStock() { return stock; } public void setStock(Stock stock) { this.stock = stock; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Produit)) return false; else return this.getCodeProduit().equalsIgnoreCase(((Produit)obj).getCodeProduit()); } public int hashCode() { int result = 17; result = 37 * result + this.getCodeProduit().hashCode(); return result; } public String toString() { return this.getLibelleProduit(); } public int compareTo(Object obj) { if(!(obj instanceof Produit)) return -1; else return this.getCodeProduit().compareTo(((Produit)obj).getCodeProduit()); } } Code: import java.io.Serializable; import java.util.Collection; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.produit.Produit; @Entity @Table(name = "famille") public class Famille implements Serializable, Comparable { private long familleID; private String codeFamille; private String nomFamille; private String description; private Set<Produit> produits; private long version; @Version() @Column(name = "version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @Column(name = "code_famille") public String getCodeFamille() { return codeFamille; } public void setCodeFamille(String codeFamille) { this.codeFamille = codeFamille; } @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "famille_id") public long getFamilleID() { return familleID; } public void setFamilleID(long familleID) { this.familleID = familleID; } @Column(name = "nom_famille") public String getNomFamille() { return nomFamille; } public void setNomFamille(String nomFamille) { this.nomFamille = nomFamille; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mapped By="familles" ) public Set<Produit> getProduits() { return produits; } public void setProduits(Set<Produit> produits) { this.produits = produits; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Famille)) return false; else return this.getCodeFamille().equalsIgnoreCase(((Famille)obj).getCodeFamille()); } public int hashCode() { return this.getCodeFamille().hashCode(); } public String toString() { return this.getNomFamille(); } public int compareTo(Object obj) { if(!(obj instanceof Famille)) return -1; else return this.getNomFamille().compareTo(((Famille)obj).getNomFamille()); } } Code: import java.io.Serializable; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.produit.Produit; @Entity @Table(name = "classe") public class Classe implements Serializable,Comparable { private long classeID; private String codeClasse; private String libelleClasse; private String description; private Set<Produit> produits; private long version; @Version() @Column(name="version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "classe_id") public long getClasseID() { return classeID; } public void setClasseID(long classeID) { this.classeID = classeID; } @Column(name = "code_classe") public String getCodeClasse() { return codeClasse; } public void setCodeClasse(String codeClasse) { this.codeClasse = codeClasse; } @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Column(name = "libelle_classe") public String getLibelleClasse() { return libelleClasse; } public void setLibelleClasse(String libelleClasse) { this.libelleClasse = libelleClasse; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy="classes" ) public Set<Produit> getProduits() { return produits; } public void setProduits(Set<Produit> produits) { this.produits = produits; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Classe)) return false; else return this.getCodeClasse().equalsIgnoreCase(((Classe)obj).getCodeClasse()); } public int hashCode() { return this.getCodeClasse().hashCode(); } public String toString() { return this.getLibelleClasse(); } public int compareTo(Object obj) { if(!(obj instanceof Classe)) return -1; else return this.getLibelleClasse().compareTo(((Classe)obj).getLibelleClasse()); } } After a few update of product (adding /removing Classes/Famillies, the system falls over with the following exception : Code: at java.awt.EventDispatchThread.run(Unknown Source) java.lang.NullPointerException at com.elina.commercialis.server.stock.produit.Produit.hashCode(Produit.java:151) at java.util.HashMap.hash(HashMap.java:264) at java.util.HashMap.put(HashMap.java:382) at java.util.HashSet.add(HashSet.java:194) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273) at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249) at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav a:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:859) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) at org.hibernate.type.EntityType.resolve(EntityType.java:303) at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:217) at org.hibernate.persister.collection.AbstractCollectionPersister.readElement(AbstractCollectionPer sister.java:644) at org.hibernate.collection.PersistentSet.readFrom(PersistentSet.java:262) at org.hibernate.loader.Loader.readCollectionElement(Loader.java:994) at org.hibernate.loader.Loader.readCollectionElements(Loader.java:635) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580) at org.hibernate.loader.Loader.doQuery(Loader.java:689) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav a:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:828) at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.jav a:209) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:100) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:52) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:701) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:685) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:689) at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:138) at org.jboss.ejb3.entity.InjectedEntityManager.merge(InjectedEntityManager.java:146) at com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.modifier(ProduitSess ionFacadeBean.java:29) at com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.sauver(ProduitSessio nFacadeBean.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:5 4) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:219) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java :82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:660) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:513) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:290) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:344) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:202) at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:163) at org.jboss.remoting.Client.invoke(Client.java:258) at org.jboss.remoting.Client.invoke(Client.java:221) at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:6 1) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) at $Proxy0.sauver(Unknown Source) at com.elina.commercialis.client.delegate.stock.produit.ProduitDelegate.createProduit(ProduitDelega te.java:21) at com.elina.commercialis.client.gui.screens.stock.produit.ProduitTab.enregistrer(ProduitTab.java:8 1) at com.elina.commercialis.client.util.gui.screens.CommercialisToolbarBuilder$2.actionPerformed(Comm ercialisToolbarBuilder.java:80) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) I have checked the DB and there are No row with an empty code_produit. As a matter if fact a NULL constraint is defined on this column. Using the debugger, it appear that somehow the hasCode method is called with an Object where codeProduit is null ! Any idea ? This many to many entity manager problem is really taking the fun out of EJB 3.0 !!!!!!!!!!!!!!!!!!!

    Hibernate JIRA | 1 decade ago | Raphael A BEREHOUDOUGOU
    java.lang.NullPointerException
  2. 0

    Hi, I am experiencing the now famous ManyToMany hiberante entity manager bug. I have read the many post on the forum and tried the alternative : using Set instead of collections, using Lazy Fetch type but none of that works for me. The problem is as follow : A product belongs to many Classes of Products A Product belongs to many Famillies of Products So, when creating a product, the product famillies and Classes can be selected. Code: import java.io.Serializable; import java.util.Set; import java.util.TreeSet; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.classification.Classe; import com.elina.commercialis.server.stock.classification.Famille; @Entity @Table(name = "produit") public class Produit implements Serializable, Comparable { private long produitID; private String codeProduit; private String libelleProduit; private Set<Classe> classes; private Set<Famille> familles; private Stock stock; private long version; public Produit() { this.stock = new Stock(); stock.setProduit(this); classes = new TreeSet<Classe>(); familles = new TreeSet<Famille>(); } @Version() @Column(name="version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER) @JoinTable(name = "classe_produit", joinColumns = { @JoinColumn(name = "produit_id") }, inverseJoinColumns = { @JoinColumn(name = "classe_id") }) public Set<Classe> getClasses() { return classes; } public void setClasses(Set<Classe> classes) { this.classes = classes; } @Column(name = "code_produit") public String getCodeProduit() { return codeProduit; } public void setCodeProduit(String codeProduit) { this.codeProduit = codeProduit; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER ) @JoinTable(name = "famille_produit", joinColumns = { @JoinColumn(name = "produit_id") }, inverseJoinColumns = { @JoinColumn(name = "famille_id") }) public Set<Famille> getFamilles() { return familles; } public void setFamilles(Set<Famille> familles) { this.familles = familles; } @Column(name = "libelle_produit") public String getLibelleProduit() { return libelleProduit; } public void setLibelleProduit(String libelleProduit) { this.libelleProduit = libelleProduit; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "produit_id") public long getProduitID() { return produitID; } public void setProduitID(long produitID) { this.produitID = produitID; } @OneToOne(cascade = {CascadeType.ALL}) @JoinColumn(name = "stock_id") public Stock getStock() { return stock; } public void setStock(Stock stock) { this.stock = stock; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Produit)) return false; else return this.getCodeProduit().equalsIgnoreCase(((Produit)obj).getCodeProduit()); } public int hashCode() { int result = 17; result = 37 * result + this.getCodeProduit().hashCode(); return result; } public String toString() { return this.getLibelleProduit(); } public int compareTo(Object obj) { if(!(obj instanceof Produit)) return -1; else return this.getCodeProduit().compareTo(((Produit)obj).getCodeProduit()); } } Code: import java.io.Serializable; import java.util.Collection; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.produit.Produit; @Entity @Table(name = "famille") public class Famille implements Serializable, Comparable { private long familleID; private String codeFamille; private String nomFamille; private String description; private Set<Produit> produits; private long version; @Version() @Column(name = "version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @Column(name = "code_famille") public String getCodeFamille() { return codeFamille; } public void setCodeFamille(String codeFamille) { this.codeFamille = codeFamille; } @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "famille_id") public long getFamilleID() { return familleID; } public void setFamilleID(long familleID) { this.familleID = familleID; } @Column(name = "nom_famille") public String getNomFamille() { return nomFamille; } public void setNomFamille(String nomFamille) { this.nomFamille = nomFamille; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mapped By="familles" ) public Set<Produit> getProduits() { return produits; } public void setProduits(Set<Produit> produits) { this.produits = produits; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Famille)) return false; else return this.getCodeFamille().equalsIgnoreCase(((Famille)obj).getCodeFamille()); } public int hashCode() { return this.getCodeFamille().hashCode(); } public String toString() { return this.getNomFamille(); } public int compareTo(Object obj) { if(!(obj instanceof Famille)) return -1; else return this.getNomFamille().compareTo(((Famille)obj).getNomFamille()); } } Code: import java.io.Serializable; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.Table; import javax.persistence.Version; import com.elina.commercialis.server.stock.produit.Produit; @Entity @Table(name = "classe") public class Classe implements Serializable,Comparable { private long classeID; private String codeClasse; private String libelleClasse; private String description; private Set<Produit> produits; private long version; @Version() @Column(name="version") public long getVersion() { return version; } public void setVersion(long version) { this.version = version; } @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "classe_id") public long getClasseID() { return classeID; } public void setClasseID(long classeID) { this.classeID = classeID; } @Column(name = "code_classe") public String getCodeClasse() { return codeClasse; } public void setCodeClasse(String codeClasse) { this.codeClasse = codeClasse; } @Column(name = "description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Column(name = "libelle_classe") public String getLibelleClasse() { return libelleClasse; } public void setLibelleClasse(String libelleClasse) { this.libelleClasse = libelleClasse; } @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy="classes" ) public Set<Produit> getProduits() { return produits; } public void setProduits(Set<Produit> produits) { this.produits = produits; } public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Classe)) return false; else return this.getCodeClasse().equalsIgnoreCase(((Classe)obj).getCodeClasse()); } public int hashCode() { return this.getCodeClasse().hashCode(); } public String toString() { return this.getLibelleClasse(); } public int compareTo(Object obj) { if(!(obj instanceof Classe)) return -1; else return this.getLibelleClasse().compareTo(((Classe)obj).getLibelleClasse()); } } After a few update of product (adding /removing Classes/Famillies, the system falls over with the following exception : Code: at java.awt.EventDispatchThread.run(Unknown Source) java.lang.NullPointerException at com.elina.commercialis.server.stock.produit.Produit.hashCode(Produit.java:151) at java.util.HashMap.hash(HashMap.java:264) at java.util.HashMap.put(HashMap.java:382) at java.util.HashSet.add(HashSet.java:194) at java.util.AbstractCollection.addAll(AbstractCollection.java:318) at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273) at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268) at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249) at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853) at org.hibernate.loader.Loader.doQuery(Loader.java:717) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav a:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:859) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) at org.hibernate.type.EntityType.resolve(EntityType.java:303) at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:217) at org.hibernate.persister.collection.AbstractCollectionPersister.readElement(AbstractCollectionPer sister.java:644) at org.hibernate.collection.PersistentSet.readFrom(PersistentSet.java:262) at org.hibernate.loader.Loader.readCollectionElement(Loader.java:994) at org.hibernate.loader.Loader.readCollectionElements(Loader.java:635) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580) at org.hibernate.loader.Loader.doQuery(Loader.java:689) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224) at org.hibernate.loader.Loader.loadEntity(Loader.java:1785) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81) at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730) at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav a:365) at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891) at org.hibernate.impl.SessionImpl.get(SessionImpl.java:828) at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.jav a:209) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:100) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:52) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:701) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:685) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:689) at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:138) at org.jboss.ejb3.entity.InjectedEntityManager.merge(InjectedEntityManager.java:146) at com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.modifier(ProduitSess ionFacadeBean.java:29) at com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.sauver(ProduitSessio nFacadeBean.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:5 4) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:219) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java :82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:660) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:513) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:290) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:344) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:202) at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:163) at org.jboss.remoting.Client.invoke(Client.java:258) at org.jboss.remoting.Client.invoke(Client.java:221) at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:6 1) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102) at $Proxy0.sauver(Unknown Source) at com.elina.commercialis.client.delegate.stock.produit.ProduitDelegate.createProduit(ProduitDelega te.java:21) at com.elina.commercialis.client.gui.screens.stock.produit.ProduitTab.enregistrer(ProduitTab.java:8 1) at com.elina.commercialis.client.util.gui.screens.CommercialisToolbarBuilder$2.actionPerformed(Comm ercialisToolbarBuilder.java:80) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) I have checked the DB and there are No row with an empty code_produit. As a matter if fact a NULL constraint is defined on this column. Using the debugger, it appear that somehow the hasCode method is called with an Object where codeProduit is null ! Any idea ? This many to many entity manager problem is really taking the fun out of EJB 3.0 !!!!!!!!!!!!!!!!!!!

    Hibernate JIRA | 1 decade ago | Raphael A BEREHOUDOUGOU
    java.lang.NullPointerException
  3. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 1 year ago
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 7 months ago
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.elina.commercialis.server.stock.produit.Produit.hashCode()
    2. com.elina.commercialis
      Produit.hashCode
      1. com.elina.commercialis.server.stock.produit.Produit.hashCode(Produit.java:151)
      1 frame
    3. Java RT
      AbstractCollection.addAll
      1. java.util.HashMap.hash(HashMap.java:264)
      2. java.util.HashMap.put(HashMap.java:382)
      3. java.util.HashSet.add(HashSet.java:194)
      4. java.util.AbstractCollection.addAll(AbstractCollection.java:318)
      4 frames
    4. Hibernate
      PersistentSet.endRead
      1. org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273)
      1 frame
    5. Hibernate
      AbstractEntityPersister.load
      1. org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183)
      2. org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268)
      3. org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249)
      4. org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866)
      5. org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853)
      6. org.hibernate.loader.Loader.doQuery(Loader.java:717)
      7. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      8. org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
      9. org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
      10. org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
      11. org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
      11 frames
    6. Hibernate
      SessionImpl.internalLoad
      1. org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
      2. org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
      3. org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
      4. org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
      5. org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
      6. org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891)
      7. org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:859)
      7 frames
    7. Hibernate
      AbstractCollectionPersister.readElement
      1. org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
      2. org.hibernate.type.EntityType.resolve(EntityType.java:303)
      3. org.hibernate.type.EntityType.nullSafeGet(EntityType.java:217)
      4. org.hibernate.persister.collection.AbstractCollectionPersister.readElement(AbstractCollectionPersister.java:644)
      4 frames
    8. Hibernate
      PersistentSet.readFrom
      1. org.hibernate.collection.PersistentSet.readFrom(PersistentSet.java:262)
      1 frame
    9. Hibernate
      AbstractEntityPersister.load
      1. org.hibernate.loader.Loader.readCollectionElement(Loader.java:994)
      2. org.hibernate.loader.Loader.readCollectionElements(Loader.java:635)
      3. org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
      4. org.hibernate.loader.Loader.doQuery(Loader.java:689)
      5. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      6. org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
      7. org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
      8. org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
      9. org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
      9 frames
    10. Hibernate
      SessionImpl.merge
      1. org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
      2. org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
      3. org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
      4. org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
      5. org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
      6. org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891)
      7. org.hibernate.impl.SessionImpl.get(SessionImpl.java:828)
      8. org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:209)
      9. org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:100)
      10. org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:52)
      11. org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:701)
      12. org.hibernate.impl.SessionImpl.merge(SessionImpl.java:685)
      13. org.hibernate.impl.SessionImpl.merge(SessionImpl.java:689)
      13 frames
    11. Hibernate EJB
      AbstractEntityManagerImpl.merge
      1. org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:138)
      1 frame
    12. org.jboss.ejb3
      InjectedEntityManager.merge
      1. org.jboss.ejb3.entity.InjectedEntityManager.merge(InjectedEntityManager.java:146)
      1 frame
    13. com.elina.commercialis
      ProduitSessionFacadeBean.sauver
      1. com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.modifier(ProduitSessionFacadeBean.java:29)
      2. com.elina.commercialis.server.facade.stock.produit.ProduitSessionFacadeBean.sauver(ProduitSessionFacadeBean.java:23)
      2 frames
    14. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    15. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
      1 frame
    16. org.jboss.ejb3
      AllowedOperationsInterceptor.invoke
      1. org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
      1 frame
    17. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    18. org.jboss.aspects
      TxInterceptor$RequiresNew.invoke
      1. org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      2. org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
      2 frames
    19. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    20. org.jboss.aspects
      TxPropagationInterceptor.invoke
      1. org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
      1 frame
    21. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    22. org.jboss.ejb3
      StatelessInstanceInterceptor.invoke
      1. org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
      1 frame
    23. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    24. org.jboss.aspects
      AuthenticationInterceptor.invoke
      1. org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
      1 frame
    25. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    26. org.jboss.ejb3
      ENCPropagationInterceptor.invoke
      1. org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
      1 frame
    27. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    28. org.jboss.ejb3
      AsynchronousInterceptor.invoke
      1. org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      1 frame
    29. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    30. org.jboss.ejb3
      StatelessContainer.dynamicInvoke
      1. org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:219)
      1 frame
    31. org.jboss.aop
      Dispatcher.invoke
      1. org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
      1 frame
    32. JBoss Application Server Aspects
      AOPRemotingInvocationHandler.invoke
      1. org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      1 frame
    33. org.jboss.remoting
      Client.invoke
      1. org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:660)
      2. org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:513)
      3. org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:290)
      4. org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:344)
      5. org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:202)
      6. org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:163)
      7. org.jboss.remoting.Client.invoke(Client.java:258)
      8. org.jboss.remoting.Client.invoke(Client.java:221)
      8 frames
    34. JBoss Application Server Aspects
      InvokeRemoteInterceptor.invoke
      1. org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
      1 frame
    35. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    36. org.jboss.aspects
      ClientTxPropagationInterceptor.invoke
      1. org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      1 frame
    37. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    38. org.jboss.aspects
      SecurityClientInterceptor.invoke
      1. org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
      1 frame
    39. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    40. org.jboss.ejb3
      IsLocalInterceptor.invoke
      1. org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
      1 frame
    41. org.jboss.aop
      MethodInvocation.invokeNext
      1. org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      1 frame
    42. org.jboss.ejb3
      StatelessRemoteProxy.invoke
      1. org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
      1 frame
    43. Unknown
      $Proxy0.sauver
      1. $Proxy0.sauver(Unknown Source)
      1 frame
    44. com.elina.commercialis
      CommercialisToolbarBuilder$2.actionPerformed
      1. com.elina.commercialis.client.delegate.stock.produit.ProduitDelegate.createProduit(ProduitDelegate.java:21)
      2. com.elina.commercialis.client.gui.screens.stock.produit.ProduitTab.enregistrer(ProduitTab.java:81)
      3. com.elina.commercialis.client.util.gui.screens.CommercialisToolbarBuilder$2.actionPerformed(CommercialisToolbarBuilder.java:80)
      3 frames
    45. Java RT
      EventDispatchThread.run
      1. javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      2. javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      3. javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      4. javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      5. javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      6. java.awt.Component.processMouseEvent(Unknown Source)
      7. javax.swing.JComponent.processMouseEvent(Unknown Source)
      8. java.awt.Component.processEvent(Unknown Source)
      9. java.awt.Container.processEvent(Unknown Source)
      10. java.awt.Component.dispatchEventImpl(Unknown Source)
      11. java.awt.Container.dispatchEventImpl(Unknown Source)
      12. java.awt.Component.dispatchEvent(Unknown Source)
      13. java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      14. java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      15. java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      16. java.awt.Container.dispatchEventImpl(Unknown Source)
      17. java.awt.Window.dispatchEventImpl(Unknown Source)
      18. java.awt.Component.dispatchEvent(Unknown Source)
      19. java.awt.EventQueue.dispatchEvent(Unknown Source)
      20. java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      21. java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      22. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      23. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      24. java.awt.EventDispatchThread.run(Unknown Source)
      24 frames