Tapestry
  1. Tapestry
  2. TAPESTRY-2258

Error while autobuilding BeanEditForm's bean

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-core
    • Labels:
      None
    • Environment:
      archlinux, sun jdk 1.6.0_03, jetty 6, tapestry 5.0.11

      Description

      The error is consequence of new feauture https://issues.apache.org/jira/browse/TAPESTRY-2202.

      The model bean User is typical hibernate entity:

      @Entity
      @Table(name = "user")
      public class User {

      public User() {
      }

      public User(Integer id)

      { ... }

      ...
      }

      Exception while autobuild:

      [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Render queue error in SetupRender[admin/User:beaneditform.editor]: Exception instantiating instance of xx.model.User (for component 'admin/User:beaneditform.editor'): Error invoking constructor xx.model.User(Integer) (at User.java:51) (for service 'BeanModelSource'): No service implements the interface java.lang.Integer.
      org.apache.tapestry.internal.services.RenderQueueException: Render queue error in SetupRender[admin/User:beaneditform.editor]: Exception instantiating instance of xx.model.User (for component 'admin/User:beaneditform.editor'): Error invoking constructor xx.model.User(Integer) (at User.java:51) (for service 'BeanModelSource'): No service implements the interface java.lang.Integer. [at classpath:org/apache/tapestry/corelib/components/BeanEditForm.tml, line 8, column 81]
      at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:75)
      at org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:84)
      at $PageRenderQueue_118ad47de45.render($PageRenderQueue_118ad47de45.java)
      at $PageRenderQueue_118ad47de3e.render($PageRenderQueue_118ad47de3e.java)
      at org.apache.tapestry.services.TapestryModule$19.renderMarkup(TapestryModule.java:1293)
      at org.apache.tapestry.services.TapestryModule$23.renderMarkup(TapestryModule.java:1402)
      at $MarkupRenderer_118ad47de46.renderMarkup($MarkupRenderer_118ad47de46.java)
      at org.apache.tapestry.services.TapestryModule$22.renderMarkup(TapestryModule.java:1383)
      at $MarkupRenderer_118ad47de46.renderMarkup($MarkupRenderer_118ad47de46.java)
      at org.apache.tapestry.services.TapestryModule$21.renderMarkup(TapestryModule.java:1365)
      at $MarkupRenderer_118ad47de46.renderMarkup($MarkupRenderer_118ad47de46.java)
      at org.apache.tapestry.services.TapestryModule$20.renderMarkup(TapestryModule.java:1347)
      at $MarkupRenderer_118ad47de46.renderMarkup($MarkupRenderer_118ad47de46.java)
      at $MarkupRenderer_118ad47de43.renderMarkup($MarkupRenderer_118ad47de43.java)
      at org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
      at $PageMarkupRenderer_118ad47de41.renderPageMarkup($PageMarkupRenderer_118ad47de41.java)
      at org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
      at $PageResponseRenderer_118ad47dd7e.renderPageResponse($PageResponseRenderer_118ad47dd7e.java)
      at org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
      at org.apache.tapestry.services.TapestryModule$29.handle(TapestryModule.java:1607)
      at $PageRenderRequestHandler_118ad47dd7f.handle($PageRenderRequestHandler_118ad47dd7f.java)
      at $PageRenderRequestHandler_118ad47dd72.handle($PageRenderRequestHandler_118ad47dd72.java)
      at org.apache.tapestry.internal.services.PageRenderDispatcher.process(PageRenderDispatcher.java:97)
      at org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:73)
      at $Dispatcher_118ad47dd79.dispatch($Dispatcher_118ad47dd79.java)
      at $Dispatcher_118ad47dd6b.dispatch($Dispatcher_118ad47dd6b.java)
      at org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:944)
      at xx.app.RequestFilter.service(EduRequestFilter.java:36)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:553)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:520)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
      at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
      at org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
      at $RequestHandler_118ad47dd6c.service($RequestHandler_118ad47dd6c.java)
      at $RequestHandler_118ad47dd65.service($RequestHandler_118ad47dd65.java)
      at org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:924)
      at org.apache.tapestry.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:43)
      at $HttpServletRequestHandler_118ad47dd66.service($HttpServletRequestHandler_118ad47dd66.java)
      at org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
      at $HttpServletRequestFilter_118ad47dd64.service($HttpServletRequestFilter_118ad47dd64.java)
      at $HttpServletRequestHandler_118ad47dd66.service($HttpServletRequestHandler_118ad47dd66.java)
      at $HttpServletRequestHandler_118ad47dd60.service($HttpServletRequestHandler_118ad47dd60.java)
      at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:313)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      Caused by: org.apache.tapestry.ioc.internal.util.TapestryException: Exception instantiating instance of xx.model.User (for component 'admin/User:beaneditform.editor'): Error invoking constructor xx.model.User(Integer) (at User.java:51) (for service 'BeanModelSource'): No service implements the interface java.lang.Integer. [at classpath:org/apache/tapestry/corelib/components/BeanEditForm.tml, line 8, column 81]
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:884)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
      at org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:63)
      ... 70 more
      Caused by: org.apache.tapestry.ioc.internal.util.TapestryException: Exception instantiating instance of xx.model.User (for component 'admin/User:beaneditform.editor'): Error invoking constructor xx.model.User(Integer) (at User.java:51) (for service 'BeanModelSource'): No service implements the interface java.lang.Integer. [at classpath:org/apache/tapestry/corelib/components/BeanEditForm.tml, line 8, column 81]
      at org.apache.tapestry.corelib.components.BeanEditor.doPrepare(BeanEditor.java:163)
      at org.apache.tapestry.corelib.components.BeanEditor$Prepare.execute(BeanEditor.java:47)
      at org.apache.tapestry.corelib.components.BeanEditor$Prepare.execute(BeanEditor.java:41)
      at org.apache.tapestry.corelib.internal.FormSupportImpl.storeAndExecute(FormSupportImpl.java:116)
      at org.apache.tapestry.corelib.components.BeanEditor.setupRender(BeanEditor.java:135)
      at org.apache.tapestry.corelib.components.BeanEditor.setupRender(BeanEditor.java)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
      at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
      ... 73 more
      Caused by: java.lang.RuntimeException: Error invoking constructor xx.model.User(Integer) (at User.java:51) (for service 'BeanModelSource'): No service implements the interface java.lang.Integer.
      at org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:62)
      at org.apache.tapestry.ioc.internal.ServiceResourcesImpl.autobuild(ServiceResourcesImpl.java:123)
      at org.apache.tapestry.internal.beaneditor.BeanModelImpl.newInstance(BeanModelImpl.java:75)
      at org.apache.tapestry.corelib.components.BeanEditor.doPrepare(BeanEditor.java:156)
      ... 80 more
      Caused by: java.lang.RuntimeException: No service implements the interface java.lang.Integer.
      at org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
      at org.apache.tapestry.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:46)
      at $MasterObjectProvider_118ad47dd3c.provide($MasterObjectProvider_118ad47dd3c.java)
      at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:621)
      at org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:675)
      at org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:50)
      at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:209)
      at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:239)
      at org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParametersForConstructor(InternalUtils.java:227)
      at org.apache.tapestry.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:46)
      ... 83 more

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Slava Shushkanov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development