difference between Link(SomePage.class) and Link(new SomePage())

2007-11-02 Thread auron

Hey all, 

Sorry to be the wicket newbie, but I was wondering if you guys could help me
to understand how Links work. 

I understand that when you do Link(SomePage.class), it calls the zero param
constructor of SomePage, and when you do Link(new SomePage(someParams)) you
can call other constructors, but besides this, what are the other
differences?

I have a LoginPage that renders a login form if the zero param constructor
is called, and when LoginPage(false) is called, it signs out the user first
and then renders a login page. The problem is that when I use Link(new
LoginPage(false)) to sign out the user, it does indeed sign out the user,
but a wicket page expired message is rendered rather than the LoginPage. 


public LoginPage() {
this(true);
}

public LoginPage(boolean isLogin) {
Model simpleUser = new Model(new SimpleUser());
add(new SignInForm(loginform, simpleUser));
ACPSession session = getACPSession();
if (isLogin) {
if (session.isSignedIn()) {
   
error(getLocalizer().getString(login.errors.alreadysignedin,
LoginPage.this));
}
} else {
if (session.isSignedIn()) {
info(getLocalizer().getString(login.info.signedout));
session.signOut();
//after this, Page Expired error.
}
}
}

Hope this made sense, any help is greatly appreciated. 
Thank you,
jin
-- 
View this message in context: 
http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: difference between Link(SomePage.class) and Link(new SomePage())

2007-11-02 Thread auron

Hey Igor - 

Thanks for the reply. Unfortunately I am still having some trouble finding
the solution for this. I've been using nabble to search the forums and so
far I cannot find anything of use (perhaps my search terms aren't
effective). 

it seems that main problem is that when invalidating a session and calling a
page that was previously within the session, the page expires, which makes
sense, but I need a way to tell wicket to use a new page and new session?
once this happens. The closest thing I found on the mailing list were these
threads:

http://www.nabble.com/Page-expiration-tf4191798.html#a11972501
http://www.nabble.com/Clearing-Session-tf4684426.html#a13452853

Any help is greatly appreciated. Thanks.

igor.vaynberg wrote:
 
 search the archives for this. this is a common mistake and has been
 explained/corrected on this mailing list a multitude of times.
 
 -igor
 
 On 11/2/07, auron [EMAIL PROTECTED] wrote:

 Hey all,

 Sorry to be the wicket newbie, but I was wondering if you guys could help
 me
 to understand how Links work.

 I understand that when you do Link(SomePage.class), it calls the zero
 param
 constructor of SomePage, and when you do Link(new SomePage(someParams))
 you
 can call other constructors, but besides this, what are the other
 differences?

 I have a LoginPage that renders a login form if the zero param
 constructor
 is called, and when LoginPage(false) is called, it signs out the user
 first
 and then renders a login page. The problem is that when I use Link(new
 LoginPage(false)) to sign out the user, it does indeed sign out the user,
 but a wicket page expired message is rendered rather than the LoginPage.


 public LoginPage() {
 this(true);
 }

 public LoginPage(boolean isLogin) {
 Model simpleUser = new Model(new SimpleUser());
 add(new SignInForm(loginform, simpleUser));
 ACPSession session = getACPSession();
 if (isLogin) {
 if (session.isSignedIn()) {

 error(getLocalizer().getString(login.errors.alreadysignedin,
 LoginPage.this));
 }
 } else {
 if (session.isSignedIn()) {
 info(getLocalizer().getString(login.info.signedout));
 session.signOut();
 //after this, Page Expired error.
 }
 }
 }

 Hope this made sense, any help is greatly appreciated.
 Thank you,
 jin
 --
 View this message in context:
 http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13549579
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/difference-between-Link%28SomePage.class%29-and-Link%28new-SomePage%28%29%29-tf4738073.html#a13556635
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



spring acegi injection question

2007-10-20 Thread auron

Hi everyone, 

On this page: 

http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html

there is a section that w/ the following code: 

public class WicketApplication extends AuthenticatedWebApplication {
//to be injected by Spting
private AuthenticationManager authenticationManager;

[...]

I am new to both wicket, spring, and acegi, so please forgive me if the
answer is obvious, but how do I inject authenticationManager into
WicketApplication? I have a setAuthenticationManager method and in my
applicationContext.xml I have the following:

bean id=webApplication class=edu.ucsd.acp.web.WicketApplication
property name=authenticationManager ref=authenticationManager/
/bean
bean id=authenticationManager
class=org.springframework.security.providers.ProviderManager
property name=providers
list
ref bean=daoAuthenticationProvider/
/list
/property
/bean

Any help is greatly appreciated, thank you!

Jin
-- 
View this message in context: 
http://www.nabble.com/spring-acegi-injection-question-tf4658329.html#a13310889
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: spring acegi injection question

2007-10-20 Thread auron

Hi Igor - 

Thanks alot for your help, I really appreciate it - 

I knew I was missing something, thanks for pointing me towards the right
direction. I editied my web.xml as necessary but for some reason,
authenticationManager is still not getting injected. Would you mind looking
through my web.xml to make sure things are in order? 

Once again, thank you very much for your time - 

Jin

?xml version=1.0 encoding=ISO-8859-1?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

display-nameedu_ucsd_acp/display-name
!-- Instantiate an application factory for spring to inject into 
wicket's
application class --
servlet
servlet-namewicket/servlet-name

servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
init-param
param-nameapplicationFactoryClassName/param-name

param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
/init-param
load-on-startup1/load-on-startup
/servlet
 !--  
  There are three means to configure Wickets configuration mode and
they are
  tested in the order given. 
  1) A system property: -Dwicket.configuration
  2) servlet specific init-param
  3) context specific context-param
  The value might be either development (reloading when templates
change)
  or deployment. If no configuration is found, development is 
the
default.
--
filter
filter-nameAcegi HTTP Request Security Filter/filter-name

filter-classorg.springframework.security.util.FilterToBeanProxy/filter-class
init-param
param-nametargetClass/param-name

param-valueorg.springframework.security.util.FilterChainProxy/param-value
/init-param
/filter

context-param
param-namecontextConfigLocation/param-name
param-value/WEB-INF/applicationContext*.xml/param-value
/context-param

filter-mapping
filter-nameAcegi HTTP Request Security Filter/filter-name
url-pattern/*/url-pattern
/filter-mapping
   filter
filter-namewicket.edu_ucsd_acp/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name

param-valueedu.ucsd.acp.web.WicketApplication/param-value
/init-param
/filter

filter-mapping
filter-namewicket.edu_ucsd_acp/filter-name
url-pattern/*/url-pattern
/filter-mapping

!--
- Loads the root application context of this web app at startup,
- by default from /WEB-INF/applicationContext.xml.
- Use 
WebApplicationContextUtils.getWebApplicationContext(servletContext)
- to access it anywhere in the web application, outside of the 
framework.
--
listener

listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
/listener
/web-app


igor.vaynberg wrote:
 
 thats exactly how you do it, the piece you are missing is that you
 need to tell wicket to pull your application object out of spring
 context rather then create a new instance. see
 SpringWebApplicationFactory and its javadoc.
 
 -igor
 
 
 On 10/20/07, auron [EMAIL PROTECTED] wrote:

 Hi everyone,

 On this page:

 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html

 there is a section that w/ the following code:

 public class WicketApplication extends AuthenticatedWebApplication {
 //to be injected by Spting
 private AuthenticationManager authenticationManager;

 [...]

 I am new to both wicket, spring, and acegi, so please forgive me if the
 answer is obvious, but how do I inject authenticationManager into
 WicketApplication? I have a setAuthenticationManager method and in my
 applicationContext.xml I have the following:

 bean id=webApplication class=edu.ucsd.acp.web.WicketApplication
 property name=authenticationManager
 ref=authenticationManager/
 /bean
 bean id=authenticationManager
 class=org.springframework.security.providers.ProviderManager
 property name=providers
 list
 ref bean=daoAuthenticationProvider/
 /list
 /property
 /bean

 Any help is greatly appreciated, thank you!

 Jin
 --
 View this message in context:
 http://www.nabble.com/spring-acegi-injection-question-tf4658329.html#a13310889
 Sent from the Wicket - User mailing list archive at Nabble.com

Re: spring acegi injection question

2007-10-20 Thread auron

Hi Igor - 

Well, the filter was included with the wicket quickstart maven package, and
the servlet I copied from the wicket wiki. What should I change in the
filter?

And, is it 'wrong' to have both servlet and filter defined? 

Thanks again,
Jin


igor.vaynberg wrote:
 
 you changed it for the servlet but not for the filter? why do you have
 both defined?
 
 -igor
 
 
 On 10/20/07, auron [EMAIL PROTECTED] wrote:

 Hi Igor -

 Thanks alot for your help, I really appreciate it -

 I knew I was missing something, thanks for pointing me towards the right
 direction. I editied my web.xml as necessary but for some reason,
 authenticationManager is still not getting injected. Would you mind
 looking
 through my web.xml to make sure things are in order?

 Once again, thank you very much for your time -

 Jin

 ?xml version=1.0 encoding=ISO-8859-1?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4

 display-nameedu_ucsd_acp/display-name
 !-- Instantiate an application factory for spring to inject into
 wicket's
 application class --
 servlet
 servlet-namewicket/servlet-name

 servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class
 init-param

 param-nameapplicationFactoryClassName/param-name

 param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
  !--
   There are three means to configure Wickets configuration
 mode and
 they are
   tested in the order given.
   1) A system property: -Dwicket.configuration
   2) servlet specific init-param
   3) context specific context-param
   The value might be either development (reloading when
 templates
 change)
   or deployment. If no configuration is found,
 development is the
 default.
 --
 filter
 filter-nameAcegi HTTP Request Security
 Filter/filter-name

 filter-classorg.springframework.security.util.FilterToBeanProxy/filter-class
 init-param
 param-nametargetClass/param-name

 param-valueorg.springframework.security.util.FilterChainProxy/param-value
 /init-param
 /filter

 context-param
 param-namecontextConfigLocation/param-name
 param-value/WEB-INF/applicationContext*.xml/param-value
 /context-param

 filter-mapping
 filter-nameAcegi HTTP Request Security Filter/filter-name
 url-pattern/*/url-pattern
 /filter-mapping
filter
 filter-namewicket.edu_ucsd_acp/filter-name

 filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
 init-param
 param-nameapplicationClassName/param-name

 param-valueedu.ucsd.acp.web.WicketApplication/param-value
 /init-param
 /filter

 filter-mapping
 filter-namewicket.edu_ucsd_acp/filter-name
 url-pattern/*/url-pattern
 /filter-mapping

 !--
 - Loads the root application context of this web app at startup,
 - by default from /WEB-INF/applicationContext.xml.
 - Use
 WebApplicationContextUtils.getWebApplicationContext(servletContext)
 - to access it anywhere in the web application, outside of the
 framework.
 --
 listener

 listener-classorg.springframework.web.context.ContextLoaderListener/listener-class
 /listener
 /web-app


 igor.vaynberg wrote:
 
  thats exactly how you do it, the piece you are missing is that you
  need to tell wicket to pull your application object out of spring
  context rather then create a new instance. see
  SpringWebApplicationFactory and its javadoc.
 
  -igor
 
 
  On 10/20/07, auron [EMAIL PROTECTED] wrote:
 
  Hi everyone,
 
  On this page:
 
  http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
 
  there is a section that w/ the following code:
 
  public class WicketApplication extends AuthenticatedWebApplication {
  //to be injected by Spting
  private AuthenticationManager authenticationManager;
 
  [...]
 
  I am new to both wicket, spring, and acegi, so please forgive me if
 the
  answer is obvious, but how do I inject authenticationManager into
  WicketApplication? I have a setAuthenticationManager method and in my
  applicationContext.xml I have the following:
 
  bean id=webApplication class=edu.ucsd.acp.web.WicketApplication
  property name=authenticationManager
  ref=authenticationManager/
  /bean
  bean id=authenticationManager
  class=org.springframework.security.providers.ProviderManager

Re: wicket-auth-roles updated for wicket 1.3 ?

2007-10-19 Thread auron

Damn, talk about a brain fart - 

Thanks Igor, much appreciated -
Jin


igor.vaynberg wrote:
 
 read the error message
 
 move that code from constructor to init()
 
 -igor
 
 
 On 10/19/07, auron [EMAIL PROTECTED] wrote:

 Hi all -

 I am trying to integrate wicket 1.3 beta 4, acegi security, and
 wicket-auth-roles. For the most part I followed the how-to on
 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html but
 modified
 it to use a simple Jdbc Dao for my authenticationDao.

 When I run the web-app I get the following error message:

 2007-10-19 08:37:33.686::WARN:  failed wicket.myapp
 org.apache.wicket.WicketRuntimeException: Use Application.init() method
 for
 conf
 iguring your application object
 at
 org.apache.wicket.Application.getSettings(Application.java:829)
 at
 org.apache.wicket.Application.getSecuritySettings(Application.java:56
 6)
 at
 edu.ucsd.acp.web.WicketApplication.init(WicketApplication.java:21)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)

 at
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
 orAccessorImpl.java:39)
 at
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
 onstructorAccessorImpl.java:27)
 at
 java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at java.lang.Class.newInstance0(Class.java:355)
 at java.lang.Class.newInstance(Class.java:308)
 [...]

 Here is my Application code:

 public class WicketApplication extends AuthenticatedWebApplication {
 //to be injected by Spting
 private AuthenticationManager authenticationManager;
 /**
  * Constructor
  */
 public WicketApplication() {
 super.init();
 //Security Settings
 getSecuritySettings().setAuthorizationStrategy(new
 MetaDataRoleAuthorizationStrategy(this));

 MetaDataRoleAuthorizationStrategy.authorize(BasePage.class,
 SecurityConstants.ROLE_ADMIN);
 }


 Could this be due to an incompatibility between wicket 1.3 and
 wicket-auth-roles?

 Thanks,
 Jin
 --
 View this message in context:
 http://www.nabble.com/wicket-auth-roles-updated-for-wicket-1.3---tf4654119.html#a13297288
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/wicket-auth-roles-updated-for-wicket-1.3---tf4654119.html#a13299261
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wicket-auth-roles updated for wicket 1.3 ?

2007-10-19 Thread auron

Hi all - 

I am trying to integrate wicket 1.3 beta 4, acegi security, and
wicket-auth-roles. For the most part I followed the how-to on
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html but modified
it to use a simple Jdbc Dao for my authenticationDao. 

When I run the web-app I get the following error message:

2007-10-19 08:37:33.686::WARN:  failed wicket.myapp
org.apache.wicket.WicketRuntimeException: Use Application.init() method for
conf
iguring your application object
at org.apache.wicket.Application.getSettings(Application.java:829)
at
org.apache.wicket.Application.getSecuritySettings(Application.java:56
6)
at
edu.ucsd.acp.web.WicketApplication.init(WicketApplication.java:21)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
[...]

Here is my Application code:

public class WicketApplication extends AuthenticatedWebApplication {
//to be injected by Spting
private AuthenticationManager authenticationManager;
/**
 * Constructor
 */
public WicketApplication() {
super.init();
//Security Settings
getSecuritySettings().setAuthorizationStrategy(new
MetaDataRoleAuthorizationStrategy(this));
MetaDataRoleAuthorizationStrategy.authorize(BasePage.class,
SecurityConstants.ROLE_ADMIN);  
}


Could this be due to an incompatibility between wicket 1.3 and
wicket-auth-roles?

Thanks,
Jin
-- 
View this message in context: 
http://www.nabble.com/wicket-auth-roles-updated-for-wicket-1.3---tf4654119.html#a13297288
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



maven-jetty-plugin error

2007-09-20 Thread auron

Hello everyone, 

(newbie alert!)

Please forgive me if the contents of this message doesn't belong in wicket.
I am new to maven, wicket, and jetty, so I am a bit unsure where to ask
about my problem.

I installed Java6 SDK, Maven 2.0.7.

I then ran this as specified by Wicket's website:

mvn archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart
-DarchetypeVersion=1.3.0-beta3
-DgroupId=com.mycompany
-DartifactId=myproject

I went into my the newly created myproject directory and did:

mvn compile
mvn package
mvn jetty:run

jetty:run threw an error and I was hoping someone can help. Here is the
error with the -e option:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]
-
---
[INFO] Building quickstart
[INFO]task-segment: [jetty:run]
[INFO]
-
---
[INFO] Preparing jetty:run
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
-
this realm = app0.child-container[org.mortbay.jetty:maven-jetty-plugin]
-some imports omitted-
Number of imports: 4
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
this realm = plexus.core
Number of imports: 4
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
import: [EMAIL PROTECTED]
-
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Internal error in the plugin manager executing goal
'org.mortbay.jetty:ma
ven-jetty-plugin:6.1H.5-beta:run': Unable to find the mojo
'org.mortbay.jetty:ma
ven-jetty-plugin:6.1H.5-beta:run' in the plugin
'org.mortbay.jetty:maven-jetty-p
lugin'
org/mortbay/jetty/Handler (Unsupported major.minor version 49.0)
[INFO]

[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the pl
ugin manager executing goal
'org.mortbay.jetty:maven-jetty-plugin:6.1H.5-beta:ru
n': Unable to find the mojo
'org.mortbay.jetty:maven-jetty-plugin:6.1H.5-beta:ru
n' in the plugin 'org.mortbay.jetty:maven-jetty-plugin'
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:543)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:463)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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)
Caused by: org.apache.maven.plugin.PluginManagerException: Unable to find
the mo
jo 'org.mortbay.jetty:maven-jetty-plugin:6.1H.5-beta:run' in the plugin
'org.mor
tbay.jetty:maven-jetty-plugin'
at
org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(Defaul
tPluginManager.java:571)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:421)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
... 16 more
Caused by:
org.codehaus.plexus.component.repository.exception.ComponentLookupExc
eption: Unable to lookup component
'org.apache.maven.plugin.Mojoorg.mortbay.jett

Re: maven-jetty-plugin error

2007-09-20 Thread auron

Thank you very much!

I added version6.1.5/version to the maven-jetty plugin entry in maven
and everything works! 

Thanks again!
Jin


Martijn Dashorst wrote:
 
 Seems like a Java conflict for the Jetty plugin version you are using:
 
 org/mortbay/jetty/Handler (Unsupported major.minor version 49.0)
 
 I am not sure which version this is, but I suggest you play with the
 jetty-plugin version a bit.
 
 You can specify the version directly in your pom with the plugin in
 the build section, or in the pluginManagement section.
 
 Martijn
 
 On 9/21/07, auron [EMAIL PROTECTED] wrote:

 Hello everyone,

 (newbie alert!)

 Please forgive me if the contents of this message doesn't belong in
 wicket.
 I am new to maven, wicket, and jetty, so I am a bit unsure where to ask
 about my problem.

 I installed Java6 SDK, Maven 2.0.7.

 I then ran this as specified by Wicket's website:

 mvn archetype:create -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart
 -DarchetypeVersion=1.3.0-beta3
 -DgroupId=com.mycompany
 -DartifactId=myproject

 I went into my the newly created myproject directory and did:

 mvn compile
 mvn package
 mvn jetty:run

 jetty:run threw an error and I was hoping someone can help. Here is the
 error with the -e option:
 [INFO] Scanning for projects...
 [INFO] Searching repository for plugin with prefix: 'jetty'.
 [INFO]
 -
 ---
 [INFO] Building quickstart
 [INFO]task-segment: [jetty:run]
 [INFO]
 -
 ---
 [INFO] Preparing jetty:run
 [INFO] [resources:resources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:compile]
 [INFO] Nothing to compile - all classes are up to date
 [INFO] [resources:testResources]
 [INFO] Using default encoding to copy filtered resources.
 [INFO] [compiler:testCompile]
 [INFO] Nothing to compile - all classes are up to date
 -
 this realm = app0.child-container[org.mortbay.jetty:maven-jetty-plugin]
 -some imports omitted-
 Number of imports: 4
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 this realm = plexus.core
 Number of imports: 4
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 import: [EMAIL PROTECTED]
 -
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Internal error in the plugin manager executing goal
 'org.mortbay.jetty:ma
 ven-jetty-plugin:6.1H.5-beta:run': Unable to find the mojo
 'org.mortbay.jetty:ma
 ven-jetty-plugin:6.1H.5-beta:run' in the plugin
 'org.mortbay.jetty:maven-jetty-p
 lugin'
 org/mortbay/jetty/Handler (Unsupported major.minor version 49.0)
 [INFO]
 
 [INFO] Trace
 org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
 the pl
 ugin manager executing goal
 'org.mortbay.jetty:maven-jetty-plugin:6.1H.5-beta:ru
 n': Unable to find the mojo
 'org.mortbay.jetty:maven-jetty-plugin:6.1H.5-beta:ru
 n' in the plugin 'org.mortbay.jetty:maven-jetty-plugin'
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
 ultLifecycleExecutor.java:543)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
 Goal(DefaultLifecycleExecutor.java:493)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
 ltLifecycleExecutor.java:463)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
 dleFailures(DefaultLifecycleExecutor.java:311)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
 ts(DefaultLifecycleExecutor.java:278)
 at
 org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
 fecycleExecutor.java:143)
 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
 at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 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)
 Caused