Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0
InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #200769] Sun, 30 September 2007 17:37 Go to next message
a is currently offline a
Messages: 75
Registered: July 2009
Member
Problem: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK
3.3.0



Error: "org.apache.catalina.servlets.InvokerServlet is privileged and cannot
be loaded by this web application"



Software:

Eclipse SDK, Version: 3.3.0, Build id: I20070621-1340

wtp-all-in-one-sdk-R-2.0-200706260303-win32.zip

jdk-6u2-windows-i586-p.exe

apache-tomcat-6.0.14.exe

Window XP Pro SP2



Procedure:

In Servers view, define a new server for Tomcat 6.0.14 using jdk1.6.0_02.

Enabled servlet invoker by uncommenting the following lines in web.xml.



<servlet>

<servlet-name>invoker</servlet-name>

<servlet-class>

org.apache.catalina.servlets.InvokerServlet

</servlet-class>

<init-param>

<param-name>debug</param-name>

<param-value>0</param-value>

</init-param>

<load-on-startup>2</load-on-startup>

</servlet>



<servlet-mapping>

<servlet-name>invoker</servlet-name>

<url-pattern>/servlet/*</url-pattern>

</servlet-mapping>



In Servers view, start server.

The following error appears in the Console view:



Sep 30, 2007 2:26:50 PM org.apache.catalina.core.AprLifecycleListener init

INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program
Files\Java\jdk1.6.0_02\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WIND OWS\system32;C:\WINDOWS;C:\DOS\Perl\site\bin;C:\DOS\Perl\bin ;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ Program
Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Common
Files\Roxio Shared\DLLShared";C:\Program Files\Common Files\Roxio
Shared\DLLShared;C:\Program Files\Common Files\Adobe\AGL;"C:\Program
Files\Zone Labs\ZoneAlarm\MailFrontier";C:\Program Files\Microsoft\Support
Tools\;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\CVSNT\

Sep 30, 2007 2:26:50 PM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

Sep 30, 2007 2:26:50 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 1215 ms

Sep 30, 2007 2:26:50 PM org.apache.catalina.core.StandardService start

INFO: Starting service Catalina

Sep 30, 2007 2:26:50 PM org.apache.catalina.core.StandardEngine start

INFO: Starting Servlet Engine: Apache Tomcat/6.0.14

java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2 88)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:41 3)

Caused by: java.lang.SecurityException: Servlet of class
org.apache.catalina.servlets.InvokerServlet is privileged and cannot be
loaded by this web application

at
org.apache.catalina.core.StandardWrapper.loadServlet(Standar dWrapper.java:1134)

at
org.apache.catalina.core.StandardWrapper.load(StandardWrappe r.java:981)

at
org.apache.catalina.core.StandardContext.loadOnStartup(Stand ardContext.java:4045)

at
org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4351)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1045)

at
org.apache.catalina.core.StandardHost.start(StandardHost.jav a:719)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1045)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine .java:443)

at
org.apache.catalina.core.StandardService.start(StandardServi ce.java:516)

at
org.apache.catalina.core.StandardServer.start(StandardServer .java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:566 )

... 6 more
Re: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #200847 is a reply to message #200769] Mon, 01 October 2007 09:38 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1287
Registered: July 2009
Senior Member
Why do want to enable the InvokerServlet? There are different ways of
handling this, depending on the reason.

Cheers,
Larry

John wrote:
> Problem: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK
> 3.3.0
>
>
>
> Error: "org.apache.catalina.servlets.InvokerServlet is privileged and cannot
> be loaded by this web application"
>
>
>
> Software:
>
> Eclipse SDK, Version: 3.3.0, Build id: I20070621-1340
>
> wtp-all-in-one-sdk-R-2.0-200706260303-win32.zip
>
> jdk-6u2-windows-i586-p.exe
>
> apache-tomcat-6.0.14.exe
>
> Window XP Pro SP2
>
>
>
> Procedure:
>
> In Servers view, define a new server for Tomcat 6.0.14 using jdk1.6.0_02.
>
> Enabled servlet invoker by uncommenting the following lines in web.xml.
>
>
>
> <servlet>
>
> <servlet-name>invoker</servlet-name>
>
> <servlet-class>
>
> org.apache.catalina.servlets.InvokerServlet
>
> </servlet-class>
>
> <init-param>
>
> <param-name>debug</param-name>
>
> <param-value>0</param-value>
>
> </init-param>
>
> <load-on-startup>2</load-on-startup>
>
> </servlet>
>
>
>
> <servlet-mapping>
>
> <servlet-name>invoker</servlet-name>
>
> <url-pattern>/servlet/*</url-pattern>
>
> </servlet-mapping>
>
>
>
> In Servers view, start server.
>
> The following error appears in the Console view:
>
>
>
> Sep 30, 2007 2:26:50 PM org.apache.catalina.core.AprLifecycleListener init
>
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path: C:\Program
> Files\Java\jdk1.6.0_02\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WIND OWS\system32;C:\WINDOWS;C:\DOS\Perl\site\bin;C:\DOS\Perl\bin ;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ Program
> Files\ATI Technologies\ATI Control Panel;"C:\Program Files\Common
> Files\Roxio Shared\DLLShared";C:\Program Files\Common Files\Roxio
> Shared\DLLShared;C:\Program Files\Common Files\Adobe\AGL;"C:\Program
> Files\Zone Labs\ZoneAlarm\MailFrontier";C:\Program Files\Microsoft\Support
> Tools\;C:\Program Files\ATI Technologies\ATI.ACE\;C:\Program Files\CVSNT\
>
> Sep 30, 2007 2:26:50 PM org.apache.coyote.http11.Http11Protocol init
>
> INFO: Initializing Coyote HTTP/1.1 on http-8080
>
> Sep 30, 2007 2:26:50 PM org.apache.catalina.startup.Catalina load
>
> INFO: Initialization processed in 1215 ms
>
> Sep 30, 2007 2:26:50 PM org.apache.catalina.core.StandardService start
>
> INFO: Starting service Catalina
>
> Sep 30, 2007 2:26:50 PM org.apache.catalina.core.StandardEngine start
>
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>
> java.lang.reflect.InvocationTargetException
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
>
> at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2 88)
>
> at
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:41 3)
>
> Caused by: java.lang.SecurityException: Servlet of class
> org.apache.catalina.servlets.InvokerServlet is privileged and cannot be
> loaded by this web application
>
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(Standar dWrapper.java:1134)
>
> at
> org.apache.catalina.core.StandardWrapper.load(StandardWrappe r.java:981)
>
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(Stand ardContext.java:4045)
>
> at
> org.apache.catalina.core.StandardContext.start(StandardConte xt.java:4351)
>
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1045)
>
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.jav a:719)
>
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.j ava:1045)
>
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine .java:443)
>
> at
> org.apache.catalina.core.StandardService.start(StandardServi ce.java:516)
>
> at
> org.apache.catalina.core.StandardServer.start(StandardServer .java:710)
>
> at org.apache.catalina.startup.Catalina.start(Catalina.java:566 )
>
> ... 6 more
>
>
Re: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #200905 is a reply to message #200769] Mon, 01 October 2007 15:06 Go to previous messageGo to next message
Eclipse User
Originally posted by: hall.coreservlets.com

I personally find the invoker servlet very useful when learning,
experimenting, and testing out capabilities. But of course you should
never have the invoker servlet enabled in projects you are going to deploy.

Anyhow, when you use your own version of Tomcat 6.x with MyEclipse, it
automatically uses the configuration files in the install_dir/conf folder.
You have to edit two of these to enable the invoker servlet (the servlet
and servlet-mapping entries in web.xml, and you have to change 'Context'
to 'Context reloadable="true" privileged="true"' in context.xml). But
regular Eclipse uses its own deployment and configuration folders. You can
copy the files from the standard "conf" folder, or you can double click on
the server and tell it to use your existing folders.

Again, I want to stress that you should not use the invoker servlet for
deployed applications. But, I find it very useful when learning and
experimenting with temporary projects.
Re: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #200943 is a reply to message #200905] Tue, 02 October 2007 02:13 Go to previous messageGo to next message
a is currently offline a
Messages: 75
Registered: July 2009
Member
Marty - I appreciate your help. Your solution worked!

It is unclear why Eclipse does not automatically import the context.xml file
to path
/Servers/Tomcat v6.0 Server at localhost-config
or
MyWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\t mp0\conf
Do you know why it doesn't?

As you mentioned, I had to manually import context.xml from location
C:\Tomcat-6.0\conf\
to
MyWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\t mp0\conf
and then make your suggested changes to
Context reloadable="true" privileged="true"

Thanks again.
Re: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #201024 is a reply to message #200943] Tue, 02 October 2007 09:09 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1287
Registered: July 2009
Senior Member
The Tomcat 6.0 support and the "Serve modules without publishing" and
"Publish module contexts to separate XML files" features used up most of
the available cycles for WTP 2.0. Including context.xml is on the to-do
list for WTP 3.0. It is easy enough to include it. The trick is when
publishing the server, not rewriting the file unless something has
changed. Otherwise, publishing the server will always trigger all
contexts to reload.

Cheers,
Larry

John wrote:
> Marty - I appreciate your help. Your solution worked!
>
> It is unclear why Eclipse does not automatically import the context.xml file
> to path
> /Servers/Tomcat v6.0 Server at localhost-config
> or
> MyWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\t mp0\conf
> Do you know why it doesn't?
>
> As you mentioned, I had to manually import context.xml from location
> C:\Tomcat-6.0\conf\
> to
> MyWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\t mp0\conf
> and then make your suggested changes to
> Context reloadable="true" privileged="true"
>
> Thanks again.
>
>
Thank you for the feedback [message #201063 is a reply to message #201024] Tue, 02 October 2007 10:36 Go to previous messageGo to next message
a is currently offline a
Messages: 75
Registered: July 2009
Member
Larry - Thank you for the feedback.
Re: InvokerServlet cannot be loaded in Tomcat 6.0.14 in Eclipse SDK 3.3.0 [message #201078 is a reply to message #200943] Tue, 02 October 2007 12:57 Go to previous message
Eclipse User
Originally posted by: hall.coreservlets.com

John wrote:

> Marty - I appreciate your help. Your solution worked!

> It is unclear why Eclipse does not automatically import the context.xml file
> to path
> /Servers/Tomcat v6.0 Server at localhost-config
> or
> MyWorkspace.metadata.pluginsorg.eclipse.wst.server.coretmp0c onf
> Do you know why it doesn't?

I am not sure either. But in one (of the many) hats that I wear, I teach
Java Web app programming in the Johns Hopkins part-time graduate program
in Computer Science. Students are free to use any IDE they want, and some
use MyEclipse, some use regular Eclipse, and others use whatever they are
used to (NetBeans or IDEA, perhaps). A common problem from the regular
Eclipse users is that they make changes to the Tomcat configuration files
(such as the entry for context.xml for the invoker servlet), and don't
know why it is not picked up.

Now, if I could only make projects that would be recognized by BOTH
MyEclipse and regular Eclipse as dynamic Web projects, I would be happy.
That way for each topic that I cover at Hopkins, I could distribute a
single sample project to my JHU students. Similarly, in my "real" work, I
also have clients that are split between MyEclipse and regular Eclipse,
and I want to distribute projects to them as well.

Finally, again, please remember that the invoker servlet is for testing
and experimenting only: never for deployed apps.

Cheers-

- Marty
------------------------------------------------------------ -----------------
JSP/servlet/Struts/JSF/AJAX/GWT/Java training:
http://courses.coreservlets.com/
Previous Topic:Importing MyEclipse Projects
Next Topic:developing taglibs
Goto Forum:
  


Current Time: Wed Apr 23 17:50:30 EDT 2014

Powered by FUDForum. Page generated in 0.02538 seconds