users@glassfish.java.net

Re: Websphere 5.x to Glassfish App Conversion

From: <glassfish_at_javadesktop.org>
Date: Wed, 12 Nov 2008 11:06:26 PST

Even if I change the bothersome code to this:<BR><BR>[code]
            System.out.println(getHandlerName()+".getBean() 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);
[/code]<BR><BR>
[B]I STILL GET[/B]<BR><BR>[code]
[#|2008-11-12T12:59:22.357-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-12T12:59:22.357-0600|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=16;_ThreadName=httpSSLWorkerThread-8081-0;|
CWMManagerBeanHandler.getBean() for ejb/CWMManager - bean is null, trying NO-ARG Creation here|#]

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

[#|2008-11-12T12:59:22.388-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.incrRequest(BaseServlet.java:1139)
        at utils.servlet.BaseServlet.doPost(BaseServlet.java:433)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)[/code]<BR><BR>

So... *sigh* what's the solution? -- Da Lizard
[Message sent by forum member 'loungelizard' (loungelizard)]

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