You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by insom <da...@gmail.com> on 2008/08/27 17:52:54 UTC

Maven QuickStart in Eclipse on Tomcat

I'm trying to run the Wicket QuickStart app in Eclipse on Tomcat. I'm
entirely new to Maven and its dependencies (which seem to be just project
libraries?) I think I have it mostly configured correctly, but when I start
Tomcat I get the following error:

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:255)
	at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
           .
           .
           .

Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots
from Eclipse:

http://www.nabble.com/file/p19183955/packageExplorer.png 

and

http://www.nabble.com/file/p19183955/buildPath.png 

So it appears that the wicket jar is there under Maven Dependencies. Is
there anything I need to do in order to get the items under Maven
Dependencies to be recognized by the application?

Thanks much.
-- 
View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19183955.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by insom <da...@gmail.com>.
If I knew enough about Jetty to be confident that there would be no hitches
there, that would certainly be the optimal solution (and, given your
experience with it, I'm sure you're right.)

But considering that my knowledge of Jetty is perhaps on par with my
knowledge of the history of Abkhazia, I figure that it's safer for now to
run everything in the same server environment.


igor.vaynberg wrote:
> 
> same, no one said anything about switching anything in production env.
> 
> -igor
> 

-- 
View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19188753.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Igor Vaynberg <ig...@gmail.com>.
same, no one said anything about switching anything in production env.

-igor

On Wed, Aug 27, 2008 at 11:51 AM, James Carman
<ja...@carmanconsulting.com> wrote:
> Yeah, couldn't you just take the war file created by maven and drop it
> in your webapps directory of tomcat in your "production" environment?
> Use jetty to develop, but tomcat to deploy.  That's what we do.
>
> On Wed, Aug 27, 2008 at 2:48 PM, Jon Stockdill <jo...@gmail.com> wrote:
>> Developing with jetty is very nice, we use it for many projects.  For
>> deployment, to remove any jars during deployment set the scope in the
>> dependency to provided, see:
>> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>>
>> Also, to learn more about maven, google for "Better Builds with Maven"
>>  It is a great resource.
>>
>> --jon
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Aug 27, 2008 at 2:36 PM, insom <da...@gmail.com> wrote:
>>>
>>> I know -- that's the Jetty one, right? I keep telling myself that as I've
>>> been trying to get this working with Tomcat. But in the I think fighting
>>> with Tomcat will be easier than fighting with our administration to switch
>>> the production server to Jetty.
>>>
>>>
>>> igor.vaynberg wrote:
>>>>
>>>> you could just use the included Start class and have it startup much
>>>> faster..
>>>>
>>>> -igor
>>>>
>>>> On Wed, Aug 27, 2008 at 11:31 AM, insom <da...@gmail.com> wrote:
>>>>>
>>>>> That did it. Thanks again. As an aside to anyone else who's also figuring
>>>>> this out, I had to remove both the servlet-api jar and the
>>>>> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order
>>>>> to
>>>>> get it to work.
>>>>>
>>>>>
>>>>> Martijn Dashorst wrote:
>>>>>>
>>>>>> Remove it from the devloader list.
>>>>>>
>>>>>> Martijn
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by James Carman <ja...@carmanconsulting.com>.
Yeah, couldn't you just take the war file created by maven and drop it
in your webapps directory of tomcat in your "production" environment?
Use jetty to develop, but tomcat to deploy.  That's what we do.

On Wed, Aug 27, 2008 at 2:48 PM, Jon Stockdill <jo...@gmail.com> wrote:
> Developing with jetty is very nice, we use it for many projects.  For
> deployment, to remove any jars during deployment set the scope in the
> dependency to provided, see:
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>
> Also, to learn more about maven, google for "Better Builds with Maven"
>  It is a great resource.
>
> --jon
>
>
>
>
>
>
>
> On Wed, Aug 27, 2008 at 2:36 PM, insom <da...@gmail.com> wrote:
>>
>> I know -- that's the Jetty one, right? I keep telling myself that as I've
>> been trying to get this working with Tomcat. But in the I think fighting
>> with Tomcat will be easier than fighting with our administration to switch
>> the production server to Jetty.
>>
>>
>> igor.vaynberg wrote:
>>>
>>> you could just use the included Start class and have it startup much
>>> faster..
>>>
>>> -igor
>>>
>>> On Wed, Aug 27, 2008 at 11:31 AM, insom <da...@gmail.com> wrote:
>>>>
>>>> That did it. Thanks again. As an aside to anyone else who's also figuring
>>>> this out, I had to remove both the servlet-api jar and the
>>>> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order
>>>> to
>>>> get it to work.
>>>>
>>>>
>>>> Martijn Dashorst wrote:
>>>>>
>>>>> Remove it from the devloader list.
>>>>>
>>>>> Martijn
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Jon Stockdill <jo...@gmail.com>.
Developing with jetty is very nice, we use it for many projects.  For
deployment, to remove any jars during deployment set the scope in the
dependency to provided, see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Also, to learn more about maven, google for "Better Builds with Maven"
 It is a great resource.

--jon







On Wed, Aug 27, 2008 at 2:36 PM, insom <da...@gmail.com> wrote:
>
> I know -- that's the Jetty one, right? I keep telling myself that as I've
> been trying to get this working with Tomcat. But in the I think fighting
> with Tomcat will be easier than fighting with our administration to switch
> the production server to Jetty.
>
>
> igor.vaynberg wrote:
>>
>> you could just use the included Start class and have it startup much
>> faster..
>>
>> -igor
>>
>> On Wed, Aug 27, 2008 at 11:31 AM, insom <da...@gmail.com> wrote:
>>>
>>> That did it. Thanks again. As an aside to anyone else who's also figuring
>>> this out, I had to remove both the servlet-api jar and the
>>> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order
>>> to
>>> get it to work.
>>>
>>>
>>> Martijn Dashorst wrote:
>>>>
>>>> Remove it from the devloader list.
>>>>
>>>> Martijn
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by insom <da...@gmail.com>.
I know -- that's the Jetty one, right? I keep telling myself that as I've
been trying to get this working with Tomcat. But in the I think fighting
with Tomcat will be easier than fighting with our administration to switch
the production server to Jetty.


igor.vaynberg wrote:
> 
> you could just use the included Start class and have it startup much
> faster..
> 
> -igor
> 
> On Wed, Aug 27, 2008 at 11:31 AM, insom <da...@gmail.com> wrote:
>>
>> That did it. Thanks again. As an aside to anyone else who's also figuring
>> this out, I had to remove both the servlet-api jar and the
>> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order
>> to
>> get it to work.
>>
>>
>> Martijn Dashorst wrote:
>>>
>>> Remove it from the devloader list.
>>>
>>> Martijn
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19187087.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Igor Vaynberg <ig...@gmail.com>.
you could just use the included Start class and have it startup much faster..

-igor

On Wed, Aug 27, 2008 at 11:31 AM, insom <da...@gmail.com> wrote:
>
> That did it. Thanks again. As an aside to anyone else who's also figuring
> this out, I had to remove both the servlet-api jar and the
> org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order to
> get it to work.
>
>
> Martijn Dashorst wrote:
>>
>> Remove it from the devloader list.
>>
>> Martijn
>>
>
> --
> View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by insom <da...@gmail.com>.
That did it. Thanks again. As an aside to anyone else who's also figuring
this out, I had to remove both the servlet-api jar and the
org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER from the list in order to
get it to work.


Martijn Dashorst wrote:
> 
> Remove it from the devloader list.
> 
> Martijn
> 

-- 
View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19186957.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Martijn Dashorst <ma...@gmail.com>.
Remove it from the devloader list.

Martijn

On Wed, Aug 27, 2008 at 7:51 PM, insom <da...@gmail.com> wrote:
>
> Ugh. Of course, you're right. I had been getting a ClassNotFoundException
> before I tried the DevLoader, and I didn't notice that the error had changed
> to ClassCastException afterward.
>
> I'm not sure how to remove servlet-api from the Maven dependencies list. The
> Properties/Java Build Path/Libraries approach that I use for normal jars
> doesn't work -- the "Remove" option is disabled. My very basic understanding
> of Maven would point me at the pom.xml, but that doesn't explicitly list
> servlet-api as a dependency either. Where is servlet-api defined as a
> dependency, and how do I get rid of it?
>
> Thanks for all your help.
>
>
> Martijn Dashorst wrote:
>>
>> Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException !=
>> ClassNotFoundException.
>>
>> You have to remove the servlet-api jar from the classpath when you run
>> your application in tomcat.
>>
>> Martijn
>>
>
> --
> View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19185757.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by insom <da...@gmail.com>.
Ugh. Of course, you're right. I had been getting a ClassNotFoundException
before I tried the DevLoader, and I didn't notice that the error had changed
to ClassCastException afterward.

I'm not sure how to remove servlet-api from the Maven dependencies list. The
Properties/Java Build Path/Libraries approach that I use for normal jars
doesn't work -- the "Remove" option is disabled. My very basic understanding
of Maven would point me at the pom.xml, but that doesn't explicitly list
servlet-api as a dependency either. Where is servlet-api defined as a
dependency, and how do I get rid of it?

Thanks for all your help.


Martijn Dashorst wrote:
> 
> Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException !=
> ClassNotFoundException.
> 
> You have to remove the servlet-api jar from the classpath when you run
> your application in tomcat.
> 
> Martijn
> 

-- 
View this message in context: http://www.nabble.com/Maven-QuickStart-in-Eclipse-on-Tomcat-tp19183955p19185757.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Martijn Dashorst <ma...@gmail.com>.
On Wed, Aug 27, 2008 at 5:52 PM, insom <da...@gmail.com> wrote:
> libraries?) I think I have it mostly configured correctly, but when I start
> Tomcat I get the following error:
> java.lang.ClassCastException: org.apache.wicket.protocol.http.WicketFilter
> cannot be cast to javax.servlet.Filter

> Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots
> from Eclipse:

Obviously it *is* finding the wicket-1.3.4.jar. ClassCastException !=
ClassNotFoundException.

You have to remove the servlet-api jar from the classpath when you run
your application in tomcat.

Martijn

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Maven QuickStart in Eclipse on Tomcat

Posted by Antoine Angenieux <aa...@clinigrid.com>.
Are you, by any chance, using the DevLoader plugin to run Tomcat ?

If so, you should go in the tomcat properties of your project, edit the 
devloader classpath properties, and disable all jetty jars and the 
servlet-api jar ...

Hope this helps,

Antoine.

insom wrote:
> I'm trying to run the Wicket QuickStart app in Eclipse on Tomcat. I'm
> entirely new to Maven and its dependencies (which seem to be just project
> libraries?) I think I have it mostly configured correctly, but when I start
> Tomcat I get the following error:
> 
> 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:255)
> 	at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
>            .
>            .
>            .
> 
> Obviously, it's not finding the wicket-1.3.4.jar. Here are my screenshots
> from Eclipse:
> 
> http://www.nabble.com/file/p19183955/packageExplorer.png 
> 
> and
> 
> http://www.nabble.com/file/p19183955/buildPath.png 
> 
> So it appears that the wicket jar is there under Maven Dependencies. Is
> there anything I need to do in order to get the items under Maven
> Dependencies to be recognized by the application?
> 
> Thanks much.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org