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]Deployed WebServices Probleme Help


Sujet :

Wildfly/JBoss Java

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Avril 2003
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2003
    Messages : 21
    Points : 18
    Points
    18
    Par défaut [JBoss]Deployed WebServices Probleme Help
    Bonsoir,

    Je cherche à déployer mon web services sous JBoss 4.0.5.
    Mes WS sont fait à partir d'EJB

    CalcInterfaces, qui est l'interface pour les EJB
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
    import java.rmi.Remote;
    import java.rmi.RemoteException;
     
    public interface CalcInterfaces extends Remote {
    	public String add(int x, int y) throws RemoteException;
    	public String mult(int x, int y) throws RemoteException;
    	public String sub(int x, int y) throws RemoteException;
    	public String div(int x, int y) throws RemoteException;
    }

    Fichier remote pour les EJBs
    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 java.rmi.RemoteException;
    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.jws.soap.SOAPBinding.Style;
     
    @Stateless
    @WebService
    @SOAPBinding(style=Style.RPC)
    public class CalcWS implements CalcInterfaces {
     
    	   private String msgAdd = new String("Result of the add operation = ");
    	   private String msgSub = new String("Result of the sub operation = ");
    	   private String msgMult = new String("Result of the mult operation = ");
    	   private String msgDiv = new String("Result of the div operation = ");  
     
    	   //et les méthodes à prendre en compte au déploiement
    	   @WebMethod
    	        public String add(int x, int y) throws RemoteException {
    	        Integer z = x + y;
    	        return msgAdd + z + ".";
    	   }
     
    	   @WebMethod
    	        public String mult(int x, int y) throws RemoteException {
    	        Integer z = x * y;
    	        return msgMult + z + ".";
    	   }
     
    	   @WebMethod
    	        public String sub(int x, int y) throws RemoteException {
    	        Integer z = x - y;
    	        return msgSub + z + ".";
    	   }
     
    	   @WebMethod
    	        public String div(int x, int y) throws RemoteException {
    	        Integer z = x / y;
    	        return msgDiv + z + ".";
    	   }
    	}
    Mon fichier web.xml
    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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    	<display-name>ProjetWebServices</display-name>
    	<description>
    		Exemple de fichier web.xml avec des informations
    		sur les servlets.
        </description>
     
     
    	<servlet>
    		<servlet-name>TestService</servlet-name>
    		<servlet-class>fr.umlv.CalcWS</servlet-class>
    	</servlet>
     
    	<servlet-mapping>
    		<servlet-name>TestService</servlet-name>
    		<url-pattern>/*</url-pattern>
        </servlet-mapping>
     
    </web-app>
    Je fais un war grace à mon ant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    	<target name="war">
    	   <war warfile="${basedir}/libs/ProjetWebServices.war" webxml="${Web.dir}/WEB-INF/web.xml">
    			<fileset dir="${build.dir}/classes">
    	   			<include name="fr/umlv/*.class"/>
    	   		</fileset>
    	    </war>
    	</target>
    Lors du déploiment sur mon server JBoss j'ai le droit à une exception directement
    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
     
    20:03:25,093 ERROR [MainDeployer] Could not create deployment: file:/C:/Program Files/jboss-4.0.5.GA/server/default/deploy/ProjetWebServices.war
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClass(Unknown Source)
    	at java.security.SecureClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.access$100(Unknown Source)
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(Unknown Source)
    	at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:672)
    	at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:652)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:190)
    	at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoader(UnifiedLoaderRepository3.java:277)
    	at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:189)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
    	at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.isWebserviceDeployment(DeployerInterceptorJSE.java:124)
    	at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:76)
    	at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:74)
    	at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
    	at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
    	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 $Proxy43.create(Unknown Source)
    	at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
    	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
    	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    	at sun.reflect.GeneratedMethodAccessor19.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 $Proxy8.deploy(Unknown Source)
    	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
    	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
    	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
    Ca fait des heures que je suis dessus je n'arrive pas à voir de solution.
    Si vous avez des lumieres à m'offir je suis prenneur.

    Bonne soirée

  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
    tu dois avoir un proleme de JDK. Utilises tu le JDK5 ?

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Avril 2003
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2003
    Messages : 21
    Points : 18
    Points
    18
    Par défaut
    Je ne sais pas ce qu'il m'a fait eclipse mais l'ensemble de mon workspace etait en 1.5 et mon projet etait lui en 1.6.

    Ca fait plaisir de voir marcher ce que l'on fait merci à toi XmasRock

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

Discussions similaires

  1. Réponses: 0
    Dernier message: 17/05/2008, 19h48
  2. Réponses: 3
    Dernier message: 10/04/2008, 14h02
  3. Mario Problem help
    Par macio dans le forum GLUT
    Réponses: 3
    Dernier message: 31/12/2007, 20h27
  4. deux meme constructeurs, probleme help.
    Par Mobistar dans le forum Langage
    Réponses: 8
    Dernier message: 09/05/2007, 11h12
  5. [JBoss][Eclipse & XDoclet] Problème au deploy d'une servlet
    Par zegreg dans le forum Wildfly/JBoss
    Réponses: 6
    Dernier message: 04/04/2006, 20h35

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