1 Reply Latest reply on Feb 28, 2005 4:14 PM by jmckee

    JBoss Portlet throws ServletException

    jmckee

      I'm having a problem deploying a Portlet on JBoss Portal (2.0 alpha). I was attempting to create a hello world portlet as a starting point. It deplys fine but throws the following exception when I call it. Can anyone give me a few hints as to what is likely to cause this exception. I've attached the relevant section of the log.


      2005-02-26 13:51:15,602 DEBUG [org.jboss.portal.server.impl.invocation.InvocationImpl] Found page page.default.hello
      2005-02-26 13:51:15,612 DEBUG [net.sf.hibernate.impl.SessionFactoryObjectFactory] JNDI lookup: portal/SessionFactory
      2005-02-26 13:51:15,612 DEBUG [net.sf.hibernate.impl.SessionFactoryObjectFactory] lookup: uid=40288082024eed3501024eed3b860000
      2005-02-26 13:51:15,612 DEBUG [net.sf.hibernate.impl.SessionImpl] opened session
      2005-02-26 13:51:15,612 DEBUG [org.jboss.hibernate.session.TransactionSynch] Preparing synch [name=java:portal/SessionFactory, session=net.sf.hibernate.impl.SessionImpl@8c1852]
      2005-02-26 13:51:15,612 INFO [STDOUT] javax.servlet.ServletException: no main
      2005-02-26 13:51:15,612 INFO [STDOUT] at org.jboss.portal.core.servlet.CoreServlet.render(CoreServlet.java:300)
      2005-02-26 13:51:15,612 INFO [STDOUT] at org.jboss.portal.server.servlet.AbstractMainServlet.invoke(AbstractMainServlet.java:61)
      2005-02-26 13:51:15,612 INFO [STDOUT] at org.jboss.portal.core.servlet.CoreServlet.process(CoreServlet.java:201)
      2005-02-26 13:51:15,612 INFO [STDOUT] at org.jboss.portal.core.servlet.CoreServlet.invoke(CoreServlet.java:101)
      2005-02-26 13:51:15,612 INFO [STDOUT] at org.jboss.portal.server.servlet.AbstractMainServlet.doGet(AbstractMainServlet.java:53)
      20


      Thanks,
      Jonny

        • 1. Re: JBoss Portlet throws ServletException
          jmckee

          Managed to fix this myself and thought I'd post in case, like myself, any of the nukes community are experimenting with JBP.

          I had configured the root context incorrectly. In *-pages.xml the the /portal-hello part of the instance-ref (shown below) has to match the context configured in your .war file.

          <instance-ref>/portal-hello.HelloWorldPortlet.HelloWorldPortletInstance</instance-ref>

          Hope this helps someone
          Jonny