Re: java.lang.NoClassDefFoundError: freemarker.ext.beans.BeansWrapper
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Double check that you got freemarker.jar in the WEB-IN/lib and it's not corrupted. AND, that it's the correct version, and that there isn't an ancient version of freemarker.jar somewhere that takes priority. BTW, why does a JSP page want to create a new Configuration object? There should be a single Configuration per web-application, created on application startup and then used like a singleton everywhere. Otherwise you defeat template caching, as the cache is in the Configuration object. p.s.: It can't be serious that these stuff still don't give the error location of the error in the source file (the .jsp)? I hope you just disabled debugging or something... /-: Monday, August 10, 2009, 4:36:29 AM, [email protected] wrote: > Hi, > I'm having problems creating an instance of > freemarker.template.Configuration(). The stacktrace is: > java.lang.NoClassDefFoundError > org.apache.jsp.index_jsp._jspService(index_jsp.java:49) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > org > .apache > .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source) > sun > .reflect > .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: > 25) > java.lang.reflect.Method.invoke(Method.java:585) > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) > java.security.AccessController.doPrivileged(Native Method) > javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266) > org > .apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java: > 157) > Since that stacktrace didn't give me any clue of what was going on, I > jumped into the source code and realized that there was a problem with > freemarker.template.DefaultObjectWrapper. > > A jsp file with this line: > new freemarker.template.DefaultObjectWrapper(); > resulted in: > java.lang.NoClassDefFoundError: freemarker.ext.beans.BeansWrapper > org.apache.jsp.index_jsp._jspService(index_jsp.java:48) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > org > .apache > .jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source) > sun > .reflect > .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: > 25) > java.lang.reflect.Method.invoke(Method.java:585) > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239) > java.security.AccessController.doPrivileged(Native Method) > javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:266) > org > .apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java: > 157) > My site is hosted on GoDaddy which uses Apache Tomcat/5.0.27. > On my development environment everything is running fine. > Any clue of what could be wrong ? > Thanks a lot. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > -- Best regards, Daniel Dekany ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july