In your pom.xml find the <dependency> for javax.servlet:servlet-api and add
<scope>provided</scope>

2010/7/19 Mansour Al Akeel <mansour.alak...@gmail.com>

> Martin,
> thank you. But I don't have servlet.jar in the lib folder. There's no
> lib folder, since I am using maven archetype.
> If I have to exclude it from POM.XML then how ?
> tomcat plugin depends on it !
>
> can you please kindly give me more details ?
>
> On Sun, Jul 18, 2010 at 11:16 AM, Martin Grigorov
> <martin.grigo...@gmail.com> wrote:
> > Remove servlet.jar from yourApplication.war#WEB-INF/lib/ folder
> >
> >
> > 2010/7/18 Mansour Al Akeel <mansour.alak...@gmail.com>
> >
> >> Hello all:
> >> I am trying to run tomcat from maven and including openEJB. The
> >> command I am using to run tomcat:
> >>
> >> mvn tomcat:run
> >>
> >> The error I am getting :
> >>
> >> Jul 18, 2010 6:53:29 AM org.apache.catalina.startup.Embedded start
> >> INFO: Starting tomcat server
> >> Jul 18, 2010 6:53:29 AM org.apache.catalina.core.StandardEngine start
> >> INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
> >> Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext
> >> filterStart
> >> SEVERE: Exception starting filter wicket.site
> >> java.lang.ClassCastException:
> >> org.apache.wicket.protocol.http.WicketFilter cannot be cast to
> >> javax.servlet.Filter
> >>        at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
> >>        at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
> >>        at
> >>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
> >>        at
> >>
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
> >>        at
> >>
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
> >>        at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> >>        at
> >> org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
> >>        at
> >> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> >>        at
> >> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> >>        at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
> >>        at
> >>
> org.codehaus.mojo.tomcat.AbstractRunMojo.startContainer(AbstractRunMojo.java:533)
> >>        at
> >>
> org.codehaus.mojo.tomcat.AbstractRunMojo.execute(AbstractRunMojo.java:239)
> >>        at
> >>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> >>        at
> >>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> >>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> >>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> >>        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> >>        at
> >> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>        at
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >>        at
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>        at java.lang.reflect.Method.invoke(Method.java:616)
> >>        at
> >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> >>        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> >>        at
> >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> >>        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> >> Jul 18, 2010 6:53:30 AM org.apache.catalina.core.StandardContext start
> >> SEVERE: Error filterStart
> >>
> >> So I created a webapp project from maven archetype, and added openEjb
> >> dependency:
> >>
> >>                <dependency>
> >>                        <groupId>org.apache.openejb</groupId>
> >>                        <artifactId>openejb-core</artifactId>
> >>                        <version>3.1.2</version>
> >>                </dependency>
> >>
> >> The error I am getting now is:
> >>
> >> Jul 18, 2010 7:02:37 AM org.apache.catalina.core.StandardWrapperValve
> >> invoke
> >> SEVERE: Servlet.service() for servlet jsp threw exception
> >> java.lang.LinkageError: loader constraint violation: loader (instance
> >> of org/apache/jasper/servlet/JasperLoader) previously initiated
> >> loading for a different type with name
> >> "javax/servlet/http/HttpServletRequest"
> >>        at java.lang.Class.getDeclaredMethods0(Native Method)
> >>        at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
> >>        at java.lang.Class.getDeclaredMethods(Class.java:1808)
> >>        at
> >>
> org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:226)
> >>        at
> >>
> org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:148)
> >>        at
> >>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
> >>        at
> >> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> >>        at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> >>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> >>        at
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >>        at
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >>        at
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> >>        at
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >>        at
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> >>        at
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> >>        at
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>        at
> >>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> >>        at
> >>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
> >>        at
> >>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> >>        at
> >> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> >>        at java.lang.Thread.run(Thread.java:636)
> >>
> >> Any advice ?
> >> Thank you.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to