Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with Custom User Registry Implementation - Please help!

4 views
Skip to first unread message

danl...@excite.com

unread,
Nov 5, 2006, 4:36:27 AM11/5/06
to
Hello all,

I try to implement custom user registry using Rational Application Developer V6 with integrated Websphere Application Server V6.0 test environment runing on Windows 2003.

I follow detail instruction shown in section 2.4.3 DB2 Custom User Registry Sample of Websphere Application Server V6 Security Handbook on website
http://www.redbooks.ibm.com/redbooks/SG246316/wwhelp/wwhimpl/js/html/wwhelp.htm

I place the implementation class: CustomUserRegistry in the %WAS_HOME%\lib\ext directory where %WAS_HOME% is C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6

Problem looks like at the runtime, the server can't find the sas.jar and wssec.jar in C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\lib directory.

On the Global Security page, I click on the "Enable Global Security" check box and get the following error message on the screen:

Messages
Authentication failed for user: com.ibm.ws.console.security.ConnectToRuntimeException: null nested exception is com.ibm.websphere.security.CustomRegistryException: com/ibm/websphere/security/UserRegistry. Try again.

And in the SystemOut.log file:

[11/5/06 3:42:34:656 EST] 0000002d UserRegistryI E SECJ0330E: The registry implementation file edu.auth.CustomUserRegistry cannot be loaded because of the following exception java.lang.NoClassDefFoundError: com/ibm/websphere/security/UserRegistry
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java:474)
at java.net.URLClassLoader.access$500(URLClassLoader.java(Inlined Compiled Code))
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code))
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.ibm.ws.security.registry.UserRegistryImpl.initialize(UserRegistryImpl.java:173)
at com.ibm.ws.security.core.SecurityAdmin.getRegistry(SecurityAdmin.java:1241)
at com.ibm.ws.security.core.SecurityAdmin.getRealm(SecurityAdmin.java:536)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java(Compiled Code))
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java(Compiled Code))
at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Inlined Compiled Code))
at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java(Inlined Compiled Code))
at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java(Compiled Code))
at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java(Compiled Code))
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java(Compiled Code))
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java(Compiled Code))
at com.ibm.ws.console.security.ConnectToRuntime.getRealm(ConnectToRuntime.java:247)
at com.ibm.ws.console.security.SecurityValidation.getCustomRealm(SecurityValidation.java:822)
at com.ibm.ws.console.security.SecurityValidation.validate(SecurityValidation.java:239)
at com.ibm.ws.console.security.SecurityDetailAction.execute(SecurityDetailAction.java:192)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:275)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

[11/5/06 3:42:34:656 EST] 0000002d SecurityAdmin E SECJ0074E: Error creation user registry. The exception is <malformed parameter>
[11/5/06 3:42:34:656 EST] 0000002d ConnectToRunt E SECG0006E: An exception occurred in ConnectToRuntime when retrieving the realm. The exception is <malformed parameter>.
[11/5/06 3:42:34:672 EST] 0000002d SecurityValid E SECG0021E: An exception occurred while validating security configuration values: com.ibm.ws.console.security.ConnectToRuntimeException: null nested exception is com.ibm.websphere.security.CustomRegistryException: com/ibm/websphere/security/UserRegistry
at com.ibm.ws.console.security.ConnectToRuntime.getRealm(ConnectToRuntime.java:253)
at com.ibm.ws.console.security.SecurityValidation.getCustomRealm(SecurityValidation.java:822)
at com.ibm.ws.console.security.SecurityValidation.validate(SecurityValidation.java:239)
at com.ibm.ws.console.security.SecurityDetailAction.execute(SecurityDetailAction.java:192)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:275)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
.

And here is the server's environment variables:

Here is the server's current environment:

************ Start Display Current Environment ************
WebSphere Platform 6.0 [BASE 6.0.0.0 o0444.14] running with process name eiaNode01Cell\eiaNode01\server1 and process id 668
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.2 IBM Windows 32 build cn142sr1w-20041028 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6
user.install.root = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default
Java Home = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre
ws.ext.dirs = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/java/lib;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default/classes;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/classes;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/installedChannels;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/ext;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/web/help;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default/properties;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/properties;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/bootstrap.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/j2ee.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/lmproxy.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/urlprotocols.jar;D:\WSWork\SecImpl\FormAuthExampleWeb\WebContent\WEB-INF\classes;D:\WSWork\SecImpl\FormAuthExampleEJB\ejbModule
Java Library path = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\bin;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin;C:\Program Files\IBM\Rational\SDP\6.0\eclipse\jre\bin;d:\oracle\product\10.1.0\Db_1\bin;d:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;d:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;D:\PROGRA~1\IBM\SQLLIB\BIN;D:\PROGRA~1\IBM\SQLLIB\FUNCTION;D:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL
************* End Display Current Environment *************


So, I thought the server was unable to find the two security jar files:
sas.jar & wssec.jar. I then tried to include these two jar files on the server classpath and get the following error message:

The registry implementation file edu.auth.CustomUserRegistry is not a instance of the supported user registries: UserRegistry.

Your help is much appreciated.

Thank you.

Dan.


edp

unread,
Jan 3, 2007, 11:55:34 PM1/3/07
to
that error message doesn't make sense if edu.auth.CustomUserRegistry implements com.ibm.websphere.security.UserRegistry. have you tried using the file user registry example? that was very easy to setup and that's how i got my custom registry to work.

Paul Ilechko

unread,
Oct 22, 2007, 12:43:06 PM10/22/07
to
seba...@globalcode.com.br wrote:
> Excuse the english, I'm not native.
>
> Hey man, I'm getting the same trouble.
>
> Where did you put you UserRegistry class implementation? I put in a jar under <WAS_HOME>/java/jre/lib/ext and is not working.
>
> The LoginModule that I put in the same jar works, but the UserRegistry not.
>

No, it should be in <WAS_HOME>/lib/ext. You're putting in the JDK's
extension library, not in WAS's.

seba...@globalcode.com.br

unread,
Oct 22, 2007, 12:17:42 PM10/22/07
to
Excuse the english, I'm not native.

Hey man, I'm getting the same trouble.

Where did you put you UserRegistry class implementation? I put in a jar under <WAS_HOME>/java/jre/lib/ext and is not working.

The LoginModule that I put in the same jar works, but the UserRegistry not.

[]'s

seba...@globalcode.com.br

unread,
Oct 22, 2007, 12:19:58 PM10/22/07
to
One more question.

The file wssec.jar exists ? where ?

I searched for wssec.jar in windows <WAS_HOME> recursively and found nothing.

[]'s

seba...@globalcode.com.br

unread,
Oct 22, 2007, 4:56:48 PM10/22/07
to
Thanks Paul,

It's working now!

seba...@globalcode.com.br

unread,
Oct 22, 2007, 5:20:51 PM10/22/07
to
Paul,

Can u please take a look at this thread above, maybe you can help me:

http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=266&thread=179912&cat=9

[]'s

0 new messages