7 Replies Latest reply: Jan 13, 2012 9:26 AM by Ken Finnigan RSS

lifecycle: portalphase-listener execution: nullpointer

Jonas Kreuz Newbie

Hi

 

Well, it's me again.

 

The server starts without problems, i try to go to the gatein-portal site, that includes a portlet, that shows my web seam project inside, and become this error, don't know why or how to solve:

-----

13:37:38,795 WARNING [lifecycle]  JSF1053: (Listener: org.jboss.portletbridge.lifecycle.PortalPhaseListener.afterPhase(), Phase ID: RESTORE_VIEW 1,  View ID: /home.xhtml) Exception thrown during phase-listener execution: java.lang.NullPointerException

13:37:38,796 WARNING [lifecycle]  org.jboss.portletbridge.lifecycle.PortalPhaseListener.afterPhase(PortalPhaseListener.java:59)

......

13:37:38,814 ERROR [SeamPhaseListener]  swallowing exception

java.lang.IllegalStateException: No active conversation context

......

13:37:46,234 SEVERE [viewhandler]  Error Rendering View[/home.xhtml]

java.lang.IllegalStateException: No active conversation context

......

13:37:46,533 WARN  [SeamPhaseListener]  uncaught exception, passing to exception handler

java.lang.IllegalStateException: No active conversation context

......

13:37:46,534 ERROR [SeamPhaseListener]  swallowing exception

java.lang.IllegalStateException: No active conversation context

-----

 

Becoming this message in my browser: http://www.chrishajer.com/bike/XLF/redirect.png

 

i am using Jboss AS 5.1, GateIn 3.1.0, Seam 2.2.2 and Portletbridge 2.2.0.

  • 1. Re: lifecycle: portalphase-listener execution: nullpointer
    Ken Finnigan Master

    Could you provide the web.xml and portlet.xml for your Seam application?

  • 2. Re: lifecycle: portalphase-listener execution: nullpointer
    Jonas Kreuz Newbie

    Hi. Sorry for my late answer:

     

    portlet.xml:

    -----

    <?xml version="1.0" encoding="UTF-8"?>

    <portlet-app

        xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"

        version="2.0">

     

        <portlet>

            <portlet-name>MyPortlet</portlet-name>

            <display-name>My Portlet</display-name>

            <portlet-class>

                javax.portlet.faces.GenericFacesPortlet

            </portlet-class>

            <init-param>

                <name>javax.portlet.faces.defaultViewId.view</name>

                <value>/home.xhtml</value>

            </init-param>

            <supports>

                <mime-type>text/html</mime-type>

                <portlet-mode>VIEW</portlet-mode>

            </supports>

            <portlet-info>

                <title>My Portlet</title>

            </portlet-info>

        </portlet>

    </portlet-app>

    -----

     

    can you say me what you exactly want to know from the web.xml. it's very long

    maybe this is enough:

    -----

    <context-param>

        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

        <param-value>org.jboss.portletbridge.application.FaceletPortletViewHandler</param-value>

      </context-param>

      <context-param>

        <param-name>javax.portlet.faces.renderPolicy</param-name>

        <param-value>ALWAYS_DELEGATE</param-value>

      </context-param>

    (some other stuff...)

      <context-param>

        <param-name>org.jboss.portletbridge.ExceptionHandler</param-name>

        <param-value>org.jboss.portletbridge.SeamExceptionHandlerImpl</param-value>

      </context-param>

      <context-param>

        <param-name>org.jboss.portletbridge.WRAP_SCRIPTS</param-name>

        <param-value>true</param-value>

      </context-param>

    -----

     

    thanks and greetings

  • 3. Re: lifecycle: portalphase-listener execution: nullpointer
    Jonas Kreuz Newbie

    i found another very strange error...

    there is my gatein-portal (unmodified download) and my project (called myproject)

     

    gateIn does not know myproject

    localhost:8080/myproject does not work

     

    gateIn: click on "import applications"

    localhost:8080/myproject does not work

     

    gateIn: drag the portlet of myproject on main page -> shows error (portlet only)

    localhost:8080/myproject does work!

     

     

    What the hell is going on here? :O

  • 4. Re: lifecycle: portalphase-listener execution: nullpointer
    Ken Finnigan Master

    Jonas,

     

    Does your faces-config.xml contain the following lines:

     

    <application>

              <view-handler> org.jboss.portletbridge.application.PortletViewHandler </view-handler>

              <state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>

    </application>

     

    Looking at the original error message it looks like JSF is not setup properly.

     

    As for the application only being available once it has been added to a portlet page, not sure what is happening there.

  • 5. Re: lifecycle: portalphase-listener execution: nullpointer
    Jonas Kreuz Newbie

    Hello Ken

     

    my faces-config.xml contains these lines (and of course some other):

    -----

    <application>
    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
    <view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
    <state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
    <locale-config>
    <default-locale>en</default-locale>
    <supported-locale>bg</supported-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
    <supported-locale>fr</supported-locale>
    <supported-locale>tr</supported-locale>
    </locale-config>
    </application>

    -----

     

     

    Because of the application that is not available, i have same new facts.

     

    When i (re)start the server, the application is still not working, but it is still added to a portlet page. After calling my GateIn-Site, and going to localhost:8080/myproject after that, it works. But it still does not work inside the portlet.

     

    Thanks and Greetings

  • 6. Re: lifecycle: portalphase-listener execution: nullpointer
    Jonas Kreuz Newbie

    F... this. RAGEQUIT!

     

    Maybe i keep going this in a few month..

    bye

  • 7. Re: lifecycle: portalphase-listener execution: nullpointer
    Ken Finnigan Master

    I'm sorry for your frustration in trying to get the JBoss PortletBridge to work in a Portal.

     

    Is it possible for you to replicate the error with a small sample portlet that you could attach to this thread that could be used to test with?

     

    Regards

    Ken