• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing Beans to Java Middle Tier

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The application I need to deploy on WAS works well on Tomcat but is giving me some trouble in WAS.
To logon, I place the credentials in a Bean and pass it to the java middle tier where I run an authentication routine. The application uses a modified version of the struts logon example.
I believe that problem is that The application is not communicating with the Java (1.4) Middle Tier. Have any of you seen this problem before... if so, how did you solve it.
Thanks a million.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand the issue. How is it communicating to the middle tier? Using what protocol? What type of authentication are you doing? Can you provide more details?
Kyle
 
Tony Mandatori
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The web application is using RMI to communicate to the middle tier.
Ther user name and password is being passed to the middle tier using RMI. THe middle tier runs a function to see if the user name and password combination correspond to the ones stored in a databae accessed by the middle tier.
Thanks
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, By "RMI" do you mean RMI-IIOP? Are there EJB's running on the middle tier or regular RMI objects? If they are EJB's what app server are they running on? How did you do authentication/authorization on the web tier (e.g. did you use J2EE security with WebSphere?)
So I guess my question is -- do you simply want to know if you can use RMI from WebSphere to a non-WebSphere system (yes, BTW) and that security is not really part of the question, or is there something deeper going on here?
Kyle
[ October 30, 2002: Message edited by: Kyle Brown ]
 
Tony Mandatori
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realize that my lack of experience with RMI and J2EE is showing and I thank you for your patience on the issue! Another team wrote the application and I am trying to deploy on WebSphere.
This application does not use J2EE components. It uses regular RMI to communicate between web container and Middle Tier.
I get the following error in one of the logs.
java.rmi.ConnectException: Connection refused to host: 172.17.119.232; nested exception is:
java.net.ConnectException: Connection refused: no further information
java.net.ConnectException: Connection refused: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:329)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:141)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:128)
at java.net.Socket.<init>(Socket.java:285)
at java.net.Socket.<init>(Socket.java:112)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:124)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:512)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:89)
at com.casebank.spotlight.command.LocalCommandServer_Stub.execute(Unknown Source)
at com.casebank.spotlight.command.RMICommandServer.execute(RMICommandServer.java:77)
at com.casebank.spotlight.app.action.AppAction.executeCommand(AppAction.java:196)
at com.casebank.spotlight.app.action.AppAction.doActionCommand(AppAction.java:558)
at com.casebank.spotlight.app.action.AppAction.perform(AppAction.java:128)
at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:125)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're getting a "Connection refused" by the host. This probably means either one of:
(a) There is a firewall between web tier and RMI server
(b) The RMI Server is not started or has stopped.
Do you have an example of a standard Java client that is functioning against this RMI server?
Kyle
 
Tony Mandatori
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kyle,
Web Container and the Middle Tier are installed on the same Windows 2000 machine. The software was architected such that they could be placed on different machines. Hence there is no firewall considerations.
Also, the RMI Registry is runnning.
I found a post on a different Forum indicating that I should update the /etc/hosts file to included the the IP address of the localhost and point it to the localhost machine name.
I did that and then restarted WebSphere. The RMI error is gone, however, I still get an exception. The request is null and the exception that is thrown is null.
I'll take a closer look and let you know. Any ideas?
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic