You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2007/11/16 20:24:43 UTC

[jira] Closed: (TAPESTRY-1898) Strange error for component classes under JDK 1.6

     [ https://issues.apache.org/jira/browse/TAPESTRY-1898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1898.
------------------------------------------

    Resolution: Invalid

Please re-open this bug if the problem continues, even with the new version of Javassist.

> Strange error for component classes under JDK 1.6
> -------------------------------------------------
>
>                 Key: TAPESTRY-1898
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1898
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.6
>         Environment: JDK 1.6
> Windows XP
>            Reporter: Ezra Epstein
>            Assignee: Howard M. Lewis Ship
>
> Leaky Framework: cannot implement a method named 'getServlerContext()' on a Page component.
> I've got a page that's working fine.  Was getting the ServletContext via an injected ApplicationGlobals and using the ApplicationGlobals within methods that needed the ServletContext.  Started to be a few methods needed it so I created a simple convenience method:
> 	@Inject
> 	@Service("ApplicationGlobals")
> 	private ApplicationGlobals applicationGlobals;
> 	protected ServletContext getServletContextObj() {
> 		return (applicationGlobals == null ? null : applicationGlobals.getServletContext());
> 	}
> And:
> org.apache.tapestry.internal.services.TransformationException
>  
> StackMapTable format error: bad class index
> transformation 
> InternalClassTransformation[
> public com.bar.baf.pages.UploadClip extends java.lang.Object
>   implements org.apache.tapestry.runtime.Component, org.apache.tapestry.runtime.RenderCommand
> add default method: public void postRenderCleanup()
> <default>
> add default method: public void setupRender(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void beginRender(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void beforeRenderTemplate(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void afterRenderTemplate(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void beforeRenderBody(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void afterRenderBody(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void afterRender(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public void cleanupRender(org.apache.tapestry.MarkupWriter $1, org.apache.tapestry.runtime.Event $2)
> <default>
> add default method: public boolean handleComponentEvent(org.apache.tapestry.runtime.ComponentEvent $1)
> <default>
> add default method: public org.apache.tapestry.ComponentResources getComponentResources()
> <default>
> add default method: public void containingPageDidLoad()
> <default>
> add default method: public void containingPageDidDetach()
> <default>
> add default method: public void containingPageDidAttach()
> <default>
> add field: protected final org.apache.tapestry.internal.InternalComponentResources _$resources;
> replace method: public final org.apache.tapestry.ComponentResources getComponentResources()
> return _$resources
> ...
> Turns out that getServletContext() is "reserved" by Tapestry.  I tried 
> protected abstract ServletContext getServletContext();
> But no dice. 
> Work-around:  changed the name of the method.  That worked.  Downside: the getServletContext() method name is the obvious /desirable one.
> Suggestion:  Prefer to have Tapestry not take over method names.  If it must, prefer to give them scoped names that aren't likely to be used by regular apps.  E.g.,  get/setTap5Foo (in general) and  getTap5ServletContext() (in particular).
> Thanks.

-- 
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org