TP12 pb de déploiement glassfish4 [résolu]

Modérateurs : graffiop, jmdouin, agoncal, mlebihan

yasmineK
Messages : 21
Inscription : 03 oct. 2013 11:14

TP12 pb de déploiement glassfish4 [résolu]

Message par yasmineK » 18 janv. 2014 18:46

Bonjour,
j'ai développé les classes manquantes du tp12 sous Eclipse.
La tâche ant yaps-mark passe sans relever d'erreur.
Pourtant l'auto-déploiement dans glassfish échoue avec toute une série de ce type de messages:

[#|2014-01-18T17:16:17.725+0100|SEVERE|glassfish 4.0|org.apache.jasper.servlet.J
spServlet|_ThreadID=21;_ThreadName=http-listener-1(3);_TimeMillis=1390061777725;
_LevelValue=1000;|
PWC6117: File "C:\Applications\java\glassfish-4.0\glassfish\domains\domain1\do
croot\yapswtp12\index.jsp" not found|#]

Du coup je ne peux pas lancer les tests Selenium.
Avez-vous le même souci, l'avez-vous résolu?
Merci
Yasmine
Dernière édition par yasmineK le 20 janv. 2014 14:53, édité 1 fois.

Perrin
Messages : 7
Inscription : 07 oct. 2012 15:00

Re: TP12 pb de déploiement glassfish4

Message par Perrin » 19 janv. 2014 0:13

Bonjour,

Je n'en suis encore là

Mais j'ai constaté que dans les fichiers du dossier web/META-INF utilisé par Glassfish, il est fait référence à 'petstoreDS11' et non 'petstoreDS12'.
De même dans le fichier src/config/application.xml.

Peut-être faut-il modifier ces fichiers ?

uwabamisu
Messages : 32
Inscription : 04 janv. 2013 1:24

Re: TP12 pb de déploiement glassfish4

Message par uwabamisu » 19 janv. 2014 0:26

Perrin a écrit :Bonjour,

Je n'en suis encore là

Mais j'ai constaté que dans les fichiers du dossier web/META-INF utilisé par Glassfish, il est fait référence à 'petstoreDS11' et non 'petstoreDS12'.
De même dans le fichier src/config/application.xml.

Peut-être faut-il modifier ces fichiers ?
Non de mémoire on doit utiliser la même base de données qu'au TP11. Fin ça coûte rien d'essayer.

yasmineK
Messages : 21
Inscription : 03 oct. 2013 11:14

Re: TP12 pb de déploiement glassfish4

Message par yasmineK » 19 janv. 2014 13:07

Bonjour,
Savez-vous comment désinstaller le tp11 du serveur glassFish proprement?
Le déploiement de yapswtp12.war sous glassFish 4 ne fonctionne toujours pas pour moi.
J'ai testé en supprimant les fichiers du rep web/META-INF et en les rectifiant simplement pour le tp12, c'est idem.
La tâche ant check passe avec succès, j'ai bien inséré le code demandé dans le domain.xml de glassFish.
Dans le fichier build.xml du tp12 j'ai complété certains noms de modules glassFish 4 en ajoutant "-api":

Code : Tout sélectionner

 
    <property name="servlet-api.jar" value="${glassfish.home}/modules/javax.servlet-api.jar"/>
    <property name="jsp-api.jar" value="${glassfish.home}/modules/javax.servlet.jsp-api.jar"/>
    <property name="ejb-api.jar" value="${glassfish.home}/modules/javax.ejb-api.jar"/>
    <property name="jms-api.jar" value="${glassfish.home}/modules/javax.jms-api.jar"/>
    <property name="transaction-api.jar" value="${glassfish.home}/modules/javax.transaction-api.jar"/>
    <property name="naming-api.jar" value="${glassfish.home}/modules/glassfish-naming.jar"/>
   
Voici les erreurs sur le serveur lors d'une tentative de déploiement. Il semble qu'il y ait un problème de nom déjà existant au niveau de jndi. Est-ce que ce peut-être un conflit avec l'appli yaps du tp11? (J'arrive à déployer la correction du tp11)
Bon dimanche,

Code : Tout sélectionner

  visiting unvisited references|#]

[#|2014-01-19T11:40:25.888+0100|INFO|glassfish 4.0|javax.enterprise.system.tools
.deployment.common|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=13901280258
88;_LevelValue=800;|
  visiting unvisited references|#]

[#|2014-01-19T11:40:25.888+0100|INFO|glassfish 4.0|javax.enterprise.system.tools
.deployment.common|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=13901280258
88;_LevelValue=800;|
  visiting unvisited references|#]

[#|2014-01-19T11:40:26.310+0100|INFO|glassfish 4.0|org.eclipse.persistence.sessi
on.file:/C:/Applications/java/glassfish-4.0/glassfish/domains/domain1/applicatio
ns/yapswtp12/WEB-INF/lib/server.jar_petstorePU|_ThreadID=94;_ThreadName=AutoDepl
oyer;_TimeMillis=1390128026310;_LevelValue=800;|
  EclipseLink, version: Eclipse Persistence Services - 2.5.0.v20130507-3faac2b|#
]

[#|2014-01-19T11:40:26.357+0100|INFO|glassfish 4.0|org.eclipse.persistence.sessi
on.file:/C:/Applications/java/glassfish-4.0/glassfish/domains/domain1/applicatio
ns/yapswtp12/WEB-INF/lib/server.jar_petstorePU.connection|_ThreadID=94;_ThreadNa
me=AutoDeployer;_TimeMillis=1390128026357;_LevelValue=800;|
  file:/C:/Applications/java/glassfish-4.0/glassfish/domains/domain1/application
s/yapswtp12/WEB-INF/lib/server.jar_petstorePU login successful|#]

[#|2014-01-19T11:40:26.529+0100|SEVERE|glassfish 4.0|javax.enterprise.system.too
ls.deployment.common|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=139012802
6529;_LevelValue=1000;|
  Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load meth
od
java.lang.RuntimeException: EJB Container initialization error
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplicatio
n.java:234)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java
:313)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:493)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.ja
va:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunner
Impl.java:537)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:546)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:1423)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunn
erImpl.java:108)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execut
e(CommandRunnerImpl.java:1762)
        at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.j
ava:164)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.
java:595)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeploy
er.java:482)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:410)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:401)
        at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeplo
yService.java:233)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.RuntimeException: Error while binding JNDI name com.yaps.pe
tstore.server.service.customer.CustomerService__3_x_Internal_RemoteBusinessHome_
_ for EJB CustomerSB
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1552)
        at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(State
lessSessionContainer.java:190)
        at com.sun.ejb.containers.StatelessContainerFactory.createContainer(Stat
elessContainerFactory.java:63)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplicatio
n.java:221)
        ... 20 more
Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.Cos
Naming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/Al
readyBound:1.0]
        at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.j
ava:92)
        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:612)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:637)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:675)
        at javax.naming.InitialContext.bind(InitialContext.java:419)
        at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosN
amingObject(GlassfishNamingManagerImpl.java:230)
        at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.j
ava:4857)
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1539)
        ... 23 more
Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosN
aming/NamingContext/AlreadyBound:1.0
        at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(Alread
yBoundHelper.java:60)
        at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)

        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:601)
        ... 29 more
|#]

[#|2014-01-19T11:40:26.529+0100|SEVERE|glassfish 4.0|javax.enterprise.system.cor
e|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390128026529;_LevelValue=10
00;_MessageID=NCLS-CORE-00026;|
  Exception during lifecycle processing
java.lang.RuntimeException: EJB Container initialization error
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplicatio
n.java:234)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java
:313)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:493)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.ja
va:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunner
Impl.java:537)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:546)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:1423)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunn
erImpl.java:108)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execut
e(CommandRunnerImpl.java:1762)
        at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.j
ava:164)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.
java:595)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeploy
er.java:482)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:410)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:401)
        at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeplo
yService.java:233)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.RuntimeException: Error while binding JNDI name com.yaps.pe
tstore.server.service.customer.CustomerService__3_x_Internal_RemoteBusinessHome_
_ for EJB CustomerSB
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1552)
        at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(State
lessSessionContainer.java:190)
        at com.sun.ejb.containers.StatelessContainerFactory.createContainer(Stat
elessContainerFactory.java:63)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplicatio
n.java:221)
        ... 20 more
Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.Cos
Naming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/Al
readyBound:1.0]
        at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.j
ava:92)
        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:612)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:637)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:675)
        at javax.naming.InitialContext.bind(InitialContext.java:419)
        at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosN
amingObject(GlassfishNamingManagerImpl.java:230)
        at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.j
ava:4857)
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1539)
        ... 23 more
Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosN
aming/NamingContext/AlreadyBound:1.0
        at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(Alread
yBoundHelper.java:60)
        at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)

        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:601)
        ... 29 more
|#]

[#|2014-01-19T11:40:26.529+0100|SEVERE|glassfish 4.0|javax.enterprise.system.cor
e|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390128026529;_LevelValue=10
00;|
  Exception while loading the app|#]

[#|2014-01-19T11:40:26.545+0100|SEVERE|glassfish 4.0|javax.enterprise.web.util|_
ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390128026545;_LevelValue=1000;
|
  The web application [unknown] created a ThreadLocal with key of type [org.glas
sfish.pfl.dynamic.codegen.impl.CurrentClassLoader$1] (value [org.glassfish.pfl.d
ynamic.codegen.impl.CurrentClassLoader$1@7ba9c044]) and a value of type [org.gla
ssfish.web.loader.WebappClassLoader] (value [WebappClassLoader (delegate=true; r
epositories=WEB-INF/classes/)]) but failed to remove it when the web application
 was stopped. Threads are going to be renewed over time to try and avoid a proba
ble memory leak.|#]

[#|2014-01-19T11:40:26.560+0100|INFO|glassfish 4.0|org.eclipse.persistence.sessi
on.file:/C:/Applications/java/glassfish-4.0/glassfish/domains/domain1/applicatio
ns/yapswtp12/WEB-INF/lib/server.jar_petstorePU.connection|_ThreadID=58;_ThreadNa
me=pool-3-thread-1;_TimeMillis=1390128026560;_LevelValue=800;|
  file:/C:/Applications/java/glassfish-4.0/glassfish/domains/domain1/application
s/yapswtp12/WEB-INF/lib/server.jar_petstorePU logout successful|#]

[#|2014-01-19T11:40:26.576+0100|SEVERE|glassfish 4.0|javax.enterprise.system.cor
e|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390128026576;_LevelValue=10
00;|
  Exception while loading the app : EJB Container initialization error
java.lang.RuntimeException: Error while binding JNDI name com.yaps.petstore.serv
er.service.customer.CustomerService__3_x_Internal_RemoteBusinessHome__ for EJB C
ustomerSB
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1552)
        at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(State
lessSessionContainer.java:190)
        at com.sun.ejb.containers.StatelessContainerFactory.createContainer(Stat
elessContainerFactory.java:63)
        at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplicatio
n.java:221)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
        at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
        at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java
:313)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:493)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationL
ifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.ja
va:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunner
Impl.java:537)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:546)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunner
Impl.java:1423)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunn
erImpl.java:108)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execut
e(CommandRunnerImpl.java:1762)
        at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.j
ava:164)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.
java:595)
        at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeploy
er.java:482)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:410)
        at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.jav
a:401)
        at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeplo
yService.java:233)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: javax.naming.NameAlreadyBoundException [Root exception is org.omg.Cos
Naming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosNaming/NamingContext/Al
readyBound:1.0]
        at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.j
ava:92)
        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:612)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:637)
        at com.sun.jndi.cosnaming.CNCtx.bind(CNCtx.java:675)
        at javax.naming.InitialContext.bind(InitialContext.java:419)
        at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishCosN
amingObject(GlassfishNamingManagerImpl.java:230)
        at com.sun.ejb.containers.BaseContainer$JndiInfo.publish(BaseContainer.j
ava:4857)
        at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.jav
a:1539)
        ... 23 more
Caused by: org.omg.CosNaming.NamingContextPackage.AlreadyBound: IDL:omg.org/CosN
aming/NamingContext/AlreadyBound:1.0
        at org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read(Alread
yBoundHelper.java:60)
        at org.omg.CosNaming._NamingContextStub.bind(_NamingContextStub.java:67)

        at com.sun.jndi.cosnaming.CNCtx.callBindOrRebind(CNCtx.java:601)
        ... 29 more
|#]

[#|2014-01-19T11:40:26.895+0100|WARNING|glassfish 4.0|javax.enterprise.system.to
ols.deployment.autodeploy|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390
128026895;_LevelValue=900;_MessageID=NCLS-DEPLOYMENT-00036;|
  [AutoDeploy] Echec du dÚploiement automatique : C:\Applications\java\glassfish
-4.0\glassfish\domains\domain1\autodeploy\yapswtp12.war.|#]

[#|2014-01-19T11:40:26.901+0100|WARNING|glassfish 4.0|javax.enterprise.system.to
ols.deployment.autodeploy|_ThreadID=94;_ThreadName=AutoDeployer;_TimeMillis=1390
128026901;_LevelValue=900;_MessageID=NCLS-DEPLOYMENT-00041;|
  Attempt to create file C:\Applications\java\glassfish-4.0\glassfish\domains\do
main1\autodeploy\.autodeploystatus\yapswtp12.war failed; no further information.
|#]


graffiop
Messages : 663
Inscription : 21 juin 2005 14:05

Re: TP12 pb de déploiement glassfish4

Message par graffiop » 20 janv. 2014 11:33

Il semble qu'il y ait un problème de nom déjà existant au niveau de jndi. Est-ce que ce peut-être un conflit avec l'appli yaps du tp11? (J'arrive à déployer la correction du tp11)
Oui. J'ai eu ce comportement.
(Voir aussi les logs dans %GLASSFISH_HOME%\domains\domain1\logs\server.log)

Je fais régulièrement le ménage (après avoir arrêté le serveur par %GLASSFISH_HOME%/bin/stopserv domain1) et supprime
- glassfish\domains\domain1\autodeploy\yapswtp*.*
- glassfish\domains\domain1\autodeploy\.autodeploystatus\yapswtp*.*
- voire glassfish\domains\domain1\applications\yapswtp*


Puis ant deploy ...

yasmineK
Messages : 21
Inscription : 03 oct. 2013 11:14

Re: TP12 pb de déploiement glassfish4

Message par yasmineK » 20 janv. 2014 12:49

Bonjour,
merci Monsieur Graffion pour la démarche.
Après le "nettoyage" du serveur le déploiement du tp12 a bien fonctionné pour moi.
J'ai pu passer les tests Sélénium.
Bonne journée,
Yasmine

Répondre