roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allen Gilliland <allen.gillil...@sun.com>
Subject Re: captcha comment authentication configuration problem
Date Mon, 31 Jul 2006 16:25:32 GMT
that's not a problem with how the class is loaded and instantiated in 
the code, the problem is that the interface for the CommentAuthenticator 
was moved during some code updating.

In 2.3 it's at org.apache.roller.ui.rendering.velocity.CommentAuthenticator

In 3.0 and moving forward it is at 
org.apache.roller.ui.util.CommentAuthenticator

all you should need to do is update that class with the the correct 
location of the interface and recompile and it should work.

-- Allen


Guy Katz wrote:
> Hi;
> 
> I am trying to get the captcha comment authentication to work with no
> success.
> 
> I un- commented the <action> and <plug-in> elements from the
> struts-config file and added my own roller-custom.properties with only
> one key
> (comment.authenticator.classname=com.octo.captcha.module.roller.JCaptcha
> CommentAuthenticator)
> 
>  
> 
> When opening a single entry page I get a popup stating "there was a
> problem retrieving the xml data Internal server error"
> 
> Looking at the logs I see a no class def  problem. Probably the captcha
> authenticator is trying to load the interface it implements and fails
> for some reason.
> 
> Did anybody encounter this?
> 
> I looked and the comment servlets and the only thing I found that maybe
> can impact this is the fact the they use:
> 
>             Class clazz = Class.forName(name);
> 
>             this.authenticator = (CommentAuthenticator)
> clazz.newInstance();
> 
> Maybe more correct in a JEE environment to use:
> 
>             Class clazz =
> Thread,currentThread.getContextClassloader().loadClass(name);
> 
>             this.authenticator = (CommentAuthenticator)
> clazz.newInstance();
> 
> but I am not sure it fixes the problem cause I don't compile the roller
> from the sourc so I couldn't fix this.
> 
>  
> 
> Any ideas?
> 
>  
> 
>  
> 
> here is the stack trace:
> 
> Stack trace:
> 
> INFO  2006-07-31 10:18:13,561 ReferrerQueueManagerImpl:<init> -
> Asynchronous referrer processing = false
> 
> ERROR 2006-07-31 10:18:16,374 ApplicationContext:log -
> StandardWrapper.Throwable
> 
> java.lang.NoClassDefFoundError:
> org/roller/presentation/velocity/CommentAuthenticator
> 
>             at java.lang.ClassLoader.defineClass1(Native Method)
> 
>             at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> 
>             at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
> ssLoader.java:1812)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
> .java:866)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> .java:1319)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> .java:1198)
> 
>             at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> 
>             at java.lang.Class.forName0(Native Method)
> 
>             at java.lang.Class.forName(Class.java:164)
> 
>             at
> org.apache.roller.presentation.servlets.CommentAuthenticatorServlet.init
> (CommentAuthenticatorServlet.java:81)
> 
>             at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:1105)
> 
>             at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:7
> 57)
> 
>             at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:130)
> 
>             at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:178)
> 
>             at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
> 
>             at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
> 
>             at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:107)
> 
>             at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 48)
> 
>             at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
> 9)
> 
>             at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:664)
> 
>             at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:527)
> 
>             at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:80)
> 
>             at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:684)
> 
>             at java.lang.Thread.run(Thread.java:595)
> 
> ERROR 2006-07-31 10:18:16,436 StandardWrapperValve:invoke - Allocate
> exception for servlet CommentAuthenticatorServlet
> 
> java.lang.NoClassDefFoundError:
> org/roller/presentation/velocity/CommentAuthenticator
> 
>             at java.lang.ClassLoader.defineClass1(Native Method)
> 
>             at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> 
>             at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
> ssLoader.java:1812)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
> .java:866)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> .java:1319)
> 
>             at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
> .java:1198)
> 
>             at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> 
>             at java.lang.Class.forName0(Native Method)
> 
>             at java.lang.Class.forName(Class.java:164)
> 
>             at
> org.apache.roller.presentation.servlets.CommentAuthenticatorServlet.init
> (CommentAuthenticatorServlet.java:81)
> 
>             at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
> a:1105)
> 
>             at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:7
> 57)
> 
>             at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:130)
> 
>             at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:178)
> 
>             at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :126)
> 
>             at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :105)
> 
>             at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:107)
> 
>             at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
> 48)
> 
>             at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
> 9)
> 
>             at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
> essConnection(Http11BaseProtocol.java:664)
> 
>             at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
> .java:527)
> 
>             at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
> erWorkerThread.java:80)
> 
>             at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:684)
> 
>             at java.lang.Thread.run(Thread.java:595)
> 
>  
> 
>  
> 
> Guy Katz
> NetXplorer Server Team Leader
> Allot Communications * a mind for networks(tm)
> Tel:  972 9 7619288
> Fax: 972 9 7443626
> gkatz@allot.com
> www.allot.com <http://www.allot.com/> 
> 
>  
> 
>  
> 
> 

Mime
View raw message