[jboss-user] [JBoss Portal] - report portlet and ServletContext

yxyang do-not-reply at jboss.com
Sun Sep 3 09:53:37 EDT 2006


Hi 

I am trying to using eclipse BIRT report engine to implement my own ReportPortlet.

In the init() method of the portlet,


  | 	public void init() {
  | 		log.debug("init() is called");
  | 		if (birtEngine == null) {
  | 			EngineConfig config = new EngineConfig();
  | 			log.debug("config="+config);
  | 			IPlatformContext context = new PlatformServletContext(
  | 					new JBossServletContextProvider().getServletContext(this));
  | 			log.debug("context="+context);
  | 			config.setPlatformContext(context);
  | 			try {
  | 				Platform.startup(config);
  | 			} catch (BirtException e) {
  | 				e.printStackTrace();
  | 			}
  | 			IReportEngineFactory factory = (IReportEngineFactory) Platform
  | 					.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
  | 			log.debug("factory="+factory);
  | 			birtEngine = factory.createReportEngine(config);
  | 			log.debug("birtEngine="+birtEngine);
  | 		}
  | 	}
  | 
ServetContext is accessed by using JBossServletContextProvider. 

However, when i deploy the portlet, the following error happen:

anonymous wrote : 
  | Caused by: java.lang.IllegalStateException: No bridge set
  |         at org.jboss.portal.bridge.JBossServletContextProvider.getServletContext(JBossServletContextProvider.java:65)
  |         at com.ternary.wirelessthermometer.portlet.ReportPortlet.init(Unknown Source)
  |         at javax.portlet.GenericPortlet.init(GenericPortlet.java:355)
  |         at org.jboss.portal.portlet.PortletContainer.initPortlet(PortletContainer.java:368)
  |         at org.jboss.portal.portlet.PortletContainer.start(PortletContainer.java:229)
  |         ... 106 more
  | 

I went through the bridge related posts, and cannot find the solution.

(1)Do i need to configure the bridge interceptor myself? Or the default jboss portal 2.2.1 already configures the bridge interceptor for all portlet deployment?

(2)If need myself to configure, how to? Which configure file need to be configured?

Thanks
yang

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969098



More information about the jboss-user mailing list