You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Shenghao Fang (JIRA)" <ji...@apache.org> on 2010/12/22 09:20:01 UTC

[jira] Created: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
-------------------------------------------------------------------------------------------------------

                 Key: GERONIMO-5741
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: connector
    Affects Versions: 3.0-M1
         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
            Reporter: Shenghao Fang
            Assignee: Shenghao Fang


When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.

The details and call stack are as follows:

java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
	...


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

Posted by "Shenghao Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shenghao Fang closed GERONIMO-5741.
-----------------------------------


> java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5741
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 3.0-M1
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
>            Reporter: Shenghao Fang
>            Assignee: Shenghao Fang
>             Fix For: 3.0
>
>         Attachments: GERONIMO-5741.patch
>
>
> When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.
> The details and call stack are as follows:
> java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
> 	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
> 	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
> 	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
> 	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
> 	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
> 	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
> 	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
> 	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
> 	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

Posted by "Ivan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan resolved GERONIMO-5741.
----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

Commit changes to trunk at revision: 1053001.
Thanks, Shenhao Fang !

> java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5741
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 3.0-M1
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
>            Reporter: Shenghao Fang
>            Assignee: Shenghao Fang
>             Fix For: 3.0
>
>         Attachments: GERONIMO-5741.patch
>
>
> When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.
> The details and call stack are as follows:
> java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
> 	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
> 	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
> 	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
> 	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
> 	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
> 	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
> 	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
> 	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
> 	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

Posted by "Shenghao Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shenghao Fang updated GERONIMO-5741:
------------------------------------

    Attachment: GERONIMO-5741.patch

Add a method to GenericConnectionManagerGBean to return 'managedConnectionFactoryWrapper' which implements JCAManagedConnectionFactory:
{code:title=GenericConnectionManagerGBean.java|borderStyle=solid}
//
    public JCAManagedConnectionFactory getJCAManagedConnectionFactory() {
        return managedConnectionFactoryWrapper;
    }
{code}

Modify the method getManagedConnectionFactoryInstance() in JCAConnectionFactoryImpl to call getJCAManagedConnectionFactory(), and the mothed getManagedConnectionFactory() is also modified accordingly:
{code:title=JCAConnectionFactoryImpl.java|borderStyle=solid}
//
    public String getManagedConnectionFactory() {
        return getManagedConnectionFactoryInstance().getObjectName();
    }

    @Override
    public JCAManagedConnectionFactory getManagedConnectionFactoryInstance() {
        return connectionManager.getJCAManagedConnectionFactory();
    }
{code}

> java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5741
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 3.0-M1
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
>            Reporter: Shenghao Fang
>            Assignee: Shenghao Fang
>         Attachments: GERONIMO-5741.patch
>
>
> When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.
> The details and call stack are as follows:
> java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
> 	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
> 	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
> 	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
> 	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
> 	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
> 	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
> 	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
> 	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
> 	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

Posted by "Shenghao Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974112#action_12974112 ] 

Shenghao Fang commented on GERONIMO-5741:
-----------------------------------------

Initial Analysis:

Code segments of org.apache.geronimo.connector.wrapper.outbound.JCAConnectionFactoryImpl

46    private final GenericConnectionManagerGBean connectionManager;
...
62    @Override
63    public JCAManagedConnectionFactory getManagedConnectionFactoryInstance() {
64        return ((JCAManagedConnectionFactory)connectionManager.getManagedConnectionFactory());
65    }

At line 64, the type of connectionManager is GenericConnectionManagerGBean, and GenericConnectionManagerGBean is inherited from AbstractConnectionManager.
So the actual called method is AbstractConnectionManger.getManagedConnectionFactory().

Code segments of org.apache.geronimo.connector.outbound.AbstractConnectionManager

61    public ManagedConnectionFactory getManagedConnectionFactory() {
62        return managedConnectionFactory;
63    }

AbstractConnectionManger.getManagedConnectionFactory() returns an instance of type ManagedConnectionFactory which does not implement the Interface JCAManagedConnectionFactory.


> java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5741
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 3.0-M1
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
>            Reporter: Shenghao Fang
>            Assignee: Shenghao Fang
>
> When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.
> The details and call stack are as follows:
> java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
> 	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
> 	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
> 	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
> 	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
> 	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
> 	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
> 	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
> 	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
> 	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (GERONIMO-5741) java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64

Posted by "Shenghao Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974112#action_12974112 ] 

Shenghao Fang edited comment on GERONIMO-5741 at 12/22/10 3:47 AM:
-------------------------------------------------------------------

Initial Analysis:

Code segments of org.apache.geronimo.connector.wrapper.outbound.JCAConnectionFactoryImpl

{code:title=JCAConnectionFactoryImpl.java|borderStyle=solid}
46    private final GenericConnectionManagerGBean connectionManager;
...
62    @Override
63    public JCAManagedConnectionFactory getManagedConnectionFactoryInstance() {
64        return ((JCAManagedConnectionFactory)connectionManager.getManagedConnectionFactory());
65    }
{code}

At line 64, the type of connectionManager is GenericConnectionManagerGBean, and GenericConnectionManagerGBean is inherited from AbstractConnectionManager. So the actual called method is AbstractConnectionManger.getManagedConnectionFactory().

Code segments of org.apache.geronimo.connector.outbound.AbstractConnectionManager

{code:title=AbstractConnectionManager.java|borderStyle=solid}
61    public ManagedConnectionFactory getManagedConnectionFactory() {
62        return managedConnectionFactory;
63    }
{code}

AbstractConnectionManger.getManagedConnectionFactory() returns an instance of type ManagedConnectionFactory which does not implement the Interface JCAManagedConnectionFactory.


      was (Author: michael_fang):
    Initial Analysis:

Code segments of org.apache.geronimo.connector.wrapper.outbound.JCAConnectionFactoryImpl

46    private final GenericConnectionManagerGBean connectionManager;
...
62    @Override
63    public JCAManagedConnectionFactory getManagedConnectionFactoryInstance() {
64        return ((JCAManagedConnectionFactory)connectionManager.getManagedConnectionFactory());
65    }

At line 64, the type of connectionManager is GenericConnectionManagerGBean, and GenericConnectionManagerGBean is inherited from AbstractConnectionManager.
So the actual called method is AbstractConnectionManger.getManagedConnectionFactory().

Code segments of org.apache.geronimo.connector.outbound.AbstractConnectionManager

61    public ManagedConnectionFactory getManagedConnectionFactory() {
62        return managedConnectionFactory;
63    }

AbstractConnectionManger.getManagedConnectionFactory() returns an instance of type ManagedConnectionFactory which does not implement the Interface JCAManagedConnectionFactory.

  
> java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5741
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5741
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: connector
>    Affects Versions: 3.0-M1
>         Environment: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
>            Reporter: Shenghao Fang
>            Assignee: Shenghao Fang
>
> When trying to fix the JIRA [GERONIMO-5597|https://issues.apache.org/jira/browse/GERONIMO-5597], I got an error of java.lang.ClassCastException at JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64.
> The details and call stack are as follows:
> java.lang.ClassCastException: org.apache.activemq.ra.ActiveMQManagedConnectionFactory cannot be cast to org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory at
> 	JCAConnectionFactoryImpl.getManagedConnectionFactoryInstance() line: 64	
> 	JCAResourceImpl.getOutboundFactories(String[]) line: 89	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String[]) line: 146	
> 	KernelManagementHelper.getOutboundRAModules(J2EEServer, String) line: 132	
> 	PortletManager.getOutboundRAModules(PortletRequest, String) line: 168	
> 	DatabasePoolPortlet.populatePoolList(PortletRequest) line: 774	
> 	DatabasePoolPortlet.renderList(RenderRequest, RenderResponse) line: 769	
> 	DatabasePoolPortlet.doView(RenderRequest, RenderResponse) line: 724	
> 	DatabasePoolPortlet(GenericPortlet).doDispatch(RenderRequest, RenderResponse) line: 348	
> 	DatabasePoolPortlet(GenericPortlet).render(RenderRequest, RenderResponse) line: 253	
> 	DatabasePoolPortlet(BasePortlet).render(RenderRequest, RenderResponse) line: 153	
> 	...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.