This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Websphere V6 - Custom User Registry Implementation problem - Please help!

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

The web project's Java Build Path includes two security jar files: sas.jar and wssec.jar for the CustomUserRegistry implementation.

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 is, 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 select "custom user registry" option for the Active User Registry field 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 by updating the server classpath on the server configuration page (navigate to Server Infrastructure -->Java Process Management -->Process Definition-->Java Virtual Machine). Having done that, again I went back to the Global Security page, I clicked on the "Enable Global Security" check box and selected "custom user registry" option for the Active User Registry field, tried to save it and got the following error message on the screen:

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

At this point, I don't know how do I go about to solve the problem. The java.lang.NoClassDefFoundError: com/ibm/websphere/security/UserRegistry tells me I may have classpath problem but then I
explicitly added the security jar files to the server classpath and got the different error message: CustomUserRegistry is not a instance of the supported user registries: UserRegistry

I'm stuck. Your help is much appreciated.

Thank you.

Dan.
 
Seriously? That's what you're going with? I prefer this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic