You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by José Antonio Delgado Trujillo <ja...@gmail.com> on 2016/06/07 21:10:26 UTC

Unable to load configuration

I have been wasted all this afternoon with a strange error.

My app only have an action called VerySimpleAction.
I configured in the struts.xml

-------------------------------------

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

<!DOCTYPE struts PUBLIC

        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"

        "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>

<constant name="struts.enable.DynamicMethodInvocation" value="false" />

<constant name="struts.devMode" value="true" />

<package name="default" namespace="/" extends="struts-default">

<action name="verysimple" class="pfc.struts2.example.VerySimpleAction">

<result name="success" type="dispatcher">/WEB-INF/jsps/verysimple.jsp</
result>

</action>

</package>

</struts>

-------------------------

I deployed in the wildly server and i put in the browser:

localhost:8080/example/verysimple.action


I found the strange error.


--------------------------------------
Context Path:
/example


Servlet Path:
/verysimple.action


Path Info:
null


Query String:
null


*Stack Trace*
Unable to load configuration. - action -
vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)

------------------------------


9:74 ---> is the line of the action name and class are correctly

Why?

The action class exist in the package pfc.struts2.example




Un saludo,
José A.

Re: Unable to load configuration

Posted by José Antonio Delgado Trujillo <ja...@gmail.com>.
BIZARRE :C

I changed my POM for some simple build section only:

   - maven-war-plugin
   - maven-compiler-plugin



Way 1 - FAIL
    Run AS / Run on Server

Way 2 -  CORRECT
    1. Run AS / Maven Install
    2. Run AS / Run on Server

Way 3 - CORRECT
    1. mvn install (from console batch)
    2. add the war (from console server)

I thought way 1 was the same  way 2.
But It was something with Run on server when the war no was created
previousy.

The most bizarre was the problem changed (and i don't know why):
  - It could't  instantiate the filter.
  - It couldn't found Log4j class.
  - Something wrong with the struts.xml


Thanks for your time (both Martin and Lukasz)

Regards

2016-06-08 18:21 GMT+01:00 Lukasz Lenart <lu...@apache.org>:

> 2016-06-08 18:40 GMT+02:00 José Antonio Delgado Trujillo <
> jadtmat@gmail.com>:
> >>How did you deploy your app to Wildfly? Looks like there is no such
> >>class in WAR/EAR
> > I usually choose between two things:
> >
> > run on the server -- in the Eclipse IDE Mars2
> > maven/install and then add the war in the serverRuntime -- in the IDE
>
> There was many issues with deploying WAR by Eclipse, try to do it manually
>
> > Sure the war is deployed but i think is malformed when i saw the trace
> (file
> > attached) i found Dispatcher initialization failed.
> >
> > My pom was created by cero adding the dependencies and some building
> > comparing POM's archetype struts.
> >
> > I can't see any strange so i am blocked!!!
>
> The simplest way is to unpack the WAR and see its content
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Un saludo,
José A.

Re: Unable to load configuration

Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-08 18:40 GMT+02:00 José Antonio Delgado Trujillo <ja...@gmail.com>:
>>How did you deploy your app to Wildfly? Looks like there is no such
>>class in WAR/EAR
> I usually choose between two things:
>
> run on the server -- in the Eclipse IDE Mars2
> maven/install and then add the war in the serverRuntime -- in the IDE

There was many issues with deploying WAR by Eclipse, try to do it manually

> Sure the war is deployed but i think is malformed when i saw the trace (file
> attached) i found Dispatcher initialization failed.
>
> My pom was created by cero adding the dependencies and some building
> comparing POM's archetype struts.
>
> I can't see any strange so i am blocked!!!

The simplest way is to unpack the WAR and see its content


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Unable to load configuration

Posted by José Antonio Delgado Trujillo <ja...@gmail.com>.
Upss
if i created first the war (maven install) and then add in the server maybe
run correctly.
if i use Run on server failed.

Is it the problem the missing of wildfly-maven-plugin in the POM in the
build section?

2016-06-08 17:40 GMT+01:00 José Antonio Delgado Trujillo <ja...@gmail.com>
:

> >How did you deploy your app to Wildfly? Looks like there is no such
> >class in WAR/EAR
> I usually choose between two things:
>
>    - run on the server -- in the Eclipse IDE Mars2
>    - maven/install and then add the war in the serverRuntime -- in the
>    IDE
>
> Sure the war is deployed but i think is malformed when i saw the trace
> (file attached) i found Dispatcher initialization failed.
>
> My pom was created by cero adding the dependencies and some building
> comparing POM's archetype struts.
>
> I can't see any strange so i am blocked!!!
>
> > Linea Nueve>donde verysimple.jsp?Linea Nueve>where is verysimple.jsp?
> verysimple.jso is in under folder src/main//webapp/WEB-INF/jsps
>
> Thanks Lukasz and Martin
>
> Regards
> José A.
>
> 2016-06-08 5:41 GMT+01:00 Lukasz Lenart <lu...@apache.org>:
>
>> 2016-06-07 23:10 GMT+02:00 José Antonio Delgado Trujillo <
>> jadtmat@gmail.com>:
>> > *Stack Trace*
>> > Unable to load configuration. - action -
>> >
>> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
>> > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
>> >
>> > ------------------------------
>> >
>> >
>> > 9:74 ---> is the line of the action name and class are correctly
>> >
>> > Why?
>>
>> How did you deploy your app to Wildfly? Looks like there is no such
>> class in WAR/EAR
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Un saludo,
> José A.
>



-- 
Un saludo,
José A.

Re: Unable to load configuration

Posted by José Antonio Delgado Trujillo <ja...@gmail.com>.
>How did you deploy your app to Wildfly? Looks like there is no such
>class in WAR/EAR
I usually choose between two things:

   - run on the server -- in the Eclipse IDE Mars2
   - maven/install and then add the war in the serverRuntime -- in the IDE

Sure the war is deployed but i think is malformed when i saw the trace
(file attached) i found Dispatcher initialization failed.

My pom was created by cero adding the dependencies and some building
comparing POM's archetype struts.

I can't see any strange so i am blocked!!!

> Linea Nueve>donde verysimple.jsp?Linea Nueve>where is verysimple.jsp?
verysimple.jso is in under folder src/main//webapp/WEB-INF/jsps

Thanks Lukasz and Martin

Regards
José A.

2016-06-08 5:41 GMT+01:00 Lukasz Lenart <lu...@apache.org>:

> 2016-06-07 23:10 GMT+02:00 José Antonio Delgado Trujillo <
> jadtmat@gmail.com>:
> > *Stack Trace*
> > Unable to load configuration. - action -
> >
> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
> > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
> >
> > ------------------------------
> >
> >
> > 9:74 ---> is the line of the action name and class are correctly
> >
> > Why?
>
> How did you deploy your app to Wildfly? Looks like there is no such
> class in WAR/EAR
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Un saludo,
José A.

Re: Unable to load configuration

Posted by Lukasz Lenart <lu...@apache.org>.
2016-06-07 23:10 GMT+02:00 José Antonio Delgado Trujillo <ja...@gmail.com>:
> *Stack Trace*
> Unable to load configuration. - action -
> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
>
> ------------------------------
>
>
> 9:74 ---> is the line of the action name and class are correctly
>
> Why?

How did you deploy your app to Wildfly? Looks like there is no such
class in WAR/EAR


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Unable to load configuration

Posted by Martin Gainty <mg...@hotmail.com>.


> From: jadtmat@gmail.com
> Date: Tue, 7 Jun 2016 22:10:26 +0100
> Subject: Unable to load configuration
> To: user@struts.apache.org
> 
> I have been wasted all this afternoon with a strange error.
> 
> My app only have an action called VerySimpleAction.
> I configured in the struts.xml
> 
> -------------------------------------
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> 
> <!DOCTYPE struts PUBLIC
> 
>         "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> 
>         "http://struts.apache.org/dtds/struts-2.3.dtd">
> 
> <struts>
> 
> <constant name="struts.enable.DynamicMethodInvocation" value="false" />
> 
> <constant name="struts.devMode" value="true" />
> 
> <package name="default" namespace="/" extends="struts-default">
> 
> <action name="verysimple" class="pfc.struts2.example.VerySimpleAction">
> 
> <result name="success" type="dispatcher">/WEB-INF/jsps/verysimple.jsp</result>

Linea Nueve>donde verysimple.jsp?Linea Nueve>where is verysimple.jsp?
> 
> </action>
> 
> </package>
> 
> </struts>
> 
> -------------------------
> 
> I deployed in the wildly server and i put in the browser:
> 
> localhost:8080/example/verysimple.action
> 
> 
> I found the strange error.
> 
> 
> --------------------------------------
> Context Path:
> /example
> 
> 
> Servlet Path:
> /verysimple.action
> 
> 
> Path Info:
> null
> 
> 
> Query String:
> null
> 
> 
> *Stack Trace*
> Unable to load configuration. - action -
> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
> org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
> 
> ------------------------------
> 
> 
> 9:74 ---> is the line of the action name and class are correctly
> 
> Why?
> 
> The action class exist in the package pfc.struts2.example
> 
> 
> 
> 
> Un saludo,
> José A.

MG>/Saludos/MG>Martín