Make sure you enum type is not in a controlled package, such as x.y.z.components or x.y.z.pages.
On Tue, Jan 25, 2011 at 12:29 PM, Howard Lewis Ship <hls...@gmail.com> wrote: > Very odd: > > @SuppressWarnings("unchecked") > > SelectModel defaultModel() > > { > > Class valueType = resources.getBoundType("value"); > > if (valueType == null) > > return null; > > if (Enum.class.isAssignableFrom(valueType)) > > return new EnumSelectModel(valueType, > resources.getContainerMessages()); // line 254 > > return null; > > } > > public <T extends Enum> EnumSelectModel(Class<T> enumClass, Messages > messages) > > { > > this(enumClass, messages, enumClass.getEnumConstants()); //line 41 > > } > > public <T extends Enum> EnumSelectModel(Class<T> enumClass, > Messages messages, T[] values) > > { > > assert enumClass != null; > > assert messages != null; > > String prefix = enumClass.getSimpleName(); > > for (T value : values) // line 50 > > { > > String label = > TapestryInternalUtils.getLabelForEnum(messages, prefix, value); > > options.add(new OptionModelImpl(label, value)); > > } > > } > > I just don't see how values can be null there; it would be useful to > see your Enum type. > On Tue, Jan 25, 2011 at 11:57 AM, Kalle Korhonen > <kalle.o.korho...@gmail.com> wrote: >> >> It's in the stack trace: >> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException [at >> classpath:com/skyecandy/components/EditSelectField.tml, line 6] >> at >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:993) >> at >> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:829) >> at >> org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:171) >> at >> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:190) >> at >> org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174) >> at >> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65) >> ... 103 more >> Caused by: java.lang.NullPointerException >> at >> org.apache.tapestry5.util.EnumSelectModel.<init>(EnumSelectModel.java:50) >> >> Kalle >> >> >> On Tue, Jan 25, 2011 at 11:03 AM, vinod >> <padmavathi.venkatesw...@gmail.com> wrote: >> > >> > Hi, >> > >> > This is the second issue that we are facing while migrating from Tapestry >> > 5.1.0.5 to Tapestry 5.2.4. To add to your information, we are using >> > Hibernate 3.6, Hibernate Search 3.3, Spring 3.0.5, Tapestry Spring Security >> > 3.0 >> > >> > Could any one of you please share your experience in solving this issue? >> > >> > 35699 ERROR [http-8080-Processor23] >> > org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler - >> > Processing of request failed with uncaught exception: org.apache.tape >> > stry5.ioc.internal.OperationException >> > org.apache.tapestry5.ioc.internal.OperationException [at >> > classpath:com/skyecandy/components/EditSelectField.tml, line 6] >> > at >> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102) >> > at >> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:69) >> > at >> > org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68) >> > at >> > org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063) >> > at >> > org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173) >> > at $PageLoader_12dbe7daf06.loadPage($PageLoader_12dbe7daf06.java) >> > at >> > org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81) >> > at $PageSource_12dbe7daf04.getPage($PageSource_12dbe7daf04.java) >> > at >> > org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74) >> > at >> > $RequestPageCache_12dbe7daf03.get($RequestPageCache_12dbe7daf03.java) >> > at >> > $RequestPageCache_12dbe7daefd.get($RequestPageCache_12dbe7daefd.java) >> > at >> > org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55) >> > at >> > org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326) >> > at >> > $PageRenderRequestHandler_12dbe7daf01.handle($PageRenderRequestHandler_12dbe7daf01.java) >> > at >> > $PageRenderRequestHandler_12dbe7daefa.handle($PageRenderRequestHandler_12dbe7daefa.java) >> > at >> > org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) >> > at >> > org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) >> > at >> > $ComponentRequestHandler_12dbe7daefb.handlePageRender($ComponentRequestHandler_12dbe7daefb.java) >> > at >> > $ComponentRequestHandler_12dbe7daef6.handlePageRender($ComponentRequestHandler_12dbe7daef6.java) >> > at >> > org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) >> > at $Dispatcher_12dbe7daef8.dispatch($Dispatcher_12dbe7daef8.java) >> > at $Dispatcher_12dbe7daef3.dispatch($Dispatcher_12dbe7daef3.java) >> > at >> > org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321) >> > at com.skyecandy.services.AppModule$4.service(AppModule.java:264) >> > at >> > $RequestFilter_12dbe7daeef.service($RequestFilter_12dbe7daeef.java) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper$1.doFilter(RequestFilterWrapper.java:60) >> > at >> > nu.localhost.tapestry5.springsecurity.services.internal.SpringSecurityExceptionTranslationFilter.doFilter(SpringSecurityExceptionTranslationFilter.java:90) >> > at >> > nu.localhost.tapestry5.springsecurity.services.internal.RequestFilterWrapper.service(RequestFilterWrapper.java:55) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) >> > at >> > org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80) >> > at >> > org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) >> > at >> > org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) >> > at >> > $RequestHandler_12dbe7daef4.service($RequestHandler_12dbe7daef4.java) >> > at >> > $RequestHandler_12dbe7daee7.service($RequestHandler_12dbe7daee7.java) >> > at >> > org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272) >> > at >> > org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44) >> > . >> > . >> > . >> > . >> > . >> > . >> > . >> > Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException [at >> > classpath:com/skyecandy/components/EditSelectField.tml, line 6] >> > at >> > org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:993) >> > at >> > org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:829) >> > at >> > org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:171) >> > at >> > org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:190) >> > at >> > org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174) >> > at >> > org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65) >> > ... 103 more >> > Caused by: java.lang.NullPointerException >> > at >> > org.apache.tapestry5.util.EnumSelectModel.<init>(EnumSelectModel.java:50) >> > at >> > org.apache.tapestry5.util.EnumSelectModel.<init>(EnumSelectModel.java:41) >> > at >> > org.apache.tapestry5.corelib.components.Select.defaultModel(Select.java:254) >> > at >> > org.apache.tapestry5.corelib.components.Select$MethodAccess_defaultModel_12dbe7db03e.invoke(Select$MethodAccess_defaultModel_12dbe7db03e.java) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeParameterDefaultMethod.advise(ParameterWorker.java:95) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeLoadOnParmeterConduit.advise(ParameterWorker.java:118) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeParameterDefaultMethod.advise(ParameterWorker.java:101) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeLoadOnParmeterConduit.advise(ParameterWorker.java:118) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeLoadOnParmeterConduit.advise(ParameterWorker.java:118) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeParameterDefaultMethod.advise(ParameterWorker.java:101) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.internal.transform.ParameterWorker$InvokeLoadOnParmeterConduit.advise(ParameterWorker.java:118) >> > at >> > org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86) >> > at >> > org.apache.tapestry5.corelib.components.Select.containingPageDidLoad(Select.java) >> > at >> > org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:120) >> > at >> > org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:985) >> > >> > >> > Thanks for all your advice, >> > Vinod >> > -- >> > View this message in context: >> > http://tapestry.1045711.n5.nabble.com/org-apache-tapestry5-util-EnumSelectModel-java-lang-NullPointerException-migrate-from-Tapestry-5-1-04-tp3356787p3356787.html >> > Sent from the Tapestry - User mailing list archive at Nabble.com. >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> > For additional commands, e-mail: users-h...@tapestry.apache.org >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org