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

JPA Java Discussion :

Problème JNDI (EJB3+JPA)


Sujet :

JPA Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Mars 2011
    Messages
    22
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

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

    Informations forums :
    Inscription : Mars 2011
    Messages : 22
    Par défaut Problème JNDI (EJB3+JPA)
    tout d'abord, un grand salut à toute la communauté,
    Bon, ça fait maintenant une journée que je galère avec un problème de EJB, j'ai pu constaté que le problème réside au niveau de mon nom JNDI.

    voici mes codes ainsi que les logs.

    Entity:
    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
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    package model;
     
    import java.io.Serializable;
    import javax.persistence.*;
    import java.util.List;
     
     
    /**
     * The persistent class for the annonceur database table.
     * 
     */
    @Entity
    @Table(name="annonceur")
    public class Annonceur implements Serializable {
    	private static final long serialVersionUID = 1L;
     
    	@Id
    	@GeneratedValue(strategy=GenerationType.IDENTITY)
    	private Integer idannonceur;
     
        @Lob()
    	private String adresse;
     
    	private int anneenaiss;
     
    	private String email;
     
    	private String identifiant;
     
    	private String nom;
     
    	private String pass;
     
    	private String prenom;
     
    	private int tel;
     
    	private String ville;
     
    	//bi-directional many-to-one association to Annonce
    	@OneToMany(mappedBy="annonceur", cascade={CascadeType.ALL})
    	private List<Annonce> annonces;
     
    	//bi-directional many-to-one association to Commentaire
    	@OneToMany(mappedBy="annonceur", cascade={CascadeType.ALL})
    	private List<Commentaire> commentaires;
     
        public Annonceur() {
        }
     
    	public Integer getIdannonceur() {
    		return this.idannonceur;
    	}
     
    	public void setIdannonceur(Integer idannonceur) {
    		this.idannonceur = idannonceur;
    	}
     
    	public String getAdresse() {
    		return this.adresse;
    	}
     
    	public void setAdresse(String adresse) {
    		this.adresse = adresse;
    	}
     
    	public int getAnneenaiss() {
    		return this.anneenaiss;
    	}
     
    	public void setAnneenaiss(int anneenaiss) {
    		this.anneenaiss = anneenaiss;
    	}
     
    	public String getEmail() {
    		return this.email;
    	}
     
    	public void setEmail(String email) {
    		this.email = email;
    	}
     
    	public String getIdentifiant() {
    		return this.identifiant;
    	}
     
    	public void setIdentifiant(String identifiant) {
    		this.identifiant = identifiant;
    	}
     
    	public String getNom() {
    		return this.nom;
    	}
     
    	public void setNom(String nom) {
    		this.nom = nom;
    	}
     
    	public String getPass() {
    		return this.pass;
    	}
     
    	public void setPass(String pass) {
    		this.pass = pass;
    	}
     
    	public String getPrenom() {
    		return this.prenom;
    	}
     
    	public void setPrenom(String prenom) {
    		this.prenom = prenom;
    	}
     
    	public int getTel() {
    		return this.tel;
    	}
     
    	public void setTel(int tel) {
    		this.tel = tel;
    	}
     
    	public String getVille() {
    		return this.ville;
    	}
     
    	public void setVille(String ville) {
    		this.ville = ville;
    	}
     
    	public List<Annonce> getAnnonces() {
    		return this.annonces;
    	}
     
    	public void setAnnonces(List<Annonce> annonces) {
    		this.annonces = annonces;
    	}
     
    	public List<Commentaire> getCommentaires() {
    		return this.commentaires;
    	}
     
    	public void setCommentaires(List<Commentaire> commentaires) {
    		this.commentaires = commentaires;
    	}
     
    }
    SessionBean:

    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
    package dao;
     
    import java.util.ArrayList;
    import java.util.List;
     
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
     
    import model.Annonceur;
     
    /**
     * Session Bean implementation class AnnonceurDao
     */
    @Stateless
    public class AnnonceurDao implements AnnonceurDaoLocal {
     
    	@PersistenceContext(unitName="Module_AnnoncesV1.1")
    	private EntityManager em;
     
        /**
         * Default constructor. 
         */
        public AnnonceurDao() {
            // TODO Auto-generated constructor stub
        }
     
        public String insert(Annonceur a){
        	em.getTransaction().begin();
        	em.persist(a);
        	em.getTransaction().commit();
        	return "annonceurinsere";
     
        }
    	public String delete(Annonceur a){
    		return "annonceursupp";
    	}
    	public String update(Annonceur a){
    		return "annonceurmaj";
    	}
    	public Annonceur getAnnonceurById(Integer i){
    		Annonceur a = new Annonceur();
    		return a;
    	}
    	public List<Annonceur> getAnnonceurs(){
    		List<Annonceur> l = new ArrayList<Annonceur>();
    		return l;
    	}
     
    	public void hello(){
    		System.out.println("Hello world !");
    	}
     
    }
    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
    package dao;
    import javax.ejb.Local;
     
     
     
    import java.util.*;
     
    import model.Annonceur;
     
    @Local
    public interface AnnonceurDaoLocal {
    	public String insert(Annonceur a);
    	public String delete(Annonceur a);
    	public String update(Annonceur a);
    	public Annonceur getAnnonceurById(Integer i);
    	public List<Annonceur> getAnnonceurs();
    	public void hello();
     
    }
    Ma servlet qui est séparée de mon module EJB (implémentée dans un projet web dynamique):

    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
    package vue;
     
    import java.io.IOException;
    import java.io.PrintWriter;
     
    import javax.ejb.EJB;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
     
     
    import dao.AnnonceurDao;
    import dao.AnnonceurDaoLocal;
     
    import model.Annonceur;
     
    /**
     * Servlet implementation class MaServletOne
     */
    public class MaServletOne extends HttpServlet {
    	private static final long serialVersionUID = 1L;
     
    	/*@EJB(mappedName="AnnonceurDao/local")
    	private AnnonceurDaoLocal aad;*/
     
     
     
        /**
         * @see HttpServlet#HttpServlet()
         */
        public MaServletOne() {
            super();
            // TODO Auto-generated constructor stub
        }
     
    	/**
             * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
             */
    	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    		// TODO Auto-generated method stub
     
     
    		PrintWriter pw = response.getWriter();
    		/*Annonceur a = new Annonceur();
    		a.setAdresse("archipel japan");
    		a.setAnneenaiss(1989);
    		a.setEmail("@ee.cm");
    		a.setIdentifiant("raiden");
    		a.setPass("azerty");
    		a.setNom("noname");
    		a.setPrenom("snake");
    		a.setTel(23904);
    		a.setVille("tokyo");*/
     
    		try{
    			Context ctx = new InitialContext();
    			AnnonceurDaoLocal ad = (AnnonceurDaoLocal) ctx.lookup("AnnonceurDao/Local");
    			ad.hello();
     
    		}
    			catch (NamingException e) {
    		         e.printStackTrace();
    		      }
     
    		//aad.hello();
     
    		pw.write("Inscription avec succes !");
     
     
     
     
     
     
    	}
     
    	/**
             * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
             */
    	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    		// TODO Auto-generated method stub
    	}
     
    }
    mon déploiement (Quand je démarre le serveur):
    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
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    17:30:22,343 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
    17:30:22,359 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)
    17:30:22,359 INFO  [ServerImpl] Bootstrap URL: null
    17:30:22,359 INFO  [ServerImpl] Home Dir: C:\JBOSS AS\jboss-5.0.0.GA
    17:30:22,359 INFO  [ServerImpl] Home URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/
    17:30:22,359 INFO  [ServerImpl] Library URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/lib/
    17:30:22,359 INFO  [ServerImpl] Patch URL: null
    17:30:22,359 INFO  [ServerImpl] Common Base URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/common/
    17:30:22,359 INFO  [ServerImpl] Common Library URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/common/lib/
    17:30:22,359 INFO  [ServerImpl] Server Name: default
    17:30:22,359 INFO  [ServerImpl] Server Base Dir: C:\JBOSS AS\jboss-5.0.0.GA\server
    17:30:22,359 INFO  [ServerImpl] Server Base URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/
    17:30:22,359 INFO  [ServerImpl] Server Config URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/conf/
    17:30:22,359 INFO  [ServerImpl] Server Home Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default
    17:30:22,359 INFO  [ServerImpl] Server Home URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/
    17:30:22,359 INFO  [ServerImpl] Server Data Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\data
    17:30:22,375 INFO  [ServerImpl] Server Library URL: file:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/lib/
    17:30:22,375 INFO  [ServerImpl] Server Log Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\log
    17:30:22,375 INFO  [ServerImpl] Server Native Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\tmp\native
    17:30:22,375 INFO  [ServerImpl] Server Temp Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\tmp
    17:30:22,375 INFO  [ServerImpl] Server Temp Deploy Dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\tmp\deploy
    17:30:24,015 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/conf/bootstrap.xml
    17:30:25,484 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.IterableTimedVFSCache]
    17:30:25,500 INFO  [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifetime=1800, resolution=60}]
    17:30:26,203 INFO  [CopyMechanism] VFS temp dir: C:\JBOSS AS\jboss-5.0.0.GA\server\default\tmp
    17:30:26,390 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.
    17:30:28,921 INFO  [ServerInfo] Java version: 1.6.0_23,Sun Microsystems Inc.
    17:30:28,921 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 19.0-b09,Sun Microsystems Inc.
    17:30:28,921 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
    17:30:29,062 INFO  [JMXKernel] Legacy JMX core initialized
    17:30:32,593 INFO  [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@108ea49(root=C:\JBOSS AS\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
    17:30:32,593 INFO  [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@108ea49(root=C:\JBOSS AS\jboss-5.0.0.GA\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
    17:30:32,593 INFO  [ProfileServiceImpl] Loaded profile: ProfileImpl@1cfa965{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
    17:30:36,421 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
    17:30:48,781 INFO  [NativeServerConfig] JBoss Web Services - Stack Native Core
    17:30:48,781 INFO  [NativeServerConfig] 3.0.4.SP1
    17:31:01,359 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@18658470{vfszip:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/deploy/Module_AnnoncesV1.1.jar}
    17:31:01,421 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@18658470{vfszip:/C:/JBOSS%20AS/jboss-5.0.0.GA/server/default/deploy/Module_AnnoncesV1.1.jar}
    17:31:06,468 INFO  [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
    17:31:06,812 INFO  [MailService] Mail Service bound to java:/Mail
    17:31:10,031 WARN  [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
    17:31:10,062 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
    17:31:10,343 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
    17:31:10,343 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
    17:31:10,828 INFO  [TransactionManagerService] Initializing recovery manager
    17:31:11,937 INFO  [TransactionManagerService] Recovery manager configured
    17:31:11,937 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
    17:31:12,000 INFO  [TransactionManagerService] Starting transaction recovery manager
    17:31:13,781 INFO  [Http11Protocol] Initialisation de Coyote HTTP/1.1 sur http-127.0.0.1-8080
    17:31:13,828 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
    17:31:13,828 INFO  [StandardService] D�marrage du service jboss.web
    17:31:13,828 INFO  [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.1.GA
    17:31:13,937 INFO  [Catalina] Server startup in 319 ms
    17:31:13,968 INFO  [TomcatDeployment] deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
    17:31:15,734 INFO  [TomcatDeployment] deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
    17:31:15,859 INFO  [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
    17:31:16,203 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/JBOSS AS/jboss-5.0.0.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
    17:31:16,265 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/JBOSS AS/jboss-5.0.0.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
    17:31:16,312 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/JBOSS AS/jboss-5.0.0.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
    17:31:16,343 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/JBOSS AS/jboss-5.0.0.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
    17:31:16,406 INFO  [RARDeployment] Required license terms exist, view vfszip:/C:/JBOSS AS/jboss-5.0.0.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
    17:31:16,656 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
    17:31:16,703 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
    17:31:16,703 INFO  [RAMJobStore] RAMJobStore initialized.
    17:31:16,703 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
    17:31:16,703 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
    17:31:16,703 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
    17:31:18,359 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
    17:31:18,953 WARN  [QuartzTimerServiceFactory] sql failed: CREATE TABLE QRTZ_JOB_DETAILS(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
    17:31:19,031 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
    17:31:19,031 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
    17:31:19,046 INFO  [JobStoreCMT] Using db table-based data access locking (synchronization).
    17:31:19,046 INFO  [JobStoreCMT] Removed 0 Volatile Trigger(s).
    17:31:19,046 INFO  [JobStoreCMT] Removed 0 Volatile Job(s).
    17:31:19,046 INFO  [JobStoreCMT] JobStoreCMT initialized.
    17:31:19,046 INFO  [StdSchedulerFactory] Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance.
    17:31:19,046 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
    17:31:19,062 INFO  [JobStoreCMT] Freed 0 triggers from 'acquired' / 'blocked' state.
    17:31:19,062 INFO  [JobStoreCMT] Recovering 0 jobs that were in-progress at the time of the last shut-down.
    17:31:19,062 INFO  [JobStoreCMT] Recovery complete.
    17:31:19,062 INFO  [JobStoreCMT] Removed 0 'complete' triggers.
    17:31:19,062 INFO  [JobStoreCMT] Removed 0 stale fired job entries.
    17:31:19,078 INFO  [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started.
    17:31:19,406 INFO  [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started
    17:31:19,546 INFO  [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
    17:31:19,671 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
    17:31:19,671 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1edc134 started
    17:31:19,671 WARN  [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
    17:31:19,671 WARN  [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
    17:31:19,671 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
    17:31:19,671 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@13dca05 started
    17:31:19,671 INFO  [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
    17:31:19,671 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
    17:31:19,671 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@389cc9 started
    17:31:19,875 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
    17:31:19,921 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=annonceseeDS' to JNDI name 'java:annonceseeDS'
    17:31:20,078 INFO  [TomcatDeployment] deploy, ctxPath=/AnnoncesV1.1RC, vfsUrl=AnnoncesV1.1RC.war
    17:31:21,296 INFO  [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
    17:31:21,468 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
    17:31:23,875 INFO  [JBossASKernel] Created KernelDeployment for: Module_AnnoncesV1.1.jar
    17:31:23,890 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=Module_AnnoncesV1.1.jar,name=AnnonceurDao,service=EJB3
    17:31:23,890 INFO  [JBossASKernel]   with dependencies:
    17:31:23,890 INFO  [JBossASKernel]   and demands:
    17:31:23,890 INFO  [JBossASKernel] 	jboss.ejb:service=EJBTimerService
    17:31:23,890 INFO  [JBossASKernel] 	persistence.unit:unitName=#Module_AnnoncesV1.1
    17:31:23,890 INFO  [JBossASKernel]   and supplies:
    17:31:23,890 INFO  [JBossASKernel] 	jndi:AnnonceurDao/remote
    17:31:23,890 INFO  [JBossASKernel] 	Class:dao.AnnonceurDaoLocal
    17:31:23,890 INFO  [JBossASKernel] 	jndi:AnnonceurDao/local
    17:31:23,890 INFO  [JBossASKernel] 	jndi:AnnonceurDao/local-dao.AnnonceurDaoLocal
    17:31:23,890 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=Module_AnnoncesV1.1.jar,name=AnnonceurDao,service=EJB3) to KernelDeployment of: Module_AnnoncesV1.1.jar
    17:31:24,093 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=#Module_AnnoncesV1.1
    17:31:24,484 INFO  [Version] Hibernate Annotations 3.4.0.GA
    17:31:24,515 INFO  [Environment] Hibernate 3.3.1.GA
    17:31:24,546 INFO  [Environment] hibernate.properties not found
    17:31:24,546 INFO  [Environment] Bytecode provider name : javassist
    17:31:24,562 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
    17:31:24,796 INFO  [Version] Hibernate Commons Annotations 3.1.0.GA
    17:31:24,812 INFO  [Version] Hibernate EntityManager 3.4.0.GA
    17:31:24,953 WARN  [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
    17:31:25,187 INFO  [AnnotationBinder] Binding entity from annotated class: model.Theme
    17:31:25,328 INFO  [EntityBinder] Bind entity model.Theme on table theme
    17:31:25,609 INFO  [AnnotationBinder] Binding entity from annotated class: model.Rubrique
    17:31:25,609 INFO  [EntityBinder] Bind entity model.Rubrique on table rubrique
    17:31:25,625 INFO  [AnnotationBinder] Binding entity from annotated class: model.Annonceur
    17:31:25,625 INFO  [EntityBinder] Bind entity model.Annonceur on table annonceur
    17:31:25,625 INFO  [AnnotationBinder] Binding entity from annotated class: model.Commentaire
    17:31:25,625 INFO  [EntityBinder] Bind entity model.Commentaire on table commentaire
    17:31:25,625 INFO  [AnnotationBinder] Binding entity from annotated class: model.Annonce
    17:31:25,640 INFO  [EntityBinder] Bind entity model.Annonce on table annonce
    17:31:25,812 INFO  [CollectionBinder] Mapping collection: model.Theme.rubriques -> rubrique
    17:31:25,812 INFO  [CollectionBinder] Mapping collection: model.Rubrique.annonces -> annonce
    17:31:25,812 INFO  [CollectionBinder] Mapping collection: model.Annonceur.annonces -> annonce
    17:31:25,812 INFO  [CollectionBinder] Mapping collection: model.Annonceur.commentaires -> commentaire
    17:31:25,812 INFO  [CollectionBinder] Mapping collection: model.Annonce.commentaires -> commentaire
    17:31:25,843 INFO  [Version] Hibernate Validator 3.1.0.GA
    17:31:26,015 INFO  [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
    17:31:26,031 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
    17:31:26,046 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource
    17:31:28,343 INFO  [SettingsFactory] RDBMS: MySQL, version: 5.1.37-community-log
    17:31:28,343 INFO  [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.16 ( Revision: ${bzr.revision-id} )
    17:31:28,421 INFO  [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
    17:31:28,437 INFO  [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
    17:31:28,437 INFO  [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
    17:31:28,453 INFO  [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
    17:31:28,453 INFO  [SettingsFactory] Automatic flush during beforeCompletion(): disabled
    17:31:28,453 INFO  [SettingsFactory] Automatic session close at end of transaction: disabled
    17:31:28,453 INFO  [SettingsFactory] JDBC batch size: 15
    17:31:28,453 INFO  [SettingsFactory] JDBC batch updates for versioned data: disabled
    17:31:28,453 INFO  [SettingsFactory] Scrollable result sets: enabled
    17:31:28,453 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
    17:31:28,453 INFO  [SettingsFactory] Connection release mode: auto
    17:31:28,453 INFO  [SettingsFactory] Maximum outer join fetch depth: 2
    17:31:28,453 INFO  [SettingsFactory] Default batch fetch size: 1
    17:31:28,453 INFO  [SettingsFactory] Generate SQL with comments: disabled
    17:31:28,453 INFO  [SettingsFactory] Order SQL updates by primary key: disabled
    17:31:28,453 INFO  [SettingsFactory] Order SQL inserts for batching: disabled
    17:31:28,453 INFO  [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    17:31:28,468 INFO  [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
    17:31:28,468 INFO  [SettingsFactory] Query language substitutions: {}
    17:31:28,468 INFO  [SettingsFactory] JPA-QL strict compliance: enabled
    17:31:28,468 INFO  [SettingsFactory] Second-level cache: enabled
    17:31:28,468 INFO  [SettingsFactory] Query cache: disabled
    17:31:28,500 INFO  [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
    17:31:28,500 INFO  [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
    17:31:28,500 INFO  [SettingsFactory] Optimize cache for minimal puts: disabled
    17:31:28,500 INFO  [SettingsFactory] Cache region prefix: persistence.unit:unitName=#Module_AnnoncesV1.1
    17:31:28,500 INFO  [SettingsFactory] Structured second-level cache entries: disabled
    17:31:28,515 INFO  [SettingsFactory] Statistics: disabled
    17:31:28,515 INFO  [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
    17:31:28,515 INFO  [SettingsFactory] Default entity-mode: pojo
    17:31:28,515 INFO  [SettingsFactory] Named query checking : enabled
    17:31:28,687 INFO  [SessionFactoryImpl] building session factory
    17:31:29,187 INFO  [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=#Module_AnnoncesV1.1
    17:31:29,187 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
    17:31:29,203 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=#Module_AnnoncesV1.1
    17:31:29,203 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
    17:31:29,234 INFO  [SchemaExport] Running hbm2ddl schema export
    17:31:29,250 INFO  [SchemaExport] exporting generated schema to database
    17:31:31,171 INFO  [SchemaExport] schema export complete
    17:31:31,187 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
    17:31:31,312 INFO  [SessionSpecContainer] Starting jboss.j2ee:jar=Module_AnnoncesV1.1.jar,name=AnnonceurDao,service=EJB3
    17:31:31,359 INFO  [EJBContainer] STARTED EJB: dao.AnnonceurDao ejbName: AnnonceurDao
    17:31:31,593 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
     
    	AnnonceurDao/local - EJB3.x Default Local Business Interface
    	AnnonceurDao/local-dao.AnnonceurDaoLocal - EJB3.x Local Business Interface
     
    17:31:31,796 INFO  [Http11Protocol] D�marrage de Coyote HTTP/1.1 sur http-127.0.0.1-8080
    17:31:31,859 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    17:31:31,875 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)] Started in 1m:9s:485ms
    Mon erreur:
    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
    17:32:08,906 ERROR [STDERR] javax.naming.NameNotFoundException: Local not bound
    17:32:08,906 ERROR [STDERR] 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
    17:32:08,906 ERROR [STDERR] 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
    17:32:08,906 ERROR [STDERR] 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
    17:32:08,906 ERROR [STDERR] 	at vue.MaServletOne.doGet(MaServletOne.java:61)
    17:32:08,906 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    17:32:08,906 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    17:32:08,906 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    17:32:08,906 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    17:32:08,906 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
    17:32:08,906 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
    17:32:08,906 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    17:32:08,906 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:662)
    Et merci d'avance de vos réponses.

  2. #2
    Membre averti
    Profil pro
    Inscrit en
    Avril 2010
    Messages
    65
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Avril 2010
    Messages : 65
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    			Context ctx = new InitialContext();
    			AnnonceurDaoLocal ad = (AnnonceurDaoLocal) ctx.lookup("projet/AnnonceurDao/Local");
    			ad.hello();
    D'après moi il te manque le nom de ton projet (ajouté en gras) dans ton appel

  3. #3
    Candidat au Club
    Homme Profil pro
    Ingénieur développement de composants
    Inscrit en
    Février 2012
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement de composants

    Informations forums :
    Inscription : Février 2012
    Messages : 3
    Par défaut
    il faut utilisé des . au lieu des / !!!

Discussions similaires

  1. Problème association EJB3 / Weblogic / JPA / JSF
    Par limalima dans le forum JSF
    Réponses: 2
    Dernier message: 18/06/2014, 22h17
  2. [EJB3] [JPA] TransientObjectException
    Par peuhhh dans le forum JPA
    Réponses: 4
    Dernier message: 08/01/2008, 08h58
  3. Problème déploiement EJB3 JBoss Cargo
    Par vain_mich dans le forum Maven
    Réponses: 1
    Dernier message: 27/07/2007, 10h46
  4. Réponses: 3
    Dernier message: 15/05/2007, 16h47
  5. [Debutant] Bean entité BMP - problème JNDI
    Par Tanahjampea dans le forum Tomcat et TomEE
    Réponses: 2
    Dernier message: 17/01/2006, 09h00

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