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 :

Problème de déploiement


Sujet :

Wildfly/JBoss Java

  1. #1
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 239
    Points : 173
    Points
    173
    Par défaut Problème de déploiement
    bonjour,

    j'ai essayer de creer une applivation EJB3 avec eclipse et mysql, mais pour le moment j'ai un problème de déploiement, voici mes codes:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    	<persistence-unit name="demoJPA">
    	 <jta-data-source>java:/MySqlDS</jta-data-source>
    	  <mapping-file>META-INF/orm.xml</mapping-file>
    	     <properties>
    	        <property name = "hibernate.dialect"
    	          value ="org.hibernate.dialect.MySQLInnoDBDialect"/>
    	          <property name ="hibernate.hbm2ddl.auto" value="update"/>
    	     </properties>
    	</persistence-unit>
    </persistence>
    mysql-ds.xml:


    [CODE]<?xml version="1.0" encoding="UTF-8"?>

    <!-- $Id: mysql-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
    <!-- Datasource config for MySQL using 3.0.9 available from:
    http://www.mysql.com/downloads/api-jdbc-stable.html
    -->

    <datasources>
    <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://mysql-hostname:3306/idri</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password>soniama</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <!-- should only be used on drivers after 3.22.1 with "ping" support
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    -->
    <!-- sql to call when connection is created
    <new-connection-sql>some arbitrary sql</new-connection-sql>
    -->
    <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
    <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
    -->

    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
    <metadata>
    <type-mapping>mySQL</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>

    [/CODE
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    package com.idri;
     
    import javax.ejb.Remote;
     
    @Remote
     
     
    public interface CustomerDAO {
     
    	public void AddCust (Customer customer);
    	public Customer find(int id);
     
    }
    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
    package com.idri;
     
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
     
    @Stateless
     
    public class CustomerDAOBean implements CustomerDAO {
     
    	@PersistenceContext(name="demoJPA")
    	private EntityManager entityManager;
     
    	public void AddCust(Customer customer) {
     
            entityManager.persist(customer);
     
    	}
     
    	public Customer find(int id) {
     
    		return entityManager.find(Customer.class, id);
    	}
     
    }
    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
    package com.idri;
     
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Table;
     
    @Entity
    @Table(schema="idri", name="customers")
     
    public class Customer implements Serializable {
    	@Id
    	private int id;
     
    	private String name;
     
    	private static final long serialVersionUID = 1L;
     
    	public Customer() {
    		super();
    	}
     
    	public int getId() {
    		return this.id;
    	}
     
    	public void setId(int id) {
    		this.id = id;
    	}
     
    	public String getName() {
    		return this.name;
    	}
     
    	public void setName(String name) {
    		this.name = name;
    	}
     
    }
    et voici ce que j'obtiens au niveau de jboss

    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
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:jar=demoJPA.jar,unitName=demoJPA
      State: NOTYETINSTALLED
      I Depend On:
        jboss.jca:name=MySqlDS,service=DataSourceBinding
      Depends On Me:
        jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
     
    ObjectName: jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
        persistence.units:jar=demoJPA.jar,unitName=demoJPA
     
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.jca:name=MySqlDS,service=DataSourceBinding
      State: NOTYETINSTALLED
      Depends On Me:
        persistence.units:jar=demoJPA.jar,unitName=demoJPA

  2. #2
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    La trace est trop courte. Il semble que la datasource ne soit pas déployée. As-tu une stacktrace plus haut dans tes logs qui seraient plus explicite ?

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    64
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Février 2007
    Messages : 64
    Points : 54
    Points
    54
    Par défaut
    L'erreur doit se trouver bien plus haut, cela n'est qu'un résumé des problèmes de déployement

  4. #4
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 239
    Points : 173
    Points
    173
    Par défaut
    ok, je vais essayer de vous donner la totalité,,,,merci

  5. #5
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 239
    Points : 173
    Points
    173
    Par défaut
    voici ce que j'obtiens:

    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
    15:04:16,781 INFO  [Server] Starting JBoss (MX MicroKernel)...
    15:04:16,781 INFO  [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
    15:04:16,796 INFO  [Server] Home Dir: E:\ProgrammFiles\Serveur\jboss-4.2.2.GA
    15:04:16,796 INFO  [Server] Home URL: file:/E:/ProgrammFiles/Serveur/jboss-4.2.2.GA/
    15:04:16,796 INFO  [Server] Patch URL: null
    15:04:16,796 INFO  [Server] Server Name: default
    15:04:16,796 INFO  [Server] Server Home Dir: E:\ProgrammFiles\Serveur\jboss-4.2.2.GA\server\default
    15:04:16,796 INFO  [Server] Server Home URL: file:/E:/ProgrammFiles/Serveur/jboss-4.2.2.GA/server/default/
    15:04:16,796 INFO  [Server] Server Log Dir: E:\ProgrammFiles\Serveur\jboss-4.2.2.GA\server\default\log
    15:04:16,796 INFO  [Server] Server Temp Dir: E:\ProgrammFiles\Serveur\jboss-4.2.2.GA\server\default\tmp
    15:04:16,796 INFO  [Server] Root Deployment Filename: jboss-service.xml
    15:04:17,109 INFO  [ServerInfo] Java version: 1.5.0_06,Sun Microsystems Inc.
    15:04:17,109 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-b05,Sun Microsystems Inc.
    15:04:17,109 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86
    15:04:17,546 INFO  [Server] Core system initialized
    15:04:19,656 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:8083/
    15:04:19,656 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
    15:04:20,156 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
    15:04:20,156 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
    15:04:20,359 INFO  [TransactionManagerService] Starting recovery manager
    15:04:20,453 INFO  [TransactionManagerService] Recovery manager started
    15:04:20,453 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
    15:04:23,218 INFO  [EJB3Deployer] Starting java:comp multiplexer
    15:04:23,546 INFO  [STDOUT] no object for null
    15:04:23,546 INFO  [STDOUT] no object for null
    15:04:23,562 INFO  [STDOUT] no object for null
    15:04:23,593 INFO  [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
    15:04:23,593 INFO  [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
    15:04:25,937 INFO  [NativeServerConfig] JBoss Web Services - Native
    15:04:25,937 INFO  [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
    15:04:27,000 INFO  [Embedded] Catalina naming disabled
    15:04:27,171 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_06\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.5.0_06\bin\client;C:\Program Files\Java\jre1.5.0_06\bin;E:\PROGRA~1\BCB6\Bin;E:\PROGRA~1\BCB6\Projects\Bpl;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_03\bin
    15:04:27,250 INFO  [Http11Protocol] Initialisation de Coyote HTTP/1.1 sur http-127.0.0.1-8080
    15:04:27,250 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
    15:04:27,250 INFO  [Catalina] Initialization processed in 244 ms
    15:04:27,250 INFO  [StandardService] Démarrage du service jboss.web
    15:04:27,250 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
    15:04:27,312 INFO  [Catalina] Server startup in 65 ms
    15:04:27,421 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
    15:04:28,093 INFO  [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
    15:04:28,265 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
    15:04:28,375 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
    15:04:29,125 INFO  [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
    15:04:29,609 INFO  [MailService] Mail Service bound to java:/Mail
    15:04:29,781 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
    15:04:30,078 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
    15:04:30,109 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
    15:04:30,156 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
    15:04:30,218 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
    15:04:30,250 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
    15:04:30,312 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
    15:04:30,312 INFO  [QuartzResourceAdapter] start quartz!!!
    15:04:30,390 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
    15:04:30,421 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
    15:04:30,421 INFO  [RAMJobStore] RAMJobStore initialized.
    15:04:30,421 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
    15:04:30,421 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
    15:04:30,421 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
    15:04:31,171 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
    15:04:31,421 INFO  [A] Bound to JNDI name: queue/A
    15:04:31,421 INFO  [B] Bound to JNDI name: queue/B
    15:04:31,421 INFO  [C] Bound to JNDI name: queue/C
    15:04:31,421 INFO  [D] Bound to JNDI name: queue/D
    15:04:31,421 INFO  [ex] Bound to JNDI name: queue/ex
    15:04:31,453 INFO  [testTopic] Bound to JNDI name: topic/testTopic
    15:04:31,453 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
    15:04:31,453 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    15:04:31,453 INFO  [testQueue] Bound to JNDI name: queue/testQueue
    15:04:31,500 INFO  [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
    15:04:31,531 INFO  [DLQ] Bound to JNDI name: queue/DLQ
    15:04:31,656 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
    15:04:31,734 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDS' to JNDI name 'java:MySqlDS'
    15:04:32,218 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
    15:04:32,234 INFO  [JmxKernelAbstraction] installing MBean: persistence.units:jar=demoJPA.jar,unitName=demoJPA with dependencies:
    15:04:32,234 INFO  [JmxKernelAbstraction] 	jboss.jca:name=MySQLDS,service=DataSourceBinding
    15:04:32,281 INFO  [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
    15:04:32,281 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3 with dependencies:
    15:04:32,281 INFO  [JmxKernelAbstraction] 	persistence.units:jar=demoJPA.jar,unitName=demoJPA
    15:04:32,281 INFO  [EJB3Deployer] Deployed: file:/E:/ProgrammFiles/Serveur/jboss-4.2.2.GA/server/default/deploy/demoJPA.jar
    15:04:32,312 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    15:04:32,468 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
     
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:jar=demoJPA.jar,unitName=demoJPA
      State: NOTYETINSTALLED
      I Depend On:
        jboss.jca:name=MySQLDS,service=DataSourceBinding
      Depends On Me:
        jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
     
    ObjectName: jboss.j2ee:jar=demoJPA.jar,name=CustomerDAOBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
        persistence.units:jar=demoJPA.jar,unitName=demoJPA
     
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.jca:name=MySQLDS,service=DataSourceBinding
      State: NOTYETINSTALLED
      Depends On Me:
        persistence.units:jar=demoJPA.jar,unitName=demoJPA
     
     
    15:04:32,562 INFO  [Http11Protocol] Démarrage de Coyote HTTP/1.1 sur http-127.0.0.1-8080
    15:04:32,593 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    15:04:32,609 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 15s:813ms
    merci d'avance

  6. #6
    Membre éclairé Avatar de XmasRock
    Inscrit en
    Janvier 2007
    Messages
    729
    Détails du profil
    Informations forums :
    Inscription : Janvier 2007
    Messages : 729
    Points : 821
    Points
    821
    Par défaut
    nom de la Datasource déployée : MySqlDS
    nom que tu utilises dans ton test : MySQLDS

  7. #7
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 239
    Points : 173
    Points
    173
    Par défaut
    non,, ça marche pas,,
    je vais essayer d'autres pistes,,

  8. #8
    Membre habitué
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    239
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2007
    Messages : 239
    Points : 173
    Points
    173
    Par défaut
    c'est bon j'ai reglé le problème,,j'ai modifié ça,,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    <connection-url>jdbc:mysql://mysql-hostname:3306/idri</connection-url>
     
    pour:
    <connection-url>jdbc:mysql://localhost:3306/idri</connection-url>
    merci comme meme pour votre aide

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [ Tomcat ] Problème de déploiement sous tomcat
    Par Seb78 dans le forum Tomcat et TomEE
    Réponses: 5
    Dernier message: 28/10/2004, 11h35
  2. [JOPE] Problème de déploiement
    Par Nuncyco dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 27/09/2004, 20h57
  3. [EJB] Problème de déploiement
    Par Aurore M dans le forum Java EE
    Réponses: 5
    Dernier message: 04/06/2004, 15h37
  4. [TOMCAT] SOAP - Problème de déploiement
    Par seawolfm dans le forum Tomcat et TomEE
    Réponses: 6
    Dernier message: 21/10/2003, 12h36
  5. [CR][VB]Problème de déploiement
    Par pvil dans le forum SDK
    Réponses: 3
    Dernier message: 16/08/2002, 07h39

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