[appengine-java] Re: VerifyError on no-op default constructor

2010-05-04 Thread Attila Szegedi
I made a new version of the freemarker.jar, with a workaround for this
problem.

Download link for new freemarker JAR: https://sourceforge.net/
projects/freemarker/files/freemarker/2.3.16/freemarker-gae-pre3.jar/
download

The workaround will delay loading of the
FreeMarkerJspApplicationContext class as long as possible. It will now
let the JSP taglibs work in FreeMarker on GAE as long as the custom
JSP tags are not trying to use either
JspFactory.getJspApplicationContext() or PageContext.getELContext(). I
expect majority of taglibs out there fall into this category; those
that do rely on this functionality though are, for the time being, out
of luck - until GAE allows our class that implements
JspApplicationContext through the verifier.

Don, since this workaround is only partial, the ultimate solution
would be to let our FreeMarkerJspApplicationContext through the
verifier. Do you see any problem with that going forward?

Thanks,
  Attila.

On May 3, 5:54 pm, Don Schwarz schwa...@google.com wrote:
 I suspect that this is due to the way we make
 javax.servlet.jsp.JspApplicationContext available to application code but do
 not currently make javax.el.* available.  Thus, the javax.el.ELResolver
 class that you are providing in your application is not the same class that
 your JspApplicationContext implementation should reference.

 I don't know that there is anything you can do in your application to work
 around this for the moment (short of not implementing the
 JspApplicationContext interface), but coincidentally we are already planning
 to fix this in an upcoming release.

 If you can provide me with a compiled war directory for your test
 application (either privately or by attaching to the bug), I can determine
 whether our solution will work for your case as well.

 On Mon, May 3, 2010 at 8:45 AM, Sudhir Ramanandi sramana...@gmail.comwrote:



  Google, atleast speak, *what does this exception mean, *then I can fix the
  freemarker code.

  SN

  On Fri, Apr 30, 2010 at 10:57 AM, Sudhir Ramanandi 
  sramana...@gmail.comwrote:

  If the issue can't be fixed, can any one explain this strange behavior
  atlest ! thn we can fix our code.

  Thanks
  SN

  On Wed, Apr 28, 2010 at 11:06 AM, Sudhir Ramanandi 
  sramana...@gmail.comwrote:

  Can anyone from google explain what
  java.lang.VerifyError: (class:
  freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: init
  signature: ()V) Incompatible argument to function, means?

  See the issue
 http://code.google.com/p/googleappengine/issues/detail?id=3157

  I have attached the source of class FreeMarkerJspApplicationContext here.

  The line that throws above error is FreeMarkerJspApplicationContext.
  class.getName();

  What's wrong with this class? The class doesn't seems to have any thing
  unusual. Why this weird behavior?

  Seems google will never let freemarker to run on GAE

  Thanks
  SN

  --
  Sudhir Ramanandi
 http://www.ramanandi.org

  --
  Sudhir Ramanandi
 http://www.ramanandi.org

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine for Java group.
  To post to this group, send email to
  google-appengine-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine for Java group.
 To post to this group, send email to google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: VerifyError on no-op default constructor

2010-05-03 Thread Attila Szegedi
Hi Don,

thanks for chiming in.

Yeah, a feature of FreeMarker is that we provide a mechanism for JSP
tag libraries to appear as native FreeMarker macros in the templates.
The way we do it is that we emulate a JSP container environment for
them so we do implement a lot of javax.servlet.jsp.* internally.

I'm a bit puzzled by your explanation though as it doesn't really
explain the particular verification error. I'm trying to figure out
what, if any, workaround could we provide on the FreeMarker side. The
class in question has java.lang.Object as its superclass, so having
problem with signature ()V in init sounds really incredible...

Anyway, while you don't provide the javax.el.* classes, couldn't you
consider falling back to exposing JSP 2.0 javax.servlet.jsp.* classes
instead of JSP 2.1? It's mostly the EL stuff that distinguish JSP 2.0
from JSP 2.1 API anyway.

FreeMarker is actually smart enough to dynamically fall back to JSP
2.0 and not reference any JSP 2.1 functionality when it detects a JSP
2.0 PageContext class (one without a getELContext() method).

Attila.

On May 3, 5:54 pm, Don Schwarz schwa...@google.com wrote:
 I suspect that this is due to the way we make
 javax.servlet.jsp.JspApplicationContext available to application code but do
 not currently make javax.el.* available.  Thus, the javax.el.ELResolver
 class that you are providing in your application is not the same class that
 your JspApplicationContext implementation should reference.

 I don't know that there is anything you can do in your application to work
 around this for the moment (short of not implementing the
 JspApplicationContext interface), but coincidentally we are already planning
 to fix this in an upcoming release.

 If you can provide me with a compiled war directory for your test
 application (either privately or by attaching to the bug), I can determine
 whether our solution will work for your case as well.

 On Mon, May 3, 2010 at 8:45 AM, Sudhir Ramanandi sramana...@gmail.comwrote:



  Google, atleast speak, *what does this exception mean, *then I can fix the
  freemarker code.

  SN

  On Fri, Apr 30, 2010 at 10:57 AM, Sudhir Ramanandi 
  sramana...@gmail.comwrote:

  If the issue can't be fixed, can any one explain this strange behavior
  atlest ! thn we can fix our code.

  Thanks
  SN

  On Wed, Apr 28, 2010 at 11:06 AM, Sudhir Ramanandi 
  sramana...@gmail.comwrote:

  Can anyone from google explain what
  java.lang.VerifyError: (class:
  freemarker/ext/jsp/FreeMarkerJspApplicationContext, method: init
  signature: ()V) Incompatible argument to function, means?

  See the issue
 http://code.google.com/p/googleappengine/issues/detail?id=3157

  I have attached the source of class FreeMarkerJspApplicationContext here.

  The line that throws above error is FreeMarkerJspApplicationContext.
  class.getName();

  What's wrong with this class? The class doesn't seems to have any thing
  unusual. Why this weird behavior?

  Seems google will never let freemarker to run on GAE

  Thanks
  SN

  --
  Sudhir Ramanandi
 http://www.ramanandi.org

  --
  Sudhir Ramanandi
 http://www.ramanandi.org

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine for Java group.
  To post to this group, send email to
  google-appengine-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine for Java group.
 To post to this group, send email to google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.