[weld-issues] [JBoss JIRA] Resolved: (WELD-287) Unable to run example in eclipse using m2eclipse as described in documentation

Dan Allen (JIRA) jira-events at lists.jboss.org
Wed Jan 27 14:16:20 EST 2010


     [ https://jira.jboss.org/jira/browse/WELD-287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Allen resolved WELD-287.
----------------------------

    Resolution: Done


Solved by improving the documentation. No code change is warranted.

> Unable to run example in eclipse using m2eclipse as described in documentation
> ------------------------------------------------------------------------------
>
>                 Key: WELD-287
>                 URL: https://jira.jboss.org/jira/browse/WELD-287
>             Project: Weld
>          Issue Type: Task
>          Components: Examples
>            Reporter: Martin Gencur
>            Assignee: Dan Allen
>             Fix For: 1.0.1.CR1
>
>
> In documentation of weld (bundled with weld), there is a chapter "7.2.1. Creating the Eclipse project" . I was able to import a wicket/numberguess example to eclipse using m2eclipse plugin, but I wasn't able to run the example. When I run src/test/java/org/jboss/weld/examples/wicket/Start.java like   Run As -> Java Application, and go to http://localhost:9090/,  the following output is displayed:
> Nov 12, 2009 3:50:34 PM org.apache.wicket.RequestCycle logRuntimeException
> SEVERE: Can't instantiate page using constructor public org.jboss.weld.examples.wicket.HomePage()
> org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.jboss.weld.examples.wicket.HomePage()
> 	at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
> 	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
> 	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
> 	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
> 	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
> 	at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> 	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
> 	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
> 	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
> 	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> 	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
> 	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
> 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
> 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
> 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
> 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> 	at org.mortbay.jetty.Server.handle(Server.java:326)
> 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
> 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
> 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
> 	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
> 	... 26 more
> Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: class org.jboss.weld.examples.wicket.Game; binding types = [@Default]Unable to resolve any Managed Beans
> 	at org.jboss.weld.BeanManagerImpl.getBean(BeanManagerImpl.java:1074)
> 	at org.jboss.weld.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:1040)
> 	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
> 	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:727)
> 	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:739)
> 	at org.jboss.weld.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:115)
> 	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
> 	at org.jboss.weld.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:109)
> 	at org.jboss.weld.wicket.util.NonContextual$Instance.inject(NonContextual.java:121)
> 	at org.jboss.weld.wicket.WeldComponentInstantiationListener.onInstantiation(WeldComponentInstantiationListener.java:30)
> 	at org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:1040)
> 	at org.apache.wicket.Component.<init>(Component.java:920)
> 	at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:113)
> 	at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:105)
> 	at org.apache.wicket.Page.<init>(Page.java:237)
> 	at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:185)
> 	at org.jboss.weld.examples.wicket.HomePage.<init>(HomePage.java:23)
> 	... 31 more
> When I got here:   http://localhost:9090/weld-wicket-numberguess   , the page displays HTTP ERROR 404 (not found)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the weld-issues mailing list