You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ad...@netcourrier.com on 2002/11/04 15:01:20 UTC

Struts1.1 : subclass ActionServlet

Hi all,

I'm trying to migrate my struts 1.0 application to struts 1.1.
I'm also using struts menu extention.
For this extention initialisation, I have to subclass ActionServlet in order to redefine init() method.

So, i've done it and declare my new servlet in web.xml in place of ActionServlet.
Tomcat (4.04) does not initilise my new servlet. :-(
When trying to execute in tomcat plugin under Eclipse IDE i got this Exception : 

4 nov. 2002 13:57:56 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
4 nov. 2002 13:57:56 org.apache.commons.digester.Digester endElement
GRAVE: End event threw exception
java.lang.SecurityException: sealing violation
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:232)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
	at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:446)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
	at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
	at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
	at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
	at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
	at org.apache.commons.digester.Digester.parse(Digester.java:1514)
	at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1257)
	at org.apache.struts.action.ActionServlet.init(ActionServlet.java:451)
	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	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:324)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
4 nov. 2002 13:57:57 org.apache.struts.action.ActionServlet initServlet


Is there any security issue in struts 1.1 i do not know.
Please help...
I would like to use struts 1.1 modules capacity...

Thanks in advance.

Alexandre duprat.

-------------------------------------------------------------
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 € TTC/min)
Minitel: 3615 NETCOURRIER (0,15 € TTC/min)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts1.1 : subclass ActionServlet

Posted by Eddie Bush <ek...@swbell.net>.
Why must you redefine init?  Are you aware of the plugin architechture 
in 1.1, and why does it not fit your needs?

The error looks like you made a boo-boo in your config file.  It's not 
syntactically valid.  That's my first impression.  I've never seen the 
security thingies in the trace - can't help you there.  Double-check 
your config - maybe download Struts Console from 
www.jamesholmes.com/struts/console and see if it loads right.  Struts 
Console is a handy tool.  It simply does not know how to write an 
invalid config file.  You may consider using it.

aduprat.struts@netcourrier.com wrote:

>Hi all,
>
>I'm trying to migrate my struts 1.0 application to struts 1.1.
>I'm also using struts menu extention.
>For this extention initialisation, I have to subclass ActionServlet in order to redefine init() method.
>
>So, i've done it and declare my new servlet in web.xml in place of ActionServlet.
>Tomcat (4.04) does not initilise my new servlet. :-(
>When trying to execute in tomcat plugin under Eclipse IDE i got this Exception : 
>
>4 nov. 2002 13:57:56 org.apache.struts.util.PropertyMessageResources <init>
>INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
>4 nov. 2002 13:57:56 org.apache.commons.digester.Digester endElement
>GRAVE: End event threw exception
>
>Is there any security issue in struts 1.1 i do not know.
>Please help...
>I would like to use struts 1.1 modules capacity...
>
>Thanks in advance.
>
>Alexandre duprat.
>
-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>