You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kortheo <ko...@kwanta.net> on 2009/04/26 12:02:57 UTC

struts 2 and tomcat 6 problem

Hey people,

I've just created a new standard "dynamic web project" using eclipse ,
added the struts2 libs and configured a standard mapping in web.xml

When i try to run my web app on a standard tomcat 6.0 I get this error,
and I have not the slightest iIdea of what could be the reason. Please help:

Exception starting filter action2

Unable to load configuration. - bean -
jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
    at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
    at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
    at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
    at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
    at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
    at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to load bean:
type:com.opensymphony.xwork2.UnknownHandler
class:org.apache.struts2.convention.ConventionUnknownHandler - bean -
jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
    at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)
    at
org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
    at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)
    at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
    ... 21 more
Caused by: Bean type interface com.opensymphony.xwork2.UnknownHandler
with the name default has already been loaded by bean -
jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122 

- bean -
jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
    at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:206)
    ... 24 more


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


Re: struts 2 and tomcat 6 problem

Posted by Stefano Tranquillini <st...@gmail.com>.
Check 2 things:
- is the jars inside WEB-INF/lib in the dist jar of the application?
- is the only one jar for each library (maybe have one in web-inf and one in
the root).

i've a similar problem with netbeans and jboss (netbeans put all the jar in
the root and nothing in web-inf) so i forced to put all the libraries in the
web-inf and removing by a bat the jars from the root of the project.



On Sun, Apr 26, 2009 at 16:37, Kortheo <ko...@kwanta.net> wrote:

> Niklas Johansson schrieb:
>
>  Hello,
>>
>> I am kind of novice on this, but couldn't it be that you have the same
>> class twice in the classpath?
>>
>> Regards,
>> Niklas
>>
>> ----------------------------------------
>>
>>
>>> Date: Sun, 26 Apr 2009 13:06:32 +0200
>>> Subject: Re: struts 2 and tomcat 6 problem
>>> From: lukasz.lenart@googlemail.com
>>> To: user@struts.apache.org
>>>
>>> 2009/4/26 Kortheo :
>>>
>>>
>>>> I've just created a new standard "dynamic web project" using eclipse ,
>>>> added the struts2 libs and configured a standard mapping in web.xml
>>>>
>>>>
>>> Did you add all needed dependency?
>>>
>>>
>>>
>>>> Unable to load configuration. - bean -
>>>>
>>>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
>>>>      Caused by: Bean type interface
>>>> com.opensymphony.xwork2.UnknownHandler
>>>> with the name default has already been loaded by bean -
>>>>
>>>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122
>>>>
>>>>
>>> You are mixing Convention with CodeBehind plugin, you have to chose
>>> either first or second approach. Convention overtook CodeBehind so
>>> follow this way and read documentation [1]
>>>
>>> [1] http://cwiki.apache.org/WW/convention-plugin.html
>>>
>>>
>>> Regards
>>> --
>>> Lukasz
>>> http://www.lenart.org.pl/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> _________________________________________________________________
>> Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.
>>
>> http://www.microsoft.com/windows/windowslive/products/photos.aspx
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
> no thats not it, it's that the same class gets loaded twice, because as
> Lukasz said (thx again by the way) , I used the codebehind plugin and the
> conventions plugin. They both load the class.
>
> So, I tried to just remove codebehind. The error is gone now, but I got a
> new one.
> I'm tryin to solve this issue now, if I can't seem to move foreward I'll
> write again
>
> Thanks alot, everyone
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Stefano

Re: struts 2 and tomcat 6 problem

Posted by Kortheo <ko...@kwanta.net>.
Niklas Johansson schrieb:
> Hello,
>
> I am kind of novice on this, but couldn't it be that you have the same class twice in the classpath?
>
> Regards,
> Niklas
>
> ----------------------------------------
>   
>> Date: Sun, 26 Apr 2009 13:06:32 +0200
>> Subject: Re: struts 2 and tomcat 6 problem
>> From: lukasz.lenart@googlemail.com
>> To: user@struts.apache.org
>>
>> 2009/4/26 Kortheo :
>>     
>>> I've just created a new standard "dynamic web project" using eclipse ,
>>> added the struts2 libs and configured a standard mapping in web.xml
>>>       
>> Did you add all needed dependency?
>>
>>     
>>> Unable to load configuration. - bean -
>>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
>>>       
>>> Caused by: Bean type interface com.opensymphony.xwork2.UnknownHandler
>>> with the name default has already been loaded by bean -
>>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122
>>>       
>> You are mixing Convention with CodeBehind plugin, you have to chose
>> either first or second approach. Convention overtook CodeBehind so
>> follow this way and read documentation [1]
>>
>> [1] http://cwiki.apache.org/WW/convention-plugin.html
>>
>>
>> Regards
>> --
>> Lukasz
>> http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>     
>
> _________________________________________________________________
> Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.
>
> http://www.microsoft.com/windows/windowslive/products/photos.aspx
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>   
no thats not it, it's that the same class gets loaded twice, because as 
Lukasz said (thx again by the way) , I used the codebehind plugin and 
the conventions plugin. They both load the class.

So, I tried to just remove codebehind. The error is gone now, but I got 
a new one.
I'm tryin to solve this issue now, if I can't seem to move foreward I'll 
write again

Thanks alot, everyone

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


RE: struts 2 and tomcat 6 problem

Posted by Niklas Johansson <ni...@hotmail.com>.
Hello,

I am kind of novice on this, but couldn't it be that you have the same class twice in the classpath?

Regards,
Niklas

----------------------------------------
> Date: Sun, 26 Apr 2009 13:06:32 +0200
> Subject: Re: struts 2 and tomcat 6 problem
> From: lukasz.lenart@googlemail.com
> To: user@struts.apache.org
>
> 2009/4/26 Kortheo :
>> I've just created a new standard "dynamic web project" using eclipse ,
>> added the struts2 libs and configured a standard mapping in web.xml
>
> Did you add all needed dependency?
>
>> Unable to load configuration. - bean -
>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119
>
>> Caused by: Bean type interface com.opensymphony.xwork2.UnknownHandler
>> with the name default has already been loaded by bean -
>> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122
>
> You are mixing Convention with CodeBehind plugin, you have to chose
> either first or second approach. Convention overtook CodeBehind so
> follow this way and read documentation [1]
>
> [1] http://cwiki.apache.org/WW/convention-plugin.html
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: struts 2 and tomcat 6 problem

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/26 Kortheo <ko...@kwanta.net>:
> I've just created a new standard "dynamic web project" using eclipse ,
> added the struts2 libs and configured a standard mapping in web.xml

Did you add all needed dependency?

> Unable to load configuration. - bean -
> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-convention-plugin-2.1.6.jar!/struts-plugin.xml:30:119

> Caused by: Bean type interface com.opensymphony.xwork2.UnknownHandler
> with the name default has already been loaded by bean -
> jar:file:/Users/kortheo/Projekte/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/kptool/WEB-INF/lib/struts2-codebehind-plugin-2.1.6.jar!/struts-plugin.xml:29:122

You are mixing Convention with CodeBehind plugin, you have to chose
either first or second approach. Convention overtook CodeBehind so
follow this way and read documentation [1]

[1] http://cwiki.apache.org/WW/convention-plugin.html


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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