10 Replies Latest reply on Jun 19, 2007 3:27 AM by habicht

    instances problem

    habicht

      hi

      i'm using the jboss-portal 2.4.1 bundle on java 1.5 and have got a problem with the portlet-instances. although i have created all necessary xml-files according to the 2.4 reference-guide the necessary instances aren't created and i get the "Object not found..."-Exception. below are the used xml-files. i hope you can help me

      regards christof

      portlet.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0">
       <portlet>
       <portlet-name>MyWorldPortlet</portlet-name>
       <portlet-class>org.jboss.portlet.hello.MyPortlet</portlet-class>
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       <portlet-mode>HELP</portlet-mode>
       <portlet-mode>EDIT</portlet-mode>
       </supports>
       <portlet-info>
       <title>Mein Portlet</title>
       </portlet-info>
       </portlet>
      </portlet-app>




      my-object.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <deployments>
       <deployment>
       <parent-ref/>
       <if-exists>overwrite</if-exists>
       <portal>
       <portal-name>HelloPortal</portal-name>
       <properties>
       <!-- Set the layout for the default portal -->
       <!-- see also portal-layouts.xml -->
       <property>
       <name>layout.id</name>
       <value>generic</value>
       </property>
       <!-- Set the theme for the default portal -->
       <!-- see also portal-themes.xml -->
       <property>
       <name>theme.id</name>
       <value>Nphalanx</value>
       </property>
       <!-- set the default render set name (used by the render tag in layouts) -->
       <!-- see also portal-renderSet.xml -->
       <property>
       <name>theme.renderSetId</name>
       <value>divRenderer</value>
       </property>
       <!-- set the default strategy name (used by the strategy interceptor) -->
       <!-- see also portal-strategies.xml -->
       <property>
       <name>layout.strategyId</name>
       <value>maximizedRegion</value>
       </property>
       </properties>
       <supported-modes>
       <mode>view</mode>
       <mode>edit</mode>
       <mode>help</mode>
       </supported-modes>
       <supported-window-states>
       <window-state>normal</window-state>
       <window-state>minimized</window-state>
       <window-state>maximized</window-state>
       </supported-window-states>
       <page>
       <page-name>start</page-name>
       <properties/>
       <window>
       <window-name>MyPortletWindow</window-name>
       <instance-ref>MyWorldPortletInstance</instance-ref>
       <region>center</region>
       <height>0</height>
       </window>
       <security-constraint>
       <policy-permission>
       <unchecked/>
       <action-name>viewrecursive</action-name>
       </policy-permission>
       </security-constraint>
       </page>
       <security-constraint>
       <policy-permission>
       <unchecked/>
       <action-name>personalizerecursive</action-name>
       </policy-permission>
       </security-constraint>
       </portal>
       </deployment>
       <deployment>
       <if-exists>overwrite</if-exists>
       <parent-ref>HelloPortal</parent-ref>
       <page>
       <page-name>test</page-name>
       <window>
       <window-name>MyPortletWindow</window-name>
       <instance-ref>MyWorldPortletInstance</instance-ref>
       <region>center</region>
       <height>0</height>
       </window>
       <security-constraint>
       <policy-permission>
       <unchecked/>
       <action-name>viewrecursive</action-name>
       </policy-permission>
       </security-constraint>
       </page>
       </deployment>
      </deployments>


      portlet-instances.xml
      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <deployments>
       <deployment>
       <instance>
       <instance-id>MyWorldPortletInstance</instance-id>
       <portlet-ref>MyWorldPortlet</portlet-ref>
       </instance>
       </deployment>
      </deployments>


        • 1. Re: instances problem
          habicht

          Additional:
          JBoss Portal 2.4.1 Bundled
          JBoss 4.0.4 GA (downloaded)
          JDK 1.5.0_9
          PostgreSQL 8.3
          PostgreSQL jdbc3
          Windows XP SP2

          • 2. Re: instances problem
            peterj

            I didn't see anything obviously wrong in the config files. Stack trace please...

            Also, you indicated you are using the bundled portal. It uses Hypersonic by default; I assume you made the necessary modifications to use PostgreSQL (just trying to eliminate possible problem causes).

            • 3. Re: instances problem
              habicht

              The modifications for PostgreSQL are made and the driver is under /jboss/server/default/lib. JBoss created all tables and filld them with data. to make sure that it's not the DB I set the DB config back to hypersonic (original xml-files from the zip). It produced the same problem.

              About the stack trace:
              During the jboss start I receive the error below but I don't know if it related to my problem. It is the only error I get during starting jboss, deploying the projects and calling the pages with my browser. If you meant something different please tell me. I'm still not very familiar with the whole topic.

              christof

              07:30:19,718 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS

              ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker
              jboss.web:service=WebServer

              ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
              State: CONFIGURED
              I Depend On:
              jboss:service=TransactionManager
              jboss.jca:service=DataSourceBinding,name=DefaultDS

              ObjectName: jboss.mq:service=StateManager
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS
              Depends On Me:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq:service=DestinationManager
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=MessageCache
              jboss.mq:service=PersistenceManager
              jboss.mq:service=StateManager
              jboss.mq:service=ThreadPool
              jboss:service=Naming
              Depends On Me:
              jboss.mq.destination:service=Topic,name=testTopic
              jboss.mq.destination:service=Topic,name=securedTopic
              jboss.mq.destination:service=Topic,name=testDurableTopic
              jboss.mq.destination:service=Queue,name=testQueue
              jboss.mq.destination:service=Queue,name=A
              jboss.mq.destination:service=Queue,name=B
              jboss.mq.destination:service=Queue,name=C
              jboss.mq.destination:service=Queue,name=D
              jboss.mq.destination:service=Queue,name=ex
              jboss.mq:service=SecurityManager
              jboss.mq.destination:service=Queue,name=DLQ

              ObjectName: jboss.mq:service=PersistenceManager
              State: CONFIGURED
              I Depend On:
              jboss.jca:service=DataSourceBinding,name=DefaultDS
              Depends On Me:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Topic,name=testTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Queue,name=testQueue
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq.destination:service=Queue,name=A
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=B
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=C
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=D
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq.destination:service=Queue,name=ex
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager

              ObjectName: jboss.mq:service=Invoker
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=TracingInterceptor
              jboss:service=Naming
              Depends On Me:
              jboss.mq:service=InvocationLayer,type=HTTP
              jboss.mq:service=InvocationLayer,type=JVM
              jboss.mq:service=InvocationLayer,type=UIL2

              ObjectName: jboss.mq:service=TracingInterceptor
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=SecurityManager
              Depends On Me:
              jboss.mq:service=Invoker

              ObjectName: jboss.mq:service=SecurityManager
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              Depends On Me:
              jboss.mq.destination:service=Topic,name=testTopic
              jboss.mq.destination:service=Topic,name=securedTopic
              jboss.mq.destination:service=Topic,name=testDurableTopic
              jboss.mq.destination:service=Queue,name=testQueue
              jboss.mq:service=TracingInterceptor
              jboss.mq.destination:service=Queue,name=DLQ

              ObjectName: jboss.mq.destination:service=Queue,name=DLQ
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=DestinationManager
              jboss.mq:service=SecurityManager

              ObjectName: jboss.mq:service=InvocationLayer,type=JVM
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker

              ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
              State: CONFIGURED
              I Depend On:
              jboss.mq:service=Invoker

              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
              State: NOTYETINSTALLED
              Depends On Me:
              jboss.ejb:service=EJBTimerService,persistencePolicy=database
              jboss:service=KeyGeneratorFactory,type=HiLo
              jboss.mq:service=StateManager
              jboss.mq:service=PersistenceManager

              • 4. Re: instances problem
                mputz

                The errors from your latest post indicate that you don't have the default datasource configuration, name=DefaultDS, anymore, which is needed for JMS, etc. The easiest way to get rid of these errors is to copy hsqldb-ds.xml from the default distribution back into your /deploy directory.

                Regarding the initial problem: where have you placed the org.jboss.portlet.hello.MyPortlet class file? Seems like it can't be found.

                • 5. Re: instances problem
                  habicht

                  The original hsql-ds.xml worked. The problem with the DefaultDS is gone.

                  I have two web projects MyPortal, containing my-object.xml and portlet-instances.xml and MyPortlet which contains portlet.xml and the MyPortlet.class in /WEB-INF/classes/org/jboss/portlet/hello/MyPortlet.class

                  Both the portal-pages from my-object.xml and MyPortlet are listed in the management-portlet from the jboss default-portal only the instance is missing. If I create it via management-portlet everything works great but then I wouldn't need the portlet-instances.xml.

                  • 6. Re: instances problem
                    habicht

                    are there any other suggestions what could be wrong? if it's not the config what else could cause that problem?

                    • 7. Re: instances problem
                      theute

                      HelloPortal doesn't have the view right, so i wonder how you can even access it.

                      Are you sure you have no error in the log file ?

                      • 8. Re: instances problem
                        habicht

                        do you mean supported-modes or security constraints or is there another tag that isn't in my xml-files

                        • 9. Re: instances problem
                          theute

                          The security constraint, on the portal you defined:

                           <security-constraint>
                           <policy-permission>
                           <unchecked/>
                           <action-name>personalizerecursive</action-name>
                           </policy-permission>
                           </security-constraint>
                          

                          You should have something like:
                           <security-constraint>
                           <policy-permission>
                           <unchecked/>
                           <action-name>personalizerecursive</action-name>
                           <action-name>viewrecursive</action-name>
                           </policy-permission>
                           </security-constraint>
                          


                          That's not related to your error. But i wonder how you got to that point.

                          Also you did not answer about the errors in the log file

                          • 10. Re: instances problem
                            habicht

                            I've checked it several times. the log file contains no errors.

                            About the view rights. I took the passage with only personalizerecursive from the reference-guide and thought that personalize would include view rights.