Re: maven archetype

2012-08-26 Thread Martin Grigorov
Hi,

Check
- https://github.com/Bessonov/wicket-example
- jWeekend LegUp
- Wicketopia

On Fri, Aug 24, 2012 at 8:33 PM, Bruce McGuire brlmcgu...@gmail.com wrote:
 PS: I forgot to mention that I would like to use testNG.

 Thanks again.

 Bruce.

 On Fri, Aug 24, 2012 at 10:31 AM, Bruce McGuire brlmcgu...@gmail.comwrote:

 Hi There.

 It has been a while and a new company since I did a project with Wicket,
 and I would like to start out with a properly set up project.

 I am looking for an archetype that uses new versions of
   Wicket
   Spring
   Hibernate

 Any ideas would be greatly appreciated.

 Thanks,

 Bruce.




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: maven archetype

2012-08-25 Thread Bruce McGuire
PS: I forgot to mention that I would like to use testNG.

Thanks again.

Bruce.

On Fri, Aug 24, 2012 at 10:31 AM, Bruce McGuire brlmcgu...@gmail.comwrote:

 Hi There.

 It has been a while and a new company since I did a project with Wicket,
 and I would like to start out with a properly set up project.

 I am looking for an archetype that uses new versions of
   Wicket
   Spring
   Hibernate

 Any ideas would be greatly appreciated.

 Thanks,

 Bruce.



Re: Maven archetype and tomcat:run

2010-07-19 Thread Mansour Al Akeel
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
                        groupIdorg.apache.openejb/groupId
                        artifactIdopenejb-core/artifactId
                        version3.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
 

Re: Maven archetype and tomcat:run

2010-07-19 Thread Martin Grigorov
In your pom.xml find the dependency for javax.servlet:servlet-api and add
scopeprovided/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
 groupIdorg.apache.openejb/groupId
 artifactIdopenejb-core/artifactId
 version3.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 

Re: Maven archetype and tomcat:run

2010-07-19 Thread Mansour Al Akeel
Martin, I don't have this depndency in my pom, and it's not in the
list of resolved dependencies:

here's what I have

dependencies
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version${wicket.version}/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-extensions/artifactId
version${wicket.version}/version
/dependency

dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.6/version
scopetest/scope
/dependency

dependency
groupIdorg.wicketstuff/groupId
artifactIdjavaee-inject/artifactId
version${wicketstuff.version}/version
/dependency

dependency
groupIdorg.apache.openejb/groupId
artifactIdopenejb-core/artifactId
version3.1.2/version
/dependency

dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-log4j12/artifactId
version${slf4j.version}/version
/dependency




On Mon, Jul 19, 2010 at 3:07 PM, Martin Grigorov mgrigo...@apache.org wrote:
 In your pom.xml find the dependency for javax.servlet:servlet-api and add
 scopeprovided/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
  

Re: Maven archetype and tomcat:run

2010-07-19 Thread Martin Grigorov
Try to run the application with maven-jetty-plugin or even better in a
standalone web container without Maven involved and see what is the outcome.

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

 Martin, I don't have this depndency in my pom, and it's not in the
 list of resolved dependencies:

 here's what I have

dependencies
dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version${wicket.version}/version
/dependency

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-extensions/artifactId
version${wicket.version}/version
/dependency

dependency
groupIdjunit/groupId
artifactIdjunit/artifactId
version4.6/version
scopetest/scope
/dependency

dependency
groupIdorg.wicketstuff/groupId
artifactIdjavaee-inject/artifactId
version${wicketstuff.version}/version
/dependency

dependency
groupIdorg.apache.openejb/groupId
artifactIdopenejb-core/artifactId
version3.1.2/version
/dependency

 dependency
groupIdorg.slf4j/groupId
artifactIdslf4j-log4j12/artifactId
version${slf4j.version}/version
/dependency




 On Mon, Jul 19, 2010 at 3:07 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  In your pom.xml find the dependency for javax.servlet:servlet-api and
 add
  scopeprovided/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
  
 
 

Re: Maven archetype and tomcat:run

2010-07-19 Thread Mansour Al Akeel
It runs ok  under a standard tomcat installation, and I can do remote
debugging. However, it's not as convenient as if it's running from
maven, where I can view changes easily.
In my case, changes has to be deployed to tomcat installation after
re-packaging the war file.

When dealing with maven-jetty-plugin (from
http://javaadventure.blogspot.com/2010/03/openejb-jetty-and-maven-transaction.html
) I get an exception:

Listening for transport dt_socket at address: 4000
[INFO] Scanning for projects...
[INFO] 
[INFO] Building quickstart
[INFO]task-segment: [jetty:run]
[INFO] 
[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy
filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy
filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: quickstart
[INFO] Webapp source directory =
/home/mansour/workspace/Rentals/wicket/src/main/webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = /home/mansour/workspace/Rentals/wicket/target/classes
[INFO] Configuring Jetty from xml configuration file =
/home/mansour/workspace/Rentals/wicket/src/main/jetty/jetty.xml
2010-07-19 16:34:21.916:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
Apache OpenEJB 3.1.2build: 20091010-03:11
http://openejb.apache.org/
INFO - openejb.home = /home/mansour/workspace/Rentals/wicket
INFO - openejb.base = /home/mansour/workspace/Rentals/wicket
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Found ClientModule in classpath:
/home/mansour/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar
INFO - Found ClientModule in classpath:
/home/mansour/.m2/repository/org/mortbay/jetty/start/6.1.22/start-6.1.22.jar
INFO - Beginning load:
/home/mansour/.m2/repository/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar
ERROR - Unable to clear Sun JarFileFactory cache
java.lang.ClassCastException: java.lang.String cannot be cast to java.net.URL
at 
org.apache.openejb.ClassLoaderUtil.clearSunJarFileFactoryCache(ClassLoaderUtil.java:173)
at 
org.apache.openejb.ClassLoaderUtil.destroyClassLoader(ClassLoaderUtil.java:130)
at 
org.apache.openejb.ClassLoaderUtil.destroyClassLoader(ClassLoaderUtil.java:97)
at 
org.apache.openejb.config.DeploymentLoader.load(DeploymentLoader.java:185)
at 
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:509)
at 
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
at 
org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:299)
at 
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:278)
at org.apache.openejb.OpenEJB$Instance.init(OpenEJB.java:137)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
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:597)
at 
org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at 
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at 
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at 
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.init(InitialContext.java:197)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 

Re: Maven archetype and tomcat:run

2010-07-18 Thread Martin Grigorov
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
groupIdorg.apache.openejb/groupId
artifactIdopenejb-core/artifactId
version3.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