J'ai créer un projet "Entreprise Application"
- sur le module EJB j'ai généré les classes de la base de données:
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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
package persistenceLayer.entity;
 
import java.util.ArrayList;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.persistence.PersistenceContext;
import persistence.entity.Etudiant;
 
/**
 *
 * @author Administrateur
 */
@Stateless
public class EtudiantFacade extends AbstractFacade<Etudiant> implements EtudiantFacadeLocal{
    @PersistenceContext(unitName = "echange-ejbPU")
    private EntityManager em;
 
    protected EntityManager getEntityManager() {
        return em;
    }
 
    public EtudiantFacade() {
        super(Etudiant.class);
    }
    public void create(Etudiant u){
            em.persist(u);
    }
    @Override
    public List<Etudiant> findAll(){
        return em.createQuery("SELECT * FROM Etudiant").getResultList();
    }
     public void remove(long id){
        em.remove(id);
    }
     public Etudiant findUser(Long id){
        return em.find(Etudiant.class, id);
    }
}
et sur l'application war
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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 
package servlet;
 
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import persistence.entity.Etudiant;
import persistenceLayer.entity.EtudiantFacade;
 
/**
 *
 * @author Administrateur
 */
@WebServlet(name="test", urlPatterns={"/test"})
public class test extends HttpServlet {
    @EJB
    Etudiant e;
 
    /** 
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
 
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet test</title>");  
            out.println("</head>");
            out.println("<body>");
            e=new Etudiant(1);
            System.out.print(e.getId());
            out.println("</body>");
            out.println("</html>");
        } catch(Exception ex) {
            ex.printStackTrace();
            out.close();
        }
    } 
 
    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /** 
     * Handles the HTTP <code>GET</code> method.
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        processRequest(request, response);
    } 
 
    /** 
     * Handles the HTTP <code>POST</code> method.
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        processRequest(request, response);
    }
 
    /** 
     * Returns a short description of the servlet.
     * @return a String containing servlet description
     */
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>
 
}
mais il m'affiche l'erreur suivant
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
30 janv. 2012 17:26:57 com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Welcome to Felix
================
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Starting Grizzly Framework 1.9.18-o - Mon Jan 30 17:27:01 WET 2012
INFO: Starting Grizzly Framework 1.9.18-o - Mon Jan 30 17:27:02 WET 2012
INFO: Grizzly Framework 1.9.18-o started in: 346ms listening on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 235ms listening on port 7676
INFO: Grizzly Framework 1.9.18-o started in: 301ms listening on port 3700
INFO: Grizzly Framework 1.9.18-o started in: 478ms listening on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 472ms listening on port 4848
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
INFO: SEC1002: Security Manager is OFF.
INFO: Security startup service called
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
INFO: Security service(s) started successfully....
INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Created HTTP listener admin-listener on port 4848
INFO: Created virtual server server
INFO: Created virtual server __asadmin
INFO: Virtual server server loaded system default web module
INFO: percistance.entity.Objet actually got transformed
INFO: Portable JNDI names for EJB ObjetFacade : [java:global/test2/test2-ejb/ObjetFacade!percistanceLayer.entity.ObjetFacadeLocal, java:global/test2/test2-ejb/ObjetFacade]
INFO: percistance.entity.Etudiant actually got transformed
INFO: Portable JNDI names for EJB EtudiantFacade : [java:global/test2/test2-ejb/EtudiantFacade, java:global/test2/test2-ejb/EtudiantFacade!percistanceLayer.entity.EtudiantFacadeLocal]
INFO: percistance.entity.Superetudiant actually got transformed
INFO: Portable JNDI names for EJB SuperetudiantFacade : [java:global/test2/test2-ejb/SuperetudiantFacade, java:global/test2/test2-ejb/SuperetudiantFacade!percistanceLayer.entity.SuperetudiantFacadeLocal]
INFO: WELD-000900 1.0.1 (SP3)
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Loading application test2#test2-war.war at test2-war
INFO: Loading test2 Application done is 4842 ms
INFO: Initialisation de Mojarra 2.0.2 (FCS b10) pour le contexte '/TP3JSF'
INFO: Monitoring jndi:/server/TP3JSF/WEB-INF/faces-config.xml for modifications
INFO: Loading application TP3JSF at /TP3JSF
INFO: Loading TP3JSF Application done is 1172 ms
GRAVE: Class [ Lper/Etudiant; ] not found. Error while loading [ class test ]
ATTENTION: Error in annotation processing: java.lang.NoClassDefFoundError: Lper/Etudiant;
INFO: Loading application testing#testing-war.war at testing-war
INFO: Loading testing Application done is 298 ms
INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(4089ms) startup services(7779ms) total(11868ms)
INFO: Binding RMI port to *:8686
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Created HTTP listener http-listener-1 on port 8080
INFO: Grizzly Framework 1.9.18-o started in: 115ms listening on port 8080
INFO: Perform lazy SSL initialization for the listener 'http-listener-2'
INFO: Created HTTP listener http-listener-2 on port 8181
INFO: Grizzly Framework 1.9.18-o started in: 133ms listening on port 8181
INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://khouikha-PC:8686/jndi/rmi://khouikha-PC:8686/jmxrmi
INFO: persistence.entity.Objet actually got transformed
INFO: Portable JNDI names for EJB ObjetFacade : [java:global/echange/echange-ejb/ObjetFacade!persistenceLayer.entity.ObjetFacadeLocal, java:global/echange/echange-ejb/ObjetFacade]
INFO: persistence.entity.Superetudiant actually got transformed
INFO: Portable JNDI names for EJB SuperetudiantFacade : [java:global/echange/echange-ejb/SuperetudiantFacade, java:global/echange/echange-ejb/SuperetudiantFacade!persistenceLayer.entity.SuperetudiantFacadeLocal]
INFO: persistence.entity.Etudiant actually got transformed
INFO: Portable JNDI names for EJB EtudiantFacade : [java:global/echange/echange-ejb/EtudiantFacade!persistenceLayer.entity.EtudiantFacadeLocal, java:global/echange/echange-ejb/EtudiantFacade]
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
ATTENTION: RAR5117 : Failed to obtain/create connection from connection pool [ mysql_echange_rootPool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException
ATTENTION: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: null]
GRAVE: Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 41 more
 
ATTENTION: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
ATTENTION: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
        at org.glassfish.persistence.jpa.PersistenceUnitLoader.doJava2DB(PersistenceUnitLoader.java:273)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:155)
        at org.glassfish.persistence.jpa.JPADeployer.load(JPADeployer.java:55)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
        at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
        at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
        at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: null
Error Code: 0
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:94)
        at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
        at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
        ... 36 more
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: null
        at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:112)
        at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:126)
        ... 41 more
 
ATTENTION: Cannot create tables for application echange. The expected DDL file echange_echange-ejb_echange-ejbPU_createDDL.jdbc is not available.
ATTENTION: Can not find resource bundle for this logger.  class name that failed: org.glassfish.persistence.jpa.PersistenceUnitLoader
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
INFO: Initialisation de Mojarra 2.0.2 (FCS b10) pour le contexte '/echange-war'
INFO: Monitoring jndi:/server/echange-war/WEB-INF/faces-config.xml for modifications
INFO: Loading application echange#echange-war.war at echange-war
INFO: echange was successfully deployed in 6*846 milliseconds.
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\glassfish-3.0.1\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\ADMINI~1\AppData\Local\Temp\fileinstall--975758409681544488, felix.fileinstall.filter = null}
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\glassfish-3.0.1\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\ADMINI~1\AppData\Local\Temp\fileinstall-1263499465193541070, felix.fileinstall.filter = null}
INFO: Started bundle: file:/C:/Program%20Files/glassfish-3.0.1/glassfish/modules/autostart/osgi-web-container.jar
INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: Installed C:\Program Files\glassfish-3.0.1\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg
INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\glassfish-3.0.1\glassfish\domains\domain1\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\ADMINI~1\AppData\Local\Temp\fileinstall--322386482946334545, felix.fileinstall.filter = null}
INFO: PWC1412: WebModule[/echange-war] ServletContext.log():PWC1409: Marking servlet test as unavailable
ATTENTION: StandardWrapperValve[test]: PWC1382: Allocate exception for servlet test
com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class servlet.test
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:312)
        at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:709)
        at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:1937)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1252)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1059)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
        at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
        at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
        at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
        at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
        at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
        at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
        at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
        at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
        at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
        at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
        at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
        at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
        at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalStateException: Exception attempting to inject Remote ejb-ref name=servlet.test/e,Remote 3.x interface =persistence.entity.Etudiant,ejb-link=null,lookup=null,mappedName=,jndi-name=persistence.entity.Etudiant,refType=Session into class servlet.test
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:133)
        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:47)
        at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)
        at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:204)
        at org.glassfish.weld.services.JCDIServiceImpl.createManagedObject(JCDIServiceImpl.java:178)
        at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:456)
        at com.sun.enterprise.container.common.impl.managedbean.ManagedBeanManagerImpl.createManagedBean(ManagedBeanManagerImpl.java:423)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:295)
        ... 27 more
Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=servlet.test/e,Remote 3.x interface =persistence.entity.Etudiant,ejb-link=null,lookup=null,mappedName=,jndi-name=persistence.entity.Etudiant,refType=Session into class servlet.test
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:168)
        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:126)
        ... 34 more
Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/servlet.test/e' in SerialContext  [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=servlet.test/e,Remote 3.x interface =persistence.entity.Etudiant,ejb-link=null,lookup=null,mappedName=,jndi-name=persistence.entity.Etudiant,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'persistence.entity.Etudiant#persistence.entity.Etudiant' [Root exception is javax.naming.NamingException: Lookup failed for 'persistence.entity.Etudiant#persistence.entity.Etudiant' in SerialContext  [Root exception is javax.naming.NameNotFoundException: persistence.entity.Etudiant#persistence.entity.Etudiant not found]]]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:513)
        ... 37 more
Caused by: javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=servlet.test/e,Remote 3.x interface =persistence.entity.Etudiant,ejb-link=null,lookup=null,mappedName=,jndi-name=persistence.entity.Etudiant,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'persistence.entity.Etudiant#persistence.entity.Etudiant' [Root exception is javax.naming.NamingException: Lookup failed for 'persistence.entity.Etudiant#persistence.entity.Etudiant' in SerialContext  [Root exception is javax.naming.NameNotFoundException: persistence.entity.Etudiant#persistence.entity.Etudiant not found]]
        at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:174)
        at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$EjbReferenceProxy.create(ComponentEnvManagerImpl.java:1040)
        at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:688)
        at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:657)
        at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
        ... 39 more
Caused by: javax.naming.NamingException: Lookup failed for 'persistence.entity.Etudiant#persistence.entity.Etudiant' in SerialContext  [Root exception is javax.naming.NameNotFoundException: persistence.entity.Etudiant#persistence.entity.Etudiant not found]
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at com.sun.ejb.EjbNamingReferenceManagerImpl.resolveEjbReference(EjbNamingReferenceManagerImpl.java:169)
        ... 44 more
Caused by: javax.naming.NameNotFoundException: persistence.entity.Etudiant#persistence.entity.Etudiant not found
        at com.sun.enterprise.naming.impl.TransientContext.doLookup(TransientContext.java:197)
        at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:168)
        at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:58)
        at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:101)
        at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
        ... 46 more
Aidez moi S.V.P
C'est quoi la solution