5 Replies Latest reply on Aug 21, 2008 8:15 AM by Thomas Heute

    Portal 2.7.0 beta jsr 286 An error occured when an event was

    Luc De pauw Newbie

      Hello,

      I'm currently creating a portlet that uses jsr 286 event publishing.
      I can get the portlet deployed succesfull and visible in portall but when sending the form in the portlet I get a stack trace on the event

      8:53,883 ERROR [CoreEventControllerContext] An error occured when an event was routed
      .lang.NullPointerException
      at org.jboss.portal.core.impl.coordination.CoordinationService.getEventWindowsImpl
      at org.jboss.portal.core.impl.coordination.CoordinationService.getEventWindows(Coo
      at org.jboss.portal.core.controller.portlet.CoreEventControllerContext.eventProduc
      at org.jboss.portal.portlet.controller.EventControllerContextSafeInvoker.eventProd
      at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(Portl
      at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(Portl
      at org.jboss.portal.portlet.controller.RequestHandler.handle(RequestHandler.java:6
      at org.jboss.portal.portlet.controller.PortletController.process(PortletController
      at org.jboss.portal.core.model.portal.command.action.InvokeWindowCommand.execute(I
      at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.j
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invok
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageC
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(Po
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(Port
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInter
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(Na
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.ja
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(
      at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.ja
      at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:279)
      at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
      at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDis
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBind
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTyp
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(Portal
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.jav
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterce
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(Us
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCa
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$co
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
      at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
      at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
      at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionI
      at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterce
      at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130
      at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
      at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
      at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociati
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionV
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11P
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)

      This is the portlet.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">


      <portlet-name>Jsr286EventPublisherPortlet</portlet-name>
      <portlet-class>be.portal.PublisherPortlet</portlet-class>
      <portlet-info>
      Jsr286 Event Publisher Portlet
      <short-title>Jsr286EventPublisherPortlet</short-title>
      </portlet-info>

      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>

      <supported-locale>en</supported-locale>
      <supported-publishing-event>
      <qname xmlns:x="http://portal.be/events">x:contactInfo
      </supported-publishing-event>


      <default-namespace>ns.Jsr286EventPublisherPortlet</default-namespace>
      <event-definition>
      <qname xmlns:x="http://portal.be/events">x:contactInfo
      <value-type>be.portal.ContactInfo</value-type>
      </event-definition>
      </portlet-app>

      This is the code used to send the event:

      // Send the event using the appropriate QName
      response.setEvent(new QName("http://portal.be/events", "contactInfo"), contactInfo);

      The ContactInfo class has been annotated with @XmlRootElement

      Don't see what I'm doing wrong here...

      Thanks

      Luc