How exactly did you write the authentication class? It should not be a plugin (implementing XWikiPlugin), but an authenticator, implementing the XWikiAuthService interface. Juergen Lorenz Simon wrote:
Hi Thomas,
thanks for the reply. I have two plugins in the jarfile in question. I double-checked the problem by setting up on scratch on a new machine. Everything looks fine, one plugin from the same jar file is found and works as it should. The authentication plugin is not found:
- Initializing AuthService... - Failed to initialize AuthService com.kontrast.vodafone.portal.xwiki.PortalAuthenticationPlugin using Reflection, trying default implementations using 'new'. java.lang.ClassNotFoundException: com.kontrast.vodafone.portal.xwiki.PortalAuthenticationPlugin at org .apache .catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1360) at org .apache .catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: 1206) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at com.xpn.xwiki.XWiki.getAuthService(XWiki.java:4630)
I'm a bit confounded now. Any more ideas? Could it be some problem with classpath ordering?
Cheers, J.L.Simon
On 10.12.2008, at 12:38, Thomas Mortagne wrote:
Hi,
All seems ok to me. You don't need more that pointing the right class in xwiki.cfg...
Are you really sure that the jar contains the class and is in the published /lib folder ? I don't see anything else yet.
On Tue, Dec 9, 2008 at 3:36 PM, Juergen Lorenz Simon <[email protected]
wrote: Hi,
i've been writing a custom authentication plugin for xwiki. The implementation was pretty straightforward, however I'm having trouble deploying the plugin. I bundled it with other plugins for the same purpose in a jar file.
The jar file is deployed to my local repository. It's pulled in when I build the xe-debug-web in Eclipse and it's present in the xe-debug-web/WEB-INF/ lib directory of the deployed app (in .metadata/.plugins/ org.eclipse.wst.server.core/ tmp0 ...).
I altered the xwiki.cfg, adding the following line:
xwiki .authentication .authclass =com.kontrast.vodafone.portal.xwiki.PortalAuthenticationPlugin
However, when starting the application, I get the following problem:
-- Sergiu Dumitriu http://purl.org/net/sergiu/