Hello,
Any help or suggestion is greatly appreciated.
I have a Servlet that deployed in a standalone Tomcat version 4.1.30.
The Tomcat is running in the same server as Jboss 3.2.1. The servlet
accesses a method of a remote session bean that is deployed in Jboss.
This method returns a java object that implements java.io.Serializable.
The servlet accesses the remote session bean with the following code:
| UserControllerRemoteHome homeObject;
| String remoteJndiName = "UserControllerBeanJNDI";
| homeObject = (UserControllerRemoteHome)
| homesFactory.lookUpHome(remoteJndiName,
UserControllerRemoteHome.class);
| // get the EJBObject, UserControllerRemote
| UserControllerRemote ejbObject = homeObject.create();
|
| // Now problem so far up to this point, but an Exception occurred when
| // the validateUserPassword method returned a java serializable object
| // BasicUserInformationDO, however; when the validateUserPassword returned
| // null then no exception occurred.
| // The log file producted by jboss server.log does not show any exception at all
| BasicUserInformationDO basicUserInfoDO = null;
| try {
| basicUserInfoDO = (BasicUserInformationDO)
| ejbObject.validateUserPassword(
Integer.parseInt(userID),
|
Short.parseShort(subID),
| password,
sessionID);
| } catch (IOException ioEx) {
| request.getSession().getServletContext().log("IOException",
| new Throwable(ioEx.toString()));
| } catch (ServletException servletEx) {
| request.getSession().getServletContext().log("Servlet Exception",
| new Throwable(servletEx.toString()));
| }
| } catch (RemoteException remoteEx) {
| request.getSession().getServletContext().log("Remote Exception",
| new Throwable(remoteEx.toString()));
| } catch (CreateException createEx) {
| request.getSession().getServletContext().log("create Exception",
| new Throwable(createEx.toString()));
| } catch (IOException ioEx) {
| request.getSession().getServletContext().log("IOException",
| new Throwable(ioEx.toString()));
| } catch (Exception Ex) {
| request.getSession().getServletContext().log("Exception",
| new Throwable(Ex.toString()));
| }
****** Here is the method that returns the serializable object ********
| public BasicUserInformationDO validateUserPassword(int userID, short subID,
| String password, String sessioID)
| {
|
| BasicUserInformationDO basicUserInfoDO = null;
| // To valid the password we need to access the UserBean (ejb-name). However,
we also
| // to return the BasicUserInformationDO object, thus we need to access the
| // UserAccountBean (ejb-name). So we need toltal of two references to fulfill
this
| // mission.
| // Get a UserBean's home object from the EJBLocalHomeFactory
| try {
| // get an instance of the UserEjbUtil
| UserEjbUtil userBeanUtil = UserEjbUtil.getInstance();
|
| // get the EJBObject, UserLocal
| UserLocal userObject =
userBeanUtil.getUser(StringUtilities.getPrimaryKey(userID, subID));
|
| if (userObject != null) {
| // Now we check the password from the user input against the password from
the database
|
| // get the EJBObject, UserAccountLocal
| UserAccountEjbUtil userAccountBeanUtil =
UserAccountEjbUtil.getInstance();
|
| UserAccountLocal userAccountObject = userAccountBeanUtil.getUserAccount(
|
StringUtilities.getPrimaryKey(userID, subID));
|
| if (userAccountObject != null) {
| // Now get the serviceTypesSubscribed and numberOfServicesSubscribed
from the UserAccountBean
| basicUserInfoDO = new
BasicUserInformationDO(userObject.getFirstName(), userObject.getLastName(),
|
| userObject.getMiddleName(), userID,
subID,
|
userAccountObject.getNumberOfServicesSubscribed(),
|
userAccountObject.getServiceTypesSubscribed());
| if (log.isDebugEnabled()) {
| log.debug(basicUserInfoDO.toString());
| }
| }//End if userAccountObject
| }//End if
| }//End if userObject
| } catch (IOException ioEx) {
| log.debug("IOException" +
ExPrintingUtilities.PrintStackTraceElements(ioEx.getStackTrace()));
| } catch (Exception Ex) {
| log.debug("Exception" +
ExPrintingUtilities.PrintStackTraceElements(Ex.getStackTrace()));
| } catch (Throwable throwableEx) {
| log.debug("Throwable" +
ExPrintingUtilities.PrintStackTraceElements(throwableEx.getStackTrace()));
| }
|
| if (log.isDebugEnabled()) {
| log.debug("End validateUserPassword");
| }
| return basicUserInfoDO;
| } /* End validateUserPassword method */
*********** Here is the debug information in the log file ************************
FATAL [http8091-Processor7] (AccessController.java:180) -
$Proxy1.validateUserPassword(Unknown Source)
com.wlwa.Alert.VoiceComponentTier.Dispatcher.AccessController.doPost(AccessController.java:141)
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)
INFO [http8091-Processor7] (AccessController.java:200) - End doPost
Thank you in advance for your help.
Kam
Kam Lung Leung
Vice President of Engineering
Wireless Web Access Inc.
(303) 627-9684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]