I am trying to retrieve a context for the portalobjectcontainer 

public class PortalService {
  |     
  |     private PortalObject po;
  |     private org.jboss.portal.core.model.portal.Context ctx;
  |     private org.jboss.portal.core.model.portal.PortalObjectContainer 
container;
  |     public PortalService(){
  |             try{
  |                     MBeanServer mbeanServer = 
MBeanServerLocator.locateJBoss();
  |                     container = 
(PortalObjectContainer)MBeanProxy.get(PortalObjectContainer.class, new 
ObjectName("portal:container=PortalObject"), mbeanServer);
  |                     System.out.println("container=" + container);
  |                     ctx = container.getContext();
  |             }catch ( Exception ex ) {
  |                     ex.printStackTrace();
  |             }
  |     }
  | }

but the line

ctx = container.getContext();

gives me an

java.lang.ClassCastException: 
org.jboss.portal.core.impl.model.portal.ContextImpl

I got this code from a post in this forum some time ago and have made it work 
but when I tried it again in new class this happens.

thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033157#4033157

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033157
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to