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

Java EE Discussion :

Connexions client Java et EJB


Sujet :

Java EE

  1. #1
    Membre actif
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2012
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Avril 2012
    Messages : 10
    Par défaut Connexions client Java et EJB
    je suis entrain de faire un projet jEE,donc j'ai commencé par créer la partie persistance ensuite je suis passé a la partie Dao
    j'ai crée une classe siteDao et une interface Remote
    ensuite j'ai créer un projet client java,j'ai configure le fichier JNDi.propreties avec les paramétrés de connexion avec mon serveur
    ensuite j’exécute le main mais je reçois un message d'erreur
    voici le contenu des fichiers siteDaoremote:
    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
    package cartographie_reseaux.dao;
     
    import javax.ejb.Remote;
    import cartographie_reseaux.persistence.Site;
    import java.util.List;
    import cartographie_reseaux.persistence.maps;
    le main client java:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
     
    import cartographie_reseaux.dao.siteDaoremote;
    import cartographie_reseaux.persistence.Site;
    public class Main {
    	public static void main(String[] args) {
    		Site s1=new Site();
    	     s1.setNomsiteg2r("cobra");
    	     s1.setLatitude("12025");
    	     s1.setLongitude("15023");
    	     s1.setNositeg2r(15028);
    	     s1.setRegion("lyon");
    	     s1.setType("XATM");
     
     
    	     siteDaoremote siteDao=null;
    	     try {
     
    	    	 Context ctx=new InitialContext();
    				siteDao=(siteDaoremote) ctx.lookup("siteDao/remote");
    				siteDao.ajouter(s1);
     
     
    		} catch (NamingException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
     
    		// TODO Auto-generated method stub
    	}
     
    	/* (non-Java-doc)
    	 * @see java.lang.Object#Object()
    	 */
    	public Main() {
    		super();
    	}
     
    }
    et le fichier jndi.propreties:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    java.naming.provider.url=localhost:1099
    et le message d'erreur qui s'affiche:

    javax.naming.NameNotFoundException: siteDao not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at Main.main(Main.java:22)
    Merci d'avance

  2. #2
    Membre Expert
    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
    Par défaut
    Bonjour,

    As-tu essayé de préfixer ton nom JNDI avec le nom de l'EAR (Sans le .ear) ?

    http://docs.jboss.org/ejb3/app-serve...ding/jndi.html


    When the EJBs are deployed in an .ear file, the default jndi binding will be prepended by the name of the .ear file. So if the ear file name is foo.ear the default jndi names would be foo/EJB-NAME/remote and foo/EJB-NAME/local. You can override this behavior by defining your own @org.jboss.ejb3.LocalBinding or @org.jboss.ejb3.remoting.RemoteBinding.

  3. #3
    Membre Expert
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Par défaut
    salut Nader.

    Tu déploies sur quel serveur d'app ?

    de mémoire sous glassfish, le lookup est de ce genre :

    "java:global/MonEAR/ModuleEJB/MonInterfaceRemote"

    je ne sais pas si pour les autres serveurs la racine "java:global" est la même.

    edit : tiens, un petit lien :
    http://stackoverflow.com/questions/4...94057#10194057

  4. #4
    Membre Expert
    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
    Par défaut
    D'après le fichier jndi.properties il s'agit de plutôt de JBoss.

  5. #5
    Membre Expert
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Par défaut
    Citation Envoyé par Mathieu.J Voir le message
    D'après le fichier jndi.properties il s'agit de plutôt de JBoss.
    bien vu j'vais pas regardé avec attention.

    Dans la doc de JBOSS, ils construisent la chaine JNDI de cette façon :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    return (RemoteCalculator) context.lookup("ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName);
    le lien :
    https://docs.jboss.org/author/displa...ent+using+JNDI

  6. #6
    Membre actif
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2012
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Avril 2012
    Messages : 10
    Par défaut
    Merci pour vos réponses j'ai essayé de préfixer mon EAr avec le nom JNDI mais ca marche pas,il y a le meme type d'erreur
    Voici les fichiers utulisé
    client java :
    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
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
     
    import cartographiemaps.Dao.siteDaoremote;
    import cartographiemaps.persistence.Site;
     
     
    public class Main {
    	public static void main(String[] args) {
     
    		Site s1=new Site();
    		s1.setLatitude("102020");
    		s1.setLongitude("20587");
    		s1.setNomsiteg2r("10000");
    		s1.setNomsiteg2r("corba");
    		s1.setRegion("lyon");
    		s1.setType("XATM");
    		siteDaoremote siteDao=null;
    		try {
    			Context ctx=new InitialContext();
    			siteDao=(siteDaoremote) ctx.lookup("siteDao/remote");
    			siteDao.ajouter(s1);
     
    		} catch (NamingException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
     
     
     
     
    		// TODO Auto-generated method stub
    	}
     
    	/* (non-Java-doc)
    	 * @see java.lang.Object#Object()
    	 */
    	public Main() {
    		super();
    	}
     
    }
    fichier siteDao
    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
    package cartographiemaps.Dao;
     
    import java.util.List;
     
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
     
    import org.jboss.annotation.ejb.RemoteBinding;
     
     
    import cartographiemaps.persistence.Site;
    import cartographiemaps.persistence.maps;
     
     
    @Stateless
    @RemoteBinding(jndiBinding="siteDao/remote")
     
    public class siteDao implements siteDaoremote {
     
     
    	@PersistenceContext
    	EntityManager entityManager;
     
     
    	public void ajouter(Site site) {
    		entityManager.persist(site);
     
    	}
     
     
    	public void modifier(Site site) {
     
    		entityManager.merge(site);
    	}
     
     
    	public void supprimer(Site site) {
     
    		entityManager.remove(site);
    	}
     
    	public java.util.List<maps> getmap() {
     
    		return entityManager.createQuery("SELECT Site.latitude,Site.longitude FROM Site site").getResultList();
    	}
     
     
    	public List<Site> getsit() {
    		return entityManager.createQuery("FROM Site").getResultList();
    	}
     
    }
    et mon interface remote
    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
    package cartographiemaps.Dao;
     
    import javax.ejb.Remote;
     
    import org.jboss.annotation.ejb.RemoteBinding;
     
    import cartographiemaps.persistence.Site;
    import java.util.List;
    import cartographiemaps.persistence.maps;
     
    @Remote
     
     
    public interface siteDaoremote {
    		public void ajouter(Site site);
    		public void modifier(Site site);
    		public void supprimer(Site site);
    		public List<maps> getmap();
    		public List<Site> getsit();
     
    }

  7. #7
    Membre Expert
    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
    Par défaut
    Essaye de respecter les règles de nommage des classes java

    siteDao => SiteDao
    siteDaoremote => SiteDaoRemote

    C'est souvent source de problème.

  8. #8
    Membre actif
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2012
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Avril 2012
    Messages : 10
    Par défaut
    Merci pour votre réponse Mathieu ,j'ai changé le nom de mes classes java mais j'ai la même erreur

    avax.naming.NameNotFoundException: siteDao not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at Main.main(Main.java:22)

  9. #9
    Membre Expert
    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
    Par défaut
    Du coup il faut changer aussi dans ton lookup JNDI
    siteDao=(siteDaoremote) ctx.lookup("SiteDao/remote");

    As-tu essayé la méthode de fxrobin ?
    As-tu essaye avec l'annotation RemoteBinding ?

  10. #10
    Membre actif
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2012
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Avril 2012
    Messages : 10
    Par défaut
    Merci encore pour votre réponse en effet, j'ai changé mon lookupJNDI
    j'ai essayé avec l'annotation RemoteBinding dans le fichier
    SiteDaoRemote:
    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
    package cartographiemaps.Dao;
     
    import javax.ejb.Remote;
     
    import org.jboss.annotation.ejb.RemoteBinding;
     
    import cartographiemaps.persistence.Site;
    import java.util.List;
    import cartographiemaps.persistence.maps;
     
    @RemoteBinding(jndiBinding="SiteDao/Remote")
     
    @Remote
    public interface SiteDaoRemote {
    		public void ajouter(Site site);
    		public void modifier(Site site);
    		public void supprimer(Site site);
    		public List<maps> getmap();
    		public List<Site> getsit();
     
    }
    fichier SiteDao:
    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 cartographiemaps.Dao;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
     
     
     
    import cartographiemaps.persistence.Site;
    import java.util.List;
    import cartographiemaps.persistence.maps;
     
    @Stateless
     
     
     
    public class SiteDao implements SiteDaoRemote {
     
     
    	@PersistenceContext
    	EntityManager entityManager;
     
     
    	public void ajouter(Site site) {
    		entityManager.persist(site);
     
    	}
     
     
    	public void modifier(Site site) {
     
    		entityManager.merge(site);
    	}
     
     
    	public void supprimer(Site site) {
    		entityManager.remove(site);
     
    	}
     
     
    	public List<maps> getmap() {
     
    		return entityManager.createQuery("SELECT Site.latitude,Site.longitude FROM Site site").getResultList();
    	}
     
     
    	public List<Site> getsit() {
     
    		return entityManager.createQuery("FROM Site").getResultList();
    	}
     
     
     
    	}
    le main client:
    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
    public class Main {
    	public static void main(String[] args) {
     
    		Site s1=new Site();
    		s1.setLatitude("102020");
    		s1.setLongitude("20587");
    		s1.setNomsiteg2r("10000");
    		s1.setNomsiteg2r("corba");
    		s1.setRegion("lyon");
    		s1.setType("XATM");
    		SiteDaoRemote siteDao=null;
    		try {
    			Context ctx=new InitialContext();
    			siteDao=(SiteDaoRemote) ctx.lookup("SiteDao/Remote");
    			siteDao.ajouter(s1);
     
    		} catch (NamingException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
     
     
     
     
    		// TODO Auto-generated method stub
    	}
     
    	/* (non-Java-doc)
    	 * @see java.lang.Object#Object()
    	 */
    	public Main() {
    		super();
    	}
     
    }
    Merci d'avance : Ccool:

  11. #11
    Membre Expert
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    			siteDao=(SiteDaoRemote) ctx.lookup("SiteDao/Remote");
    Je ne vois pas ce que tu as changé ! ton lookup est toujours erroné.
    Il manque la chaine complète.

  12. #12
    Membre actif
    Homme Profil pro
    Étudiant
    Inscrit en
    Avril 2012
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Avril 2012
    Messages : 10
    Par défaut
    Merci,pour votre réponse j'ai essayé de changer le lookup mais ca la meme chose mais j'ai remarque des exceptions au niveau de mon serveur
    il me généré
    10:28:20,025 INFO [Server] Starting JBoss (MX MicroKernel)...
    10:28:20,035 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
    10:28:20,035 INFO [Server] Home Dir: C:\PFE\jboss-4.2.2.GA
    10:28:20,035 INFO [Server] Home URL: file:/C:/PFE/jboss-4.2.2.GA/
    10:28:20,035 INFO [Server] Patch URL: null
    10:28:20,035 INFO [Server] Server Name: default
    10:28:20,035 INFO [Server] Server Home Dir: C:\PFE\jboss-4.2.2.GA\server\default
    10:28:20,040 INFO [Server] Server Home URL: file:/C:/PFE/jboss-4.2.2.GA/server/default/
    10:28:20,040 INFO [Server] Server Log Dir: C:\PFE\jboss-4.2.2.GA\server\default\log
    10:28:20,040 INFO [Server] Server Temp Dir: C:\PFE\jboss-4.2.2.GA\server\default\tmp
    10:28:20,040 INFO [Server] Root Deployment Filename: jboss-service.xml
    10:28:21,451 INFO [ServerInfo] Java version: 1.6.0_31,Sun Microsystems Inc.
    10:28:21,451 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 20.6-b01,Sun Microsystems Inc.
    10:28:21,451 INFO [ServerInfo] OS-System: Windows 7 6.1,x86
    10:28:22,510 INFO [Server] Core system initialized
    10:28:25,619 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
    10:28:25,626 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
    10:28:26,105 WARN [ServiceController] Problem starting service jboss:service=WebService
    java.lang.Exception: Port 8083 already in use.
    at org.jboss.web.WebServer.start(WebServer.java:233)
    at org.jboss.web.WebService.startService(WebService.java:322)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at org.jboss.system.ServiceController.start(ServiceController.java:435)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:508)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.BindException: Address already in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(Unknown Source)
    at java.net.ServerSocket.bind(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at org.jboss.web.WebServer.start(WebServer.java:226)
    ... 50 more
    10:28:26,200 WARN [ServiceController] Problem starting service jboss:service=Naming
    java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
    java.net.BindException: Address already in use: JVM_Bind
    at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
    at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
    at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
    at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
    at java.rmi.server.UnicastRemoteObject.exportObject(Unknown Source)
    at org.jnp.server.Main.initJnpInvoker(Main.java:354)
    at org.jnp.server.Main.start(Main.java:316)
    at org.jboss.naming.NamingService.startService(NamingService.java:284)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at org.jboss.system.ServiceController.start(ServiceController.java:435)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)

  13. #13
    Membre Expert
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Par défaut
    il suffit de lire le log

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    10:28:26,105 WARN [ServiceController] Problem starting service jboss:service=WebService
    java.lang.Exception: Port 8083 already in use.
    tu as déjà une instance du serveur qui tourne, ou un autre programme qui écoute sur le même port : 8083 !

Discussions similaires

  1. Client Java et connexion SSL
    Par Nico02 dans le forum Développement Web en Java
    Réponses: 1
    Dernier message: 14/06/2014, 19h33
  2. Connexion à IOM server depuis client java en sso
    Par cscerim3 dans le forum Administration et Installation
    Réponses: 0
    Dernier message: 10/07/2013, 10h01
  3. Réponses: 0
    Dernier message: 19/10/2012, 01h18
  4. comment gerer plusieurs connexions client/serveur
    Par naili dans le forum C++Builder
    Réponses: 3
    Dernier message: 14/08/2002, 16h58
  5. Je ne peux établir une connexion cliente sous Linux.
    Par Anonymous dans le forum CORBA
    Réponses: 5
    Dernier message: 16/04/2002, 15h57

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