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

Hibernate Java Discussion :

createQuery Iterator NullPointerException [Débutant(e)] [Core]


Sujet :

Hibernate Java

  1. #1
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut createQuery Iterator NullPointerException
    Bonjour à tous,

    première expérience avec hibernate.

    Je retourne une liste d'Objets, via createQuery().list(), que je lance dans une boucle pour afficher le nom de chaque employé. Vraiment l'exercice basique.

    Il me retourne un NullPointerException, et ensuite il m'affiche une liste d'employés, mais pas la liste complète, et les noms des employés ne concordent pas. Plusieurs fois le même nom, alors que le nom est unique dans ma table.

    Voici ma classe:

    Employee

    Code java : 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
    package be.ditconsulting.domain;
     
    import java.util.Date;
     
    public class Employee {
     
    	private long empNo;
    	private String employeeName;
    	private String jobName;
    	private int managerId;
    	private Date hiredate;
    	private Float salary;
    	private Float commission;
     
     
    	public long getEmpNo() {
    		return empNo;
    	}
    	public void setEmpNo(long empNo) {
    		this.empNo = empNo;
    	}
    	public int getManagerId() {
    		return managerId;
    	}
    	public void setManagerId(int managerId) {
    		this.managerId = managerId;
    	}
    	public Date getHiredate() {
    		return hiredate;
    	}
    	public void setHiredate(Date hiredate) {
    		this.hiredate = hiredate;
    	}
    	public Float getSalary() {
    		return salary;
    	}
    	public void setSalary(Float salary) {
    		this.salary = salary;
    	}
    	public Float getCommission() {
    		return commission;
    	}
    	public void setCommission(Float commission) {
    		this.commission = commission;
    	}
    	public String getEmployeeName() {
    		return employeeName;
    	}
    	public void setEmployeeName(String employeeName) {
    		this.employeeName = employeeName;
    	}
    	public String getJobName() {
    		return jobName;
    	}
    	public void setJobName(String jobName) {
    		this.jobName = jobName;
    	}
    }

    Voici mon fichier de config hibernate.cfg.xml

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC
    		"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
    		"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory>
            <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
            <property name="hibernate.connection.password">tiger</property>
            <property name="hibernate.connection.url">jdbc:oracle:thin:@10.1.1.49:1521:epssdev</property>
            <property name="hibernate.connection.username">scott</property>
            <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
            <mapping resource="be/ditconsulting/domain/Employee.hbm.xml"/>
            <property name="show_sql">true</property>
        </session-factory>
    </hibernate-configuration>

    et voici le fichier de mapping

    Code xml : 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
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <!-- Generated 02-d?c.-2011 9:03:44 by Hibernate Tools 3.4.0.CR1 -->
    <hibernate-mapping>
        <class name="be.ditconsulting.domain.Employee" table="EMP">
            <id name="managerId" type="int">
                <column name="MGR" />
                <generator class="assigned" />
            </id>
            <property name="empNo" type="long">
                <column name="EMPNO" />
            </property>
            <property name="employeeName" type="java.lang.String">
                <column name="ENAME" />
            </property>
            <property name="jobName" type="java.lang.String">
                <column name="JOB" />
            </property>
            <property name="hiredate" type="java.util.Date">
                <column name="HIREDATE" />
            </property>
            <property name="salary" type="float">
                <column name="SAL" />
            </property>
            <property name="commission" type="float">
                <column name="COMM" />
            </property>
        </class>
    </hibernate-mapping>

    Et voici le log

    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
    16 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
    32 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
    32 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
    47 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
    47 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
    188 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
    188 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: be/ditconsulting/domain/hibernate.cfg.xml
    188 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: be/ditconsulting/domain/hibernate.cfg.xml
    282 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : be/ditconsulting/domain/Employee.hbm.xml
    328 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
    344 [main] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
    407 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: be.ditconsulting.domain.Employee -> EMP
    422 [main] INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring
    500 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
    500 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
    500 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
    500 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@10.1.1.49:1521:epssdev
    500 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=scott, password=****}
    844 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    844 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 10.1.0.3.0
    891 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
    891 [main] INFO org.hibernate.engine.jdbc.JdbcSupportLoader - Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
    891 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
    907 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
    907 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    907 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
    907 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
    907 [main] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
    953 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
    1188 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
    Exception in thread "main" Number of employees: 14
    java.lang.NullPointerException
    	at be.ditconsulting.client.MainTest.main(MainTest.java:28)
    SMITH
    ALLEN
    ALLEN
    JONES
    ALLEN
    JONES
    JONES
    SCOTT
    Voilà, si quelqu'un a une idée, elle est la bienvenue.

    Merci d'avance pour vos réponses.
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

  2. #2
    Membre expérimenté
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2004
    Messages
    1 184
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Avril 2004
    Messages : 1 184
    Points : 1 745
    Points
    1 745
    Par défaut
    Il faudrait que tu nous montre ta classe MainTest.java (En précisant la ligne 28)

  3. #3
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut
    Complètement oublié d'ajouter cette classe.

    Code java : 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
    package be.ditconsulting.client;
     
    import java.util.Iterator;
    import java.util.List;
     
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.AnnotationConfiguration;
     
    import be.ditconsulting.domain.Employee;
     
    public class MainTest {
     
    	/**
             * @param args
             */
    	public static void main(String[] args) {
    		SessionFactory sessionFactory = new AnnotationConfiguration()
    				.configure("be/ditconsulting/domain/hibernate.cfg.xml")
    				.buildSessionFactory();
    		Session session = sessionFactory.openSession();
     
    		List<Employee> employees = session.createQuery("from Employee").list();
    		System.out.println("Number of employees: " + employees.size());
    		Iterator<Employee> it = employees.iterator();
    		while (it.hasNext()) {
    			Employee emp = it.next();
    			String name = emp.getEmployeeName() != null ? emp.getEmployeeName()
    					: "";
    		}	
    	}
    }
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

  4. #4
    Membre expérimenté
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2004
    Messages
    1 184
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Avril 2004
    Messages : 1 184
    Points : 1 745
    Points
    1 745
    Par défaut
    Le seul moyen d'avoir une NullPointerException à la ligne 28 serait que ta liste contienne des éléments NULL.

    Essaye :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    while (it.hasNext()) {
    	Employee emp = it.next();
    	System.err.println("EMP="+emp);
    }
    Voir ce que ça affiche.

    Ou lance un coup de debugger.


    Au passage, tu peux utiliser les "foreach"
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    for(Employee emp : employees) {
     
    }

  5. #5
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut
    En effet, un des Employee est null:

    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
    Number of employees: 14
    EMP: be.ditconsulting.domain.Employee@19a029e
    EMP: be.ditconsulting.domain.Employee@15718f2
    EMP: be.ditconsulting.domain.Employee@15718f2
    EMP: be.ditconsulting.domain.Employee@16dfa45
    EMP: be.ditconsulting.domain.Employee@15718f2
    EMP: be.ditconsulting.domain.Employee@16dfa45
    EMP: be.ditconsulting.domain.Employee@16dfa45
    EMP: be.ditconsulting.domain.Employee@149eb9f
    EMP: null
    EMP: be.ditconsulting.domain.Employee@15718f2
    EMP: be.ditconsulting.domain.Employee@c3014
    EMP: be.ditconsulting.domain.Employee@15718f2
    EMP: be.ditconsulting.domain.Employee@149eb9f
    EMP: be.ditconsulting.domain.Employee@289d2e
    Maintenant le tout est de savoir pourquoi il est null.

    Ce qui me chiffonne aussi, ce sont les objets.

    J'ai rédéfini la méthode toString() pour qu'il m'affiche les données de chaque Employee.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    EMP: Employee [empNo=7369, employeeName=SMITH, jobName=CLERK, managerId=7902, hiredate=1980-12-17 00:00:00.0, salary=800.0, commission=null]
    EMP: Employee [empNo=7499, employeeName=ALLEN, jobName=SALESMAN, managerId=7698, hiredate=1981-02-20 00:00:00.0, salary=1600.0, commission=300.0]
    EMP: Employee [empNo=7499, employeeName=ALLEN, jobName=SALESMAN, managerId=7698, hiredate=1981-02-20 00:00:00.0, salary=1600.0, commission=300.0]
    EMP: Employee [empNo=7566, employeeName=JONES, jobName=MANAGER, managerId=7839, hiredate=1981-04-02 00:00:00.0, salary=2975.0, commission=null]
    EMP: Employee [empNo=7499, employeeName=ALLEN, jobName=SALESMAN, managerId=7698, hiredate=1981-02-20 00:00:00.0, salary=1600.0, commission=300.0]
    EMP: Employee [empNo=7566, employeeName=JONES, jobName=MANAGER, managerId=7839, hiredate=1981-04-02 00:00:00.0, salary=2975.0, commission=null]
    EMP: Employee [empNo=7566, employeeName=JONES, jobName=MANAGER, managerId=7839, hiredate=1981-04-02 00:00:00.0, salary=2975.0, commission=null]
    EMP: Employee [empNo=7788, employeeName=SCOTT, jobName=ANALYST, managerId=7566, hiredate=1987-04-19 00:00:00.0, salary=3000.0, commission=null]
    EMP: null
    EMP: Employee [empNo=7499, employeeName=ALLEN, jobName=SALESMAN, managerId=7698, hiredate=1981-02-20 00:00:00.0, salary=1600.0, commission=300.0]
    EMP: Employee [empNo=7876, employeeName=ADAMS, jobName=CLERK, managerId=7788, hiredate=1987-05-23 00:00:00.0, salary=1100.0, commission=null]
    EMP: Employee [empNo=7499, employeeName=ALLEN, jobName=SALESMAN, managerId=7698, hiredate=1981-02-20 00:00:00.0, salary=1600.0, commission=300.0]
    EMP: Employee [empNo=7788, employeeName=SCOTT, jobName=ANALYST, managerId=7566, hiredate=1987-04-19 00:00:00.0, salary=3000.0, commission=null]
    EMP: Employee [empNo=7934, employeeName=MILLER, jobName=CLERK, managerId=7782, hiredate=1982-01-23 00:00:00.0, salary=1300.0, commission=null]
    Pourquoi Y a-t-il, plusieurs fois le même Objet dans mon itération ??

    Il doit y avor un problème au niveau du chargement des données dans mes objets.

    Merci pour vos réponses.
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

  6. #6
    Membre expérimenté
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2004
    Messages
    1 184
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Avril 2004
    Messages : 1 184
    Points : 1 745
    Points
    1 745
    Par défaut
    Essaye de mettre tes logs en DEBUG pour voir la requête générée.

  7. #7
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut
    Merci de bien vouloir m'expliquer comment mettre en debug les logs d'hibernate.

    j'ai essayé de plusieurs manières sans succès.

    Application stand-alone et non web.

    Merci.
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

  8. #8
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut
    J'ai trouvé le problème.

    C'est la colonne ManagerID qui était considérée comme ID dans le fichier de mapping. Alors que c'est le empNo qui est la primary key de la table EMP.

    Je ne comprends pas pourquoi il l'a considéré comme le ID lors de la génération du fichier depuis JBoss Tools.

    Quoi qu'il en soit, mon problème est résolu.

    Mais je suis quand même curieux de savoir comment débugger une appli hibernate dans eclipse.

    Merci.
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

  9. #9
    Membre expérimenté
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2004
    Messages
    1 184
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Avril 2004
    Messages : 1 184
    Points : 1 745
    Points
    1 745

  10. #10
    Membre expérimenté

    Homme Profil pro
    Senior Développeur JEE
    Inscrit en
    Avril 2002
    Messages
    795
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Senior Développeur JEE
    Secteur : Finance

    Informations forums :
    Inscription : Avril 2002
    Messages : 795
    Points : 1 660
    Points
    1 660
    Par défaut
    Déjà tésté de cette manière. Et cela ne fonctionne pas pour une appli stand-alone.

    Tout ce que j'ai réussi à faire c'est afficher la query générée par hibernate. Et c'est ce qui m'a permis de résoudre mon problème quand j'ai vu que la colonne ManagerID était la première colonne retournée.

    Enfn bon ce n'est pas urgent du tout. Le principal est que j'ai résolu mon problème.

    Merci à toi.
    Langages : Java, SQL
    Outils : Eclipse, Intellij
    SGBD : Oracle, PostgreSQL
    Mes Articles

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. NullPointerException createQuery JPA
    Par Johnny P. dans le forum JPA
    Réponses: 5
    Dernier message: 09/01/2013, 16h14
  2. Iteration VS recursivité
    Par yacinechaouche dans le forum C
    Réponses: 40
    Dernier message: 16/11/2012, 12h52
  3. NullPointerException sur createQuery
    Par verbose dans le forum Hibernate
    Réponses: 4
    Dernier message: 26/03/2010, 17h11
  4. [debutant]iterator
    Par Wis dans le forum Collection et Stream
    Réponses: 3
    Dernier message: 05/05/2003, 11h49
  5. vInt::iterator
    Par Monstros Velu dans le forum C++
    Réponses: 19
    Dernier message: 05/04/2003, 16h06

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