In fact, I just noticed when I added the tapestry-core-5.0.6.jar in [tomcat]/common/lib I still have an error but NOT on the same class. So before it was on :
java.lang.NoClassDefFoundError: org/apache/tapestry/TapestryFilter After put the tapestry-core jar in the lib of Tomcat : java.lang.NoClassDefFoundError: org/apache/tapestry/ioc/services/SymbolProvider So I added the tapestry-ioc jar and now I have this one : java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory I imagine I could put all the lib at the server side, BUT, it's not how it should work!! It seems the ClassLoader didn't load all the libs when apply the filter, so how to force the loading? Why TapestryFilter doesn't have the same problem than my CustomFilter?? 2007/12/12, Michael Bernagou <[EMAIL PROTECTED]>: > > Hum, any idea? > > 2007/12/11, Michael Bernagou <[EMAIL PROTECTED]>: > > > > The error is generated by this line offcourse : > > private TapestryFilter tapestryFilter = new TapestryFilter(); > > > > Still doesn't know why... > > > > 2007/12/11, Michael Bernagou < [EMAIL PROTECTED]>: > > > > > > Hi, > > > > > > I tried to creat emy own filter, a Hibernate filter in fact, like that > > > : > > > > > > [code] > > > // here the imports... compilation ok > > > public class HibernateFilter implements Filter { > > > private TapestryFilter tapestryFilter = new TapestryFilter(); > > > > > > private static Log log = LogFactory.getLog(HibernateFilter.class); > > > > > > public void init(FilterConfig filterConfig) throws > > > ServletException { > > > log.info("Servlet filter init, now opening/closing a Session > > > for each request."); > > > tapestryFilter.init(filterConfig); > > > } > > > > > > public void doFilter(ServletRequest request, ServletResponse > > > response, FilterChain chain) throws IOException, ServletException { > > > > > > try { > > > HibernateUtil.beginTransaction(); > > > chain.doFilter(request, response); > > > HibernateUtil.commitTransaction(); > > > > > > } catch (RuntimeException e) { > > > HibernateUtil.rollbackTransaction (); > > > throw e; > > > } catch (Exception e) { > > > HibernateUtil.rollbackTransaction(); > > > throw new ServletException(e); > > > } finally { > > > HibernateUtil.closeSession (); > > > } > > > > > > tapestryFilter.doFilter(request, response, chain); > > > } > > > > > > public void destroy() { > > > tapestryFilter.destroy(); > > > } > > > } > > > [/code] > > > > > > then I adapt my web.xml like that : > > > > > > [code] > > > <filter> > > > <filter-name>app</filter-name> > > > <filter-class>org.hibernate.util.HibernateFilter > > > </filter-class> > > > </filter> > > > <filter-mapping> > > > <filter-name>app</filter-name> > > > <url-pattern>/*</url-pattern> > > > </filter-mapping> > > > [/code] > > > > > > But I get that ERROR at runtime : > > > > > > [code] > > > 11-Dec-2007 16:48:12 org.apache.catalina.core.StandardContextfilterStart > > > SEVERE: Exception starting filter app > > > java.lang.NoClassDefFoundError: org/apache/tapestry/TapestryFilter > > > [/code] > > > > > > TapestryFilter is not loaded by the ClassLoader. Why and how can I do > > > that? I tried to test by put the tapestry-core.jar directly in [ > > > tomcat5.5]/common/lib without success. > > > > > > Any idea? > > > > > > Thanks! > > > > > > -- > > > Michael Bernagou > > > Java Developper > > > > > > > > > > -- > > Michael Bernagou > > Java Developper > > > > > -- > Michael Bernagou > Java Developper -- Michael Bernagou Java Developper