Version 17

    Q: isUserInRole always returns false even though I associated my user with the role I'm checking against

    A: Declare the roles used by your portlet as explained in section PLT.20 of the JSR-168 portlet spec.

    -


    Q: On the first startup I see errors like:

     

    11:48:49,482 ERROR JDBCExceptionReporter Table not found in statement...

     

    what's wrong ?

     

    A: Nothing's wrong, the tabled don't exist in the first startup, an error is thrown but the table is created just after. Those messages will disappear on the next startup.

    -


    Q: I'm using JBoss Portal on JBoss AS 4.2.1.GA, it's spitting out tons of:

     

    11:49:27,464 WARN  LoadContexts fail-safe cleanup (collections)...  org.hibernate.engine.loading.CollectionLoadContext@cd7045<rs=org.hsqldb.jdbc.jdbcResultSet@192e6b6>

     

    What's wrong ?

     

    A: Nothing's wrong, it's a small issue that will be resolved in future versions of Hibernate, since it's indirectly a logging issue, you can hide those messages by adding:

     

       <!-- Hibernate got a bit too verbose in JBoss AS 4.2.1.GA -->     <category name="org.hibernate.engine.loading.LoadContexts">        <priority value="ERROR"/>     </category>

     

    In JBOSS_HOME/server/default/conf/jboss-log4j.xml

    -


    Q: When I first hit some pages using Facelets, I get ERROR messages like

     

    11:54:11,450 ERROR STDERR Sep 27, 2007 11:54:11 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit  INFO: Added Library from: jar:file:/home/theute/Portal/jboss-4.2.1.GA/server/default/./tmp/deploy/tmp50839portal-identity.sar-contents/portal-identity-exp.war/WEB-INF/lib2/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml

     

    What's wrong ?

     

    A: Nothing's wrong, those are actually not ERROR messages, but INFO as mentioned in the same line. It is totally safe to ignore those messages

    -


    Q: I see

     

    11:54:12,715 ERROR MyfacesConfig Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

     

    What's wrong ?

     

    A: It depends, JBoss Portlets core portlets will run jet fine with that error, nothing to worry about. If you are embedding MyFaces libs, make sure to understand the classloading rules.

    -


    Q: I start JBoss using the -b option, and WSRP is now complaining with the following stack trace (extract):

     

    Caused by: org.jboss.portal.portlet.InvokerUnavailableException: Problem getting service description for producer self          at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:157)          at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.getPortlets(FederatedPortletInvokerService.java:90)          at org.jboss.portal.core.management.PortletDiscoveryService.processPortletDiscovery(PortletDiscoveryService.java:89)

     

    What's wrong ?

     

    A: You will need to reconfigure WSRP to listen on the correct interface, see WSRPChangePorts

    -


    Q: I am using JBoss Portal without an internet connection and I see lots of WSRP errors (extract):

     

    21:41:12,963 ERROR [ServiceObjectFactoryJAXRPC] Cannot create service
    org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: Cannot extract schema definition: java.net.UnknownHostException: www.w3.org
      at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
      at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
      at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:115)
      at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:126)

    What's wrong ?

     

    A: This is a known issue with the JBoss WS version that is bundled with JBoss AS 4.2.3.GA. Please upgrade JBoss WS to version 3.0.4.GA or later. See Instructions to use WSRP behind a proxy or offline

    -


    Q: I am using JBoss Portal with Java 6 and I cannot retrieve the service description from my WSRP producers due to setProperty must be overridden by all subclasses of SOAPMessage errors:

    Caused by: org.jboss.portal.portlet.InvokerUnavailableException: Problem getting service description for producer self, please see the logs for more information.
      at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:155)
      at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.getPortlets(FederatedPortletInvokerService.java:89)
      at org.jboss.portal.core.management.PortletDiscoveryService.processPortletDiscovery(PortletDiscoveryService.java:89)
      at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      ... 22 more
    Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
      at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441)
      at org.jboss.ws.core.soap.SOAPMessageImpl.(SOAPMessageImpl.java:67)
      at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:161)
      at org.jboss.ws.core.CommonSOAP11Binding.createMessage(CommonSOAP11Binding.java:59)
      at org.jboss.ws.core.CommonSOAPBinding.bindRequestMessage(CommonSOAPBinding.java:156)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:289)
      at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
      at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
      at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:156)
      at $Proxy306.getServiceDescription(Unknown Source)
      at org.jboss.portal.wsrp.services.ServiceDescriptionServiceWrapper.getServiceDescription(ServiceDescriptionServiceWrapper.java:49)

    What's wrong ?

     

    A: This is due to the fact that you are running a non-Java 6 ready version of JBoss AS on a Java 6 VM. Please use Java 5 or use the appropriate Java 6 ready version for your JBoss AS version.

    -


    Q: I get "java.lang.OutOfMemoryError: PermGenSpace" errors

     

    A: Increase your max perm gen space in run.conf (on Windows, you need to edit run.bat as run.conf is not taken into account on Windows systems) by adding the following option to JAVA_OPTS:

    -XX:MaxPermSize=128m


    Q:  What steps do I need to take to make the portal work with Oracle11g?

     

    A:  Do not use oracle.jdbc.driver.OracleDriver for Driver Class in JBOSS_HOME/server/default/deploy/portal-oracle-ds.xml. Please use oracle.jdbc.OracleDriver instead as clearly documented by Oracle Corporation. And, use org.hibernate.dialect.Oracle10gDialect in Hibernate configuration files (list below) until such time Hibernate has explicit dialect for Oracle11g and JBoss uses that Hibernate version. Please note that Oracle Schema Username and Oracle Schema Password reflect in two places in portal-oracle-ds.xml.  Remember to place ojdbc5.jar if you are using jdk1.5 or ojdbc6.jar if you are using jdk1.6 in JBOSS_HOME/server/default/lib.  You can find ojdbc5.jar and ojdbc6.jar in ORACLE_HOME/jdbc/lib or download it from Oracle Corp website. If you pick it up from ORACLE_HOME/jdbc/lib, then make the jar "+r" (read perm), as it is in "000" mode (no perm at all) for some reason in ORACLE_HOME/jdbc/lib. Sample portal-oracle-ds.xml and list of Hibernate Configuration files below -


    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
        <local-tx-datasource>
            <jndi-name>PortalDS</jndi-name>
            <connection-url>jdbc:oracle:thin:SCHEMA-USERNAME/SCHEMA-PASSWORD@FQDN-OF-HOST:TNS-PORT:SID</connection-url>
            <driver-class>oracle.jdbc.OracleDriver</driver-class>
            <user-name>SCHEMA-USERNAME</user-name>
            <password>SCHEMA-PASSWORD</password>
        </local-tx-datasource>
    </datasources>


    >>> find ~/jboss-portal-2.7.0.GA/server/default/deploy/jboss-portal.sar -name \*.cfg.xml
    ./conf/hibernate/instance/hibernate.cfg.xml
    ./conf/hibernate/portal/hibernate.cfg.xml
    ./conf/hibernate/portlet/hibernate.cfg.xml
    ./conf/hibernate/user/hibernate.cfg.xml
    ./conf/hibernate/workflow/hibernate.cfg.xml
    ./portal-cms.sar/conf/hibernate/cms/hibernate.cfg.xml
    ./portal-wsrp.sar/conf/hibernate/consumer/hibernate.cfg.xml


    Q:  If I am using Oracle as the database, what database objects can I expect to see after JBoss Portal starts up?

     

    A:  Here's the list of Oracle database objects that you can expect to see - snapshot as of Nov 27, 2008 - when using jboss-portal-2.7.0.GA -

     

    $ sqlplus -s jbp/jbp @ jbpobj.sql

     

      1  select   object_type, count(object_type)
      2  from     user_objects
      3* group by object_type

     

    OBJECT_TYPE     COUNT(OBJECT_TYPE)
    -----------------------     -----------------------------------
    SEQUENCE                            7
    LOB                                        5
    TABLE                                  82

    INDEX                                134

     


    Q: I'm seeing errors similar to:

    ERROR [DefaultPageControlPolicy] Rendering portlet window  produced an error
    javax.portlet.PortletException: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/portlet cannot be resolved in either web.xml or the jar files deployed with this application

    when I try to access my portlet's JSP pages. What is going on?

    A: Please see Upgrading JSR-168 Portlets to JSR-286