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

Wildfly/JBoss Java Discussion :

JBoss 5.0, Eclipse, Message Driven Bean - Fichier jboss.xml


Sujet :

Wildfly/JBoss Java

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut JBoss 5.0, Eclipse, Message Driven Bean - Fichier jboss.xml
    Bonjour,

    Toujours à la recherche de faire fonctionner une application qui fonctionnait sous glassfish sous JBoss 5.0, j'ai deux Message Driven Bean, mais lorsque je tente de les déployer sur JBoss j'ai des erreurs.

    Avec JBoss 5, faut il toujours les fichiers jboss.xml ? ejb-jar.xml ? en ai-je oublié ?

    J'ai un projet EJB sous eclipse avec ces deux fichiers :

    LocationCoutsMDBBean
    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
     
    package locMDB;
     
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
     
    /**
     *
     * @author Mickael
     */
    @MessageDriven( activationConfig =  {
            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
            @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/CoutQueue"),
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
        })
    public class LocationCoutsMDBBean implements MessageListener {
     
        public LocationCoutsMDBBean() {
        	System.out.println("Je suis crée LocationCoutsMDBBean");
        }
     
        public void onMessage(Message message) {
            if(message instanceof TextMessage){
                try{
                TextMessage msg = (TextMessage)message;
                String text = msg.getText();
                String[] coutsEtDurees = text.split("#");
     
                System.out.println("Cout : "+coutsEtDurees[0]+" Durée : "+coutsEtDurees[1]);
                }catch(JMSException e) {            
                }
            }
            System.out.println("Je suis dans LocationCoutsMDBBean");
        }
     
    }
    et

    LocationMDBBean
    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
     
    package locMDB;
     
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
     
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.jms.Connection;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.MessageProducer;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    /**
     *
     * @author Mickael
     */
    @MessageDriven( name="LocationMDB", activationConfig =  {
            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
            @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/LocationQueue"),
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
        })
    public class LocationMDBBean implements MessageListener {
     
        public LocationMDBBean() {
        	System.out.println("je suis crée LocationMDBBean");
        }
     
        public void onMessage(Message message) {
            if (message instanceof TextMessage) {
               TextMessage msg = (TextMessage) message;
               try{
                String datesAll = msg.getText();
                String[] dates = datesAll.split("#");
                location.Location beanLoc = new location.Location();
     
                DateFormat df = new SimpleDateFormat("yyyy-mm-dd.hh-mm");
                Date dateDebut = df.parse(dates[0]);
                Date dateFin = df.parse(dates[1]);
     
                double cout = beanLoc.calculerCout(dateDebut, dateFin) ;
                double duree = beanLoc.calculTemps(dateDebut, dateFin);
     
                String toSendMessage = cout+"#"+duree;
                sendMessage(toSendMessage);
     
               }catch(JMSException e){
               }catch(ParseException ex) {
               }
               }
            System.out.println("<dates debut et fin de location>");
        }
     
        public void sendMessage(String message){
                    try{
                    Context jndiContext = new InitialContext();            
     
                    javax.jms.ConnectionFactory connectionFactory = (QueueConnectionFactory)jndiContext.lookup("jms/LocationFactory");
     
                    javax.jms.Queue queue = (javax.jms.Queue)jndiContext.lookup("jms/CoutQueue");
     
                    Connection connection = connectionFactory.createConnection();
     
                    Session sessionQ = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
     
                    TextMessage msg = sessionQ.createTextMessage();
     
                    msg.setText(message);
     
                    MessageProducer messageProducer=sessionQ.createProducer(queue);
     
                    messageProducer.send(msg);
                    }
                    catch(JMSException e){
                        System.out.print(e.getMessage());
                    }
                    catch(NamingException ex){
                        System.out.println(ex.getMessage());
                    }
        }
    }
    Voici mon fichier JBoss.xml :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    <?xml version="1.0" encoding="UTF-8"?>
    <jboss>
        <enterprise-beans>
            <message-driven>
                <ejb-name>LocationMDB</ejb-name>
                <destination-jndi-name>jms/LocationQueue</destination-jndi-name>
            </message-driven>
            <message-driven>
                <ejb-name>LocationCoutsMDB</ejb-name>
                <destination-jndi-name>jms/CoutQueue</destination-jndi-name>
            </message-driven>
        </enterprise-beans>
    </jboss>
    J'ai un autre projet dans lequel il y a l'application web qui me produit un .war qui se lance apparemment très bien sans fichiers xml supplémentaires.

    De plus j'ai fait des entity beans et il n'y avait pas besoin non plus de fichiers xml supplémentaire.

    Voici l'erreur que j'ai en lancant l'application sur 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
    17:58:23,549 INFO  [EJBContainer] STARTED EJB: locMDB.LocationCoutsMDBBean ejbName: LocationCoutsMDBBean
    17:58:24,284 WARN  [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@6061a8(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@aa769a destination=jms/CoutQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
    javax.naming.NameNotFoundException: queue not bound
    	at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
    	at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
    	at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
    	at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
    	at javax.naming.InitialContext.lookup(Unknown Source)
    	at org.jboss.util.naming.Util.lookup(Util.java:222)
    	at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
    	at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
    	at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
    	at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
    	at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
    	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)
    J'espère que vous pourrez me dire s'il me manque des fichiers de configurations et s'il y a un endroit précis ou les mettre.

    Merci d'avance.

  2. #2
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Il faut que tu déclares la queue jms/CoutQueue.

    Pour cela, il faut ajouter une portion de config dans le fichier deploy/messaging/destinations-service.xml :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
       <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=CoutQueue"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <depends>jboss.messaging:service=PostOffice</depends>
       </mbean>

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    J'ai fait la modification mais cela n'a rien changé, j'ai toujours les mêmes erreurs.

    J'ai télécharger un .ear ici : http://www.learntechnology.net/conte...jboss_ejb3.jsp

    Je l'ai lancé et j'ai la même erreur que dans mon application.

    Pour JBoss, il faut juste télécharger JBoss, le décompresser, mettre une variable d'environnement et c'est tout ?

  4. #4
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Comme tu déploies une EJB MDB, il faudrait aussi déclarer les queues auxquelles s'abonnent tes EJB.

    Apparemment, celles-ci sont créées automatiquement, mais avec une référence à une queue de délestage qui est queue/DLQ. Ce qui me chagrine, c'est que ce nom est conforme à JBoss 4 (avec JBossMQ), alors qu'en JBoss 5 (avec JBoss Messaging), l'équivalent est jms/DLQ.

    Dans ton premier message, l'erreur porte sur jms/CoutQueue. Es-tu certain qu'après l'ajout que je t'ai demandé, c'est toujours sur la même queue que ça coince, et que ce n'est pas sur jms/LocationQueue ?

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Non j'ai malheureusement toujours la même 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
    21:43:45,753 INFO  [EJBContainer] STARTED EJB: locMDB.LocationCoutsMDBBean ejbName: LocationCoutsMDBBean
    21:43:45,924 WARN  [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1a8344f(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@37d490 destination=jms/CoutQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
    javax.naming.NameNotFoundException: queue not bound
    	at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
    	at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
    	at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
    	at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
    	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
    	at javax.naming.InitialContext.lookup(Unknown Source)
    	at org.jboss.util.naming.Util.lookup(Util.java:222)
    	at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
    	at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
    	at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
    	at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
    	at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
    	at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
    	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)
    désolé ceci est un warning...voici l'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
    21:43:46,065 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/LocationDVD_Async.jar state=PreReal mode=Manual requiredState=Real
    org.jboss.deployers.spi.DeploymentException: java.lang.NullPointerException: name cannot be null
    	at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:100)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
    	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
    	at org.jboss.Main.boot(Main.java:209)
    	at org.jboss.Main$1.run(Main.java:547)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NullPointerException: name cannot be null
    	at javax.management.ObjectName.construct(Unknown Source)
    	at javax.management.ObjectName.<init>(Unknown Source)
    	at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:96)
    	... 20 more

  6. #6
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Je me rends compte que je raconte des bêtises. Le nom JNDI n'a pas changé entre la 4 et la 5.

    J'ai regardé notre discussion d'hier. Et j'ai retrouvé ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
          <attribute name="DefaultQueueJNDIContext">/jms</attribute>
    Avais-tu fait cette modif ?

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Oui

  8. #8
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Bon, je ne suis pas certain que ce soit la solution la plus propre, mais pour ce soir je n'ai pas d'autre idée.

    Il cherche queue/DLQ, or la modif d'hier a fait créer jms/DLQ.

    Dans destinations-services.xml, essaie de modifier la DLQ comme ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
       <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=DLQ"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <depends>jboss.messaging:service=PostOffice</depends>
          <attribute name="JNDIBindings">
             <bindings>
                <binding>/queue/DLQ</binding>
             </bindings>
          </attribute>
       </mbean>
    C'est sans garantie, mais ça se tente...

  9. #9
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Hum, non désolé :/

    J'ai de nouvelles erreurs qui correspondent aux modifications :

    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
    22:10:10,081 ERROR [AbstractKernelController] Error installing to Configured: name=jboss.messaging.destination:name=DLQ,service=Queue state=Instantiated mode=Manual requiredState=Configured
    java.lang.RuntimeException: No Attribute found with name: JNDIBindings for jboss.messaging.destination:service=Queue,name=DLQ, attributes: [Instance, MessageCounterHistoryDayLimit, DownCacheSize, DLQ, ScheduledMessageCount, PageSize, ServerPeer, MessageCount, RedeliveryDelay, MaxSize, Clustered, SecurityConfig, MessageStatistics, FullSize, MessageCounter, Name, ExpiryQueue, MaxDeliveryAttempts, DeliveringCount, CreatedProgrammatically, JNDIName, ConsumerCount]
    	at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:142)
    	at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:114)
    	at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:58)
    	at org.jboss.system.microcontainer.ConfigureAction.installAction(ConfigureAction.java:42)
    	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    	at org.jboss.system.ServiceController.install(ServiceController.java:274)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:95)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
    	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
    	at org.jboss.Main.boot(Main.java:209)
    	at org.jboss.Main$1.run(Main.java:547)
    	at java.lang.Thread.run(Unknown Source)

  10. #10
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    On va donc essayer autre chose. Reviens à la config initiale du DLQ (sans la portion JNDIBindings).

    et ajoute ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
       <mbean code="org.jboss.naming.NamingAlias"      name="jboss.messaging.destination:service=Queue,name=DLQ,alias=queue/DLQ">
          <attribute name="FromName">queue/DLQ</attribute>
          <attribute name="ToName">jms/DLQ</attribute>
          <depends>jboss:service=Naming</depends>
       </mbean>

  11. #11
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Je n'ai plus les deux warning sur la queue, par contre je viens de voir que j'avais celui-ci mais je pense pas qu'il soit très important :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    22:28:59,128 WARN  [Ejb3DescriptorHandler] Descriptor based bean has no ejb-class defined: LocationCoutsMDB
    et ensuite j'ai toujours la même erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    22:28:59,659 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/LocationDVD_Async.jar state=PreReal mode=Manual requiredState=Real
    org.jboss.deployers.spi.DeploymentException: java.lang.NullPointerException: name cannot be null
    Est ce que tu veux toute la trace du déploiement ?

  12. #12
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Petite explication sur ce qu'on a fait : la queue interne à JBoss qui d'appelle DLQ (pour Dead Letter Queue) a maintenant 1 nom JNDI qui est jms/DLQ, et en plus un alias qui est queue/DLQ.

    Entre temps, j'ai récupéré mon poste avec un JBoss Messaging et j'ai pu faire un petit essai, et au lieu du JNDIBindings, il aurait fallu faire ceci :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
       <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=DLQ"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <depends>jboss.messaging:service=PostOffice</depends>
          <attribute name="JNDIName">/queue/DLQ</attribute>
       </mbean>
    Comme ceci, la DLQ retrouve son nom par défaut, sans alias.

    L'autre solution, un peu plus lourde, était de faire référence explicitement à notre DLQ :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
       <mbean code="org.jboss.jms.server.destination.QueueService"
          name="jboss.messaging.destination:service=Queue,name=CoutQueue"
          xmbean-dd="xmdesc/Queue-xmbean.xml">
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <depends>jboss.messaging:service=PostOffice</depends>
          <attribute name="DLQ">jboss.messaging.destination:service=Queue,name=DLQ</attribute>
       </mbean>
    Mais si l'alias fonctionne, ça fera l'affaire...

  13. #13
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Pour ton erreur, toute la trace, ça ferait un peu gros, mais si tu as d'autres erreurs ou warn, ce serait intéressant.

    Sinon, comme ça, ça ne me dit rien.

  14. #14
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Voici un résumé, juste les erreurs et warn :

    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
     
    22:44:27,753 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
     
    22:44:49,956 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.
     
    22:44:49,987 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
     
    22:44:50,581 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.recovery.ActionStatusService_2] - Other Exception: java.lang.NullPointerException
     
    22:44:50,581 ERROR [STDERR] java.lang.NullPointerException
    22:44:50,581 ERROR [STDERR] 	at com.arjuna.ats.arjuna.recovery.ActionStatusService.doWork(ActionStatusService.java:123)
    22:44:50,581 ERROR [STDERR] 	at com.arjuna.ats.internal.arjuna.recovery.Connection.run(Connection.java:83)
     
    22:44:54,674 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))
     
    22:44:55,221 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
     
    22:44:55,221 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
     
    22:44:55,862 WARN  [Ejb3DescriptorHandler] Descriptor based bean has no ejb-class defined: LocationCoutsMDB
     
    22:44:56,393 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/LocationDVD_Async.jar state=PreReal mode=Manual requiredState=Real
    org.jboss.deployers.spi.DeploymentException: java.lang.NullPointerException: name cannot be null
     
    22:44:56,424 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
     
    *** CONTEXTS IN ERROR: Name -> Error
     
    vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/LocationDVD_Async.jar -> java.lang.NullPointerException: name cannot be null
     
    22:44:56,456 INFO  [Http11Protocol] D�marrage de Coyote HTTP/1.1 sur http-127.0.0.1-8080
     
    22:44:57,643 ERROR [STDERR] java.lang.IllegalStateException: BaseClassLoader@204d14{vfszip:/C:/jboss-5.0.0.GA/server/default/deploy/LocationDVD_Async.jar} classLoader is not connected to a domain (probably undeployed?) for class javax.resource.spi.endpoint.MessageEndpoint
    Je me demande de plus en plus si ce n'est pas mon installation de jboss qui est mauvaise..

  15. #15
    Membre éprouvé
    Avatar de hasalex
    Homme Profil pro
    Développeur Java
    Inscrit en
    Janvier 2009
    Messages
    879
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 54
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Janvier 2009
    Messages : 879
    Points : 1 269
    Points
    1 269
    Par défaut
    Ça ne m'inspire absolument rien.

    Effectivement, après les modifs faites et défaites, tu as peut-être des choses qui traînent. Tu peux essayer de refaire une installation, puis recréer et tester les queues, puis seulement déployer ton application.

    En y allant pas à pas, tu y verras peut-être plus clair.

    Sur ces bonnes paroles, je vais me coucher. Bonne nuit...

  16. #16
    Membre du Club
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    86
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 86
    Points : 42
    Points
    42
    Par défaut
    Bon et bien j'ai cherché, mais pas trouvé, j'ai réinstaller tout bien, je me suis fait un petit MDB tout simpliste et là ça a marché !

    Enfin merci pour tous les bindings, je ne m'en serais pas sorti sinon !

Discussions similaires

  1. Message Driven Bean avec JBoss
    Par ahmeddrira dans le forum Développement Web en Java
    Réponses: 0
    Dernier message: 19/04/2012, 13h30
  2. Message Driven Bean
    Par jockhip12 dans le forum Plateformes (Java EE, Jakarta EE, Spring) et Serveurs
    Réponses: 1
    Dernier message: 17/04/2011, 20h05
  3. [EJB MDB] Démarrage conditionné d'un Message-Driven Bean
    Par Boojum dans le forum Java EE
    Réponses: 2
    Dernier message: 16/02/2010, 13h17
  4. [EJB MDB] Envoi de mail message-driven bean
    Par totofe dans le forum Java EE
    Réponses: 2
    Dernier message: 30/10/2009, 15h56
  5. JBoss et Message Driven Bean - ConnectionFactory
    Par GrooveRage dans le forum Wildfly/JBoss
    Réponses: 11
    Dernier message: 04/02/2009, 18h26

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