[ 
https://issues.apache.org/jira/browse/TAPESTRY-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630044#action_12630044
 ] 

Howard M. Lewis Ship commented on TAPESTRY-2517:
------------------------------------------------

To reproduce this, visit a page with an invalid injection.  You get an 
appropriate error.  A refresh of the page (a new request for the page) results 
in the second error (the one involving non-private fields).


I believe that what's happening is that the *partially* transformed class is 
"hanging around".  A refresh of the page attempts to restart the 
transformation, but see some of the work Tapestry did on the previous request.


> A failed service injection into a component field is visible in the browser 
> as a spurious error about field _$resources
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-2517
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2517
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Howard M. Lewis Ship
>            Priority: Critical
>
> The error was that I was injecting a service but hadn't bound it in my 
> AppModule.  Scanning down the console, I found the exception:
> Caused by: java.lang.RuntimeException: Error obtaining injected value for 
> field com.formos.blog.pages.blog.BlogIndex.blogDAO: No service implements the 
> interface com.formos.blog.services.BlogDAO.
>       at 
> org.apache.tapestry5.internal.transform.InjectWorker.transform(InjectWorker.java:68)
>       at 
> $ComponentClassTransformWorker_11b13c8fa72.transform($ComponentClassTransformWorker_11b13c8fa72.java)
>       at 
> $ComponentClassTransformWorker_11b13c8fa68.transform($ComponentClassTransformWorker_11b13c8fa68.java)
>       at 
> org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:161)
>       ... 98 more
> Caused by: java.lang.RuntimeException: No service implements the interface 
> com.formos.blog.services.BlogDAO.
>       at 
> org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:523)
>       at 
> org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:44)
>       at 
> org.apache.tapestry5.internal.services.ServiceInjectionProvider.provideInjection(ServiceInjectionProvider.java:40)
>       at 
> $InjectionProvider_11b13c8fa74.provideInjection($InjectionProvider_11b13c8fa74.java)
>       at 
> $InjectionProvider_11b13c8fa6d.provideInjection($InjectionProvider_11b13c8fa6d.java)
>       at 
> org.apache.tapestry5.internal.transform.InjectWorker.transform(InjectWorker.java:57)
> However, the exception in the web browser was:
> java.lang.RuntimeException
> Class com.formos.blog.pages.blog.BlogIndex contains field(s) (_$resources) 
> that are not private. You should change these fields to private, and add 
> accessor methods if needed.
> Stack trace
>         * 
> org.apache.tapestry5.internal.services.InternalClassTransformationImpl.verifyFields(InternalClassTransformationImpl.java:294)
>         * 
> org.apache.tapestry5.internal.services.InternalClassTransformationImpl.preloadMemberNames(InternalClassTransformationImpl.java:256)
>         * 
> org.apache.tapestry5.internal.services.InternalClassTransformationImpl.<init>(InternalClassTransformationImpl.java:151)
>         * 
> org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:154)
>         * 
> org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:182)
>         * javassist.Loader.findClass(Loader.java:340)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to