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

Tomcat 5.5 -> Websphere 7 Application conversion (Login settings)

45 views
Skip to first unread message

Akusu

unread,
Oct 22, 2009, 11:17:04 AM10/22/09
to
I am currently trying to convert our Tomcat Apps to be used in Websphere Application Server 7, and they will not challenge the user for authentication. I believe that it doesn't know where to look for authentication and so doesn't attempt to authenticate.

In tomcat we have the context.xml (names have been removed for security):




Which declares the database, the tables and the rows needed for authentication.

I need something similar to embed in the webapp, preferably with minimal or no configuration on the websphere side that pulls its authentication from the database in the same fashion as it currently works. The goal is to make it deployable on both server types.

The webapps in question are Struts 1 or 2, and have sitemesh running (which is also causing seperate problems...). All were originally configured for Tomcat.

Before receiving this assignment I had no previous knowledge of Websphere, so anything you could tell me or show me about how to get this going would be appreciated.

I've attempted to create a standalone custom registry, by implementing the interface they've suggested (com.ibm.websphere.security.UserRegistry). I've put it in my install_root/lib/ext folder as suggested but it comes up with a ClassNotFoundException when I try to apply the new settings. It says to put the class name on the class path but I have no idea if that's what I did when I put the jar in the ext folder or if there's something else I should do.

Even so, the help file language isn't clear on if it's customizing the authentication used by the server, or the applications on the server (which is what I want).

Akusu

unread,
Oct 22, 2009, 11:35:14 AM10/22/09
to
No, the confusion comes in step 5 where it says to put it on the class path which is meaningless garble to me at this point since I don't see that option anywhere in the console.

What am I configuring? The login to the console or the applications on the server?

dims

unread,
Oct 22, 2009, 11:24:53 AM10/22/09
to

dims

unread,
Oct 22, 2009, 11:55:18 AM10/22/09
to
Akusu,

Can you please create a directory called "classes" in the websphere main directory? and drop your jar that contains your custom registry classes in that directory? (and then try restarting the server)

I believe the registry is applicable to everything (console and applications on the server)

thanks,
dims

Akusu

unread,
Oct 22, 2009, 2:27:51 PM10/22/09
to
Still no difference, i still get the following when I try to apply my class as the custom registry class:

{code}
[10/22/09 14:20:11:068 EDT] 00000017 UserRegistryI E SECJ0330E: The registry implementation file com.avbasesystems.security.websphere.WinairUserRegistry cannot be loaded because of the following exception java.lang.ClassNotFoundException: com.test.security.websphere.WinairUserRegistry
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.ibm.ws.security.registry.UserRegistryImpl.initialize(UserRegistryImpl.java:223)
at com.ibm.ws.security.core.SecurityAdmin.getRegistry(SecurityAdmin.java:1811)
at com.ibm.ws.security.core.SecurityAdmin.getUsers(SecurityAdmin.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1313)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1206)
at com.ibm.ws.security.admintask.ApplyWizardSettings.afterStepsExecuted(ApplyWizardSettings.java:814)
at com.ibm.websphere.management.cmdframework.provider.AbstractTaskCommand.executeReal(AbstractTaskCommand.java:850)
at com.ibm.websphere.management.cmdframework.provider.AbstractTaskCommand.execute(AbstractTaskCommand.java:802)
at com.ibm.ws.console.security.AdminSecurity.SelectRegistryTaskStep2Action.doNextAction(SelectRegistryTaskStep2Action.java:132)
at com.ibm.ws.console.core.abstracted.AbstractTaskAction.execute(AbstractTaskAction.java:181)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
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:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistence(WSCUrlFilter.java:927)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:494)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:315)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
{code}

Akusu

unread,
Oct 26, 2009, 11:10:31 AM10/26/09
to
I'd appreciate help with this as this nightmare has been ongoing and it will be impossible to support for our customers if we can't figure this out.

dims

unread,
Oct 26, 2009, 11:50:16 AM10/26/09
to
Hi,

You may want to try the class loader mustgather and look at the logs to see if you can spot anything wrong when your classes are being loaded

http://www-01.ibm.com/support/docview.wss?uid=swg21196187

If this is business-critical, please consider opening a PMR with IBM support.

thanks,
dims

HenkW

unread,
Oct 26, 2009, 1:56:16 PM10/26/09
to
if you're an ISV I suggest to contact an IBM Innovation Centre to
collaborate with and work towards a solution.
http://www-304.ibm.com/jct01005c/isv/iic

Henk


Akusu

unread,
Oct 26, 2009, 2:25:11 PM10/26/09
to
What's a PMR?

I've run the ISA on the security configuration which is what I'm interested in (Why is Websphere not challenging users for credentials?)

It gathered information... which is not immediately helpful to me.

I frankly don't understand why this should be such a big deal to transfer from Tomcat to Websphere.

dims

unread,
Oct 26, 2009, 2:42:43 PM10/26/09
to
Please see url below on how to get official support for websphere (especially step #6):

http://www.ibm.com/developerworks/websphere/support/appserver_support.html

thanks,
dims

dims

unread,
Oct 29, 2009, 10:27:26 AM10/29/09
to
FWIW, i followed instructions in the redbook Section 2.3.2 with the "File-based user registry sample" and it works like a charm. Tried with 7.0.0.5

http://www.redbooks.ibm.com/redbooks/SG246316/wwhelp/wwhimpl/js/html/wwhelp.htm

thanks,
dims

0 new messages