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

Struts 2 Java Discussion :

Application was not properly initialized at startup


Sujet :

Struts 2 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Par défaut Application was not properly initialized at startup
    Bonjour,

    Je développe actuellement une application Struts2 (je débute) + Spring2 + hibernate3 et à mon grand étonnement, lorsque je démarre l'application j'obtiens une erreur qui semble être liée à JSF alors que je ne l'utilise pas ....

    Voici l'erreur retournée :
    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
    11:57:46,324 INFO  [STDOUT] 13-06-2008 11:57:46:308 7422 DEBUG org.apache.struts2.jsf.FacesSetupInterceptor  - Unable to initialize faces
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
    	at org.apache.struts2.jsf.FacesSetupInterceptor.init(FacesSetupInterceptor.java:133)
    	at com.opensymphony.xwork2.ObjectFactory.buildInterceptor(ObjectFactory.java:186)
    	at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:57)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:905)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStack(XmlConfigurationProvider.java:743)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptorStacks(XmlConfigurationProvider.java:756)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadInterceptors(XmlConfigurationProvider.java:777)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:410)
    	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:239)
    	at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
    	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:152)
    	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
    	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
    	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)

    voici ma liste de package :

    commons-logging-1.0.4.jar
    hibernate3.jar
    hibernate-annotations.jar
    hibernate-commons-annotations.jar
    asm-2.2.3.jar
    cglib-nodep-2.1_3.jar
    commons-collections-2.1.1.jar
    dom4j-1.6.1.jar
    ejb3-persistence.jar
    javassist.jar
    jta.jar
    log4j-1.2.14.jar
    spring-aop.jar
    spring-beans.jar
    spring-context.jar
    spring-core.jar
    spring-jdbc.jar
    spring-context-support.jar
    spring-jms.jar
    spring-orm.jar
    spring-test.jar
    spring-tx.jar
    spring-web.jar
    spring-webmvc.jar
    ojdbc14.jar
    spring-aspects.jar
    aopalliance.jar
    antlr-2.7.2.jar
    commons-beanutils-1.6.jar
    commons-chain-1.1.jar
    commons-logging-api-1.1.jar
    commons-validator-1.3.0.jar
    freemarker-2.3.8.jar
    ognl-2.6.11.jar
    oro-2.0.8.jar
    struts2-core-2.0.11.1.jar
    struts2-spring-plugin-2.0.11.1.jar
    struts2-tiles-plugin-2.0.11.1.jar
    tiles-api-2.0.4.jar
    tiles-core-2.0.4.jar
    tiles-jsp-2.0.4.jar
    xwork-2.0.4.jar

    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
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
     
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 
    	xmlns="http://java.sun.com/xml/ns/javaee" 
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    	<display-name>actireport</display-name>
     
    	<!-- Configuration de STRUTS 2 -->   
    	<filter>
        	<filter-name>struts2</filter-name>
        	<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
      	</filter>
     
      	<filter-mapping>
        	<filter-name>struts2</filter-name>
        	<url-pattern>/*</url-pattern>
      	</filter-mapping>       
     
    	<!-- Intégration de SPRING -->	
    	<listener>
    		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
     
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>
    			/WEB-INF/applicationContext.xml 
    			/WEB-INF/applicationContextAction.xml
    			/WEB-INF/applicationContextManager.xml
    			/WEB-INF/applicationContextDao.xml
    		</param-value>
    	</context-param>
     
     
    	<welcome-file-list>
    		<welcome-file>/pages/index.jsp</welcome-file>
    	</welcome-file-list>	
     
    </web-app>

    S'il vous plait ... une idée ?

  2. #2
    Membre chevronné Avatar de supermanu
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    330
    Détails du profil
    Informations personnelles :
    Âge : 42
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Janvier 2004
    Messages : 330
    Par défaut
    Tu peux nous montrer à quoi ressemble la page index.jsp ?

    Peut-être qu'une des librairies de ton projet dépend des librairies jsf (c'est possible pour spring antre autres). Donc tu peux ajouter jsf-api.jar dans tes librairies. Je testerais la version 1.1, la 1.2 ne fonctionnant pas très bien avec tomcat 5 il me semble.

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Par défaut
    En fait le problème intervient au lancement du serveur donc bien avant mon appel à la jsp.

    Voici quand même le code de ma page index.jsp (copier/coller d'un tutoriel)

    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
     
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <html>
    	<head>
    		<s:head theme="ajax" debug="true"/>
    		<script type="text/javascript">
    			dojo.event.topic.subscribe("/save", function(data, type, request) {
    			    if(type == "load") {
    					dojo.byId("id").value = "";
    					dojo.byId("firstName").value = "";
    					dojo.byId("lastName").value = "";
    				}
    			});
     
    			dojo.event.topic.subscribe("/edit", function(data, type, request) {
    			    if(type == "before") {
    					var id = data.split("_")[1];
     
    					var tr = dojo.byId("row_"+id);
    					var tds = tr.getElementsByTagName("td");
     
    					dojo.byId("id").value = id;
    					dojo.byId("firstName").value = dojo.string.trim(dojo.dom.textContent(tds[0]));
    					dojo.byId("lastName").value = dojo.string.trim(dojo.dom.textContent(tds[1]));
    				}
    			});
    		</script>
    	</head>
    	<body>
    	    <s:url action="list" id="descrsUrl"/>
     
            <div style="width: 300px;border-style: solid">
            	<div style="text-align: right;">
        			<s:a theme="ajax" notifyTopics="/refresh">Refresh</s:a>
        		</div>
        		<s:div id="persons" theme="ajax" href="%{descrsUrl}" loadingText="Loading..." listenTopics="/refresh"/>
            </div>
     
            <br/>
     
    		<div style="width: 300px;border-style: solid">
    			<p>Person Data</p>
    			<s:form action="save" validate="true">
    			    <s:textfield id="id" name="person.id" cssStyle="display:none"/>
    				<s:textfield id="firstName" label="First Name" name="person.firstName"/>
    				<s:textfield id="lastName" label="Last Name" name="person.lastName"/>
    				<s:submit theme="ajax" targets="persons" notifyTopics="/save"/>
    			</s:form>
    		</div>
    	</body>
    </html>
    Mystère .... je pense que çà peut venir aussi des jar ...

  4. #4
    Membre averti
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    50
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Novembre 2007
    Messages : 50
    Par défaut

    Bon je vais me répondre ... çà pourra aider quelqu'un !

    Le problème se situait donc bien au niveau des jars :

    commons-collections-2.1.1.jar
    dom4j-1.6.1.jar
    ojdbc14.jar
    aopalliance.jar
    antlr-2.7.2.jar
    commons-logging-api-1.1.jar
    freemarker-2.3.8.jar
    ognl-2.6.11.jar
    struts2-core-2.0.11.1.jar
    struts2-spring-plugin-2.0.11.1.jar
    xwork-2.0.4.jar
    asm.jar
    cglib.jar
    commons-logging.jar
    spring.jar

    Et là plus de problèmes .... :-)

Discussions similaires

  1. Réponses: 10
    Dernier message: 14/06/2008, 20h16
  2. [VB.NET]Name Application is not declared (vbc.exe)
    Par mappy dans le forum ASP.NET
    Réponses: 2
    Dernier message: 03/01/2007, 08h58
  3. Réponses: 3
    Dernier message: 23/01/2006, 16h29
  4. [Génération] The dialect was not set
    Par sylvain_neus dans le forum Hibernate
    Réponses: 8
    Dernier message: 17/03/2004, 10h57
  5. requested URL /forms90/f90servlet was not found
    Par Aeternus dans le forum Oracle
    Réponses: 11
    Dernier message: 03/02/2004, 16h45

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