users@glassfish.java.net

Re: Websphere 5.x to Glassfish App Conversion

From: <glassfish_at_javadesktop.org>
Date: Wed, 12 Nov 2008 11:17:19 PST

And just to be absolutely positive, the error occurred where I think it did, I added a few more debug statements, so the code looks like this:<BR><BR>[code]
protected CWMManager getCWMManagerBean()
   throws Exception
  {
    CWMManager bean = null;

    try
    {
            System.out.println(getHandlerName()+".getCWMManagerBean() for "+m_EJBName+" - bean is null, trying NO-ARG Creation here");
            // bean = (CWMManager) getBean(CWMManagerHome.class);
            InitialContext ic = new InitialContext();
            bean = (CWMManager) ic.lookup(m_EJBName);
            System.out.println(getHandlerName()+".getCWMManagerBean() for "+m_EJBName+" - bean is CREATED!!!");
    }
    catch(Exception e)
    {
      System.out.println(getHandlerName()+".getCWMManagerBean() for "+m_EJBName+" - bean creation FAILED here");
      bean = null;
      closeJNDIContext();
      throw e;
    }
    System.out.println(getHandlerName()+".getCWMManagerBean() for "+m_EJBName+" - returning bean");
    return bean;
  }
[/code]<BR><BR> and the resulting [b]LOG OUTPUT[/b]<BR><BR>[code]
[#|2008-11-12T13:11:42.950-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.save() - attempts to create CWMManagerBean object|#]

[#|2008-11-12T13:11:42.950-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.getCWMManagerBean() for ejb/CWMManager - bean is null, trying NO-ARG Creation here|#]

[#|2008-11-12T13:11:42.966-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.getCWMManagerBean() for ejb/CWMManager - bean creation FAILED here|#]

[#|2008-11-12T13:11:42.966-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.save() - Elapsed time = 00:00:00.016 - Exception: java.lang.ClassCastException: CWM.CWMManager.ejb._CWMManagerHome_DynamicStub|#]

[#|2008-11-12T13:11:42.966-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
java.lang.ClassCastException: CWM.CWMManager.ejb._CWMManagerHome_DynamicStub
        at CWM.CWMManagerBeanHandler.getCWMManagerBean(CWMManagerBeanHandler.java:238)
        at CWM.CWMManagerBeanHandler.save(CWMManagerBeanHandler.java:203)
        at utils.servlet.BaseServlet.updateMonitorData(BaseServlet.java:1082)
        at utils.servlet.BaseServlet.decrRequest(BaseServlet.java:1159)
        at US.IL.state.revenue.utils.servlet.BaseServlet.doPost(BaseServlet.java:475)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[/code]<BR><BR>

Any ideas?
[Message sent by forum member 'loungelizard' (loungelizard)]

http://forums.java.net/jive/thread.jspa?messageID=316378