[JBoss Portal] - Interportlet Communication (Again)
by taiji3
I have checked out all the threads on this topic and have not found the answer to my issue. I am running JBoss Portal 2.2 on Linux. As I am new to portlet development, I am attempting to make use of the freely available book by Hepper, et. al. which was never published by Manning. In Chapter 3, there is a project with two portlets, a Calendar portlet and a Todo portlet. The Calendar portlet has actionURL's for each date - when you click a date, it sets the date value in a bean stored in the portlet session at application scope. The Todo portlet should read that date and display the date as well as any Todo's you have set up on that date.
The problem is that the Todo portlet only picks up the date when it has a mode change (view to edit and vice versa). I can click 4 or 5 dates in a row on the Calendar portlet with no change in the Todo portlet. Not even refreshing the page does anything. But if I put the Todo portlet in edit mode (or back to view mode), it displays the last date I clicked on the Calendar. So obviously the date is being set, but I have no idea why the Todo portlet won't see it unless the mode changes.
If anyone has any ideas, I would appreciate it. I am quite new to this whole portlet idea and there are precious few resources for portlet development out there. Also - I downloaded the HelloPortletIPC example, but I want to stick with JSR168 compliance. These portlets use jsps and the jstl tag libraries if that matters. I can post code if anyone wants to see it.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957824#3957824
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957824
19 years, 9 months
[JBoss Portal] - CMS NullPointerException due to hibernate.connection.datasou
by hlfsousa
I'm trying to run release 2.2.1-SP1 of JBoss Portal and Forums. Database is working OK (MySQL 5 with jdbcCompliantTruncation=false). There is just one error going on. When starting CMS service an exception is raised because property "hibernate.connection.datasource" is null. I tried finding this everywhere, and I ended up finding similar matches in hibernate.cfg.xml files. Everywhere I found it, the property value was "java:PortalDS" (MySQL). I'm running JBoss 4.0.4-GA, and here is a snippet from the server log:
2006-07-13 14:24:19,653 INFO [org.hibernate.impl.SessionFactoryImpl] building session factory
| 2006-07-13 14:24:19,747 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 2006-07-13 14:24:19,747 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] Running hbm2ddl schema update
| 2006-07-13 14:24:19,747 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] fetching database metadata
| 2006-07-13 14:24:19,763 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] updating schema
| 2006-07-13 14:24:19,841 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] table found: jbossportal.jbp_cms_cmsentry
| 2006-07-13 14:24:19,841 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [fsentry_path, fsentry_data, fsentry_name, fsentry_length, fsentry_lastmod, pk]
| 2006-07-13 14:24:19,856 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: []
| 2006-07-13 14:24:19,856 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [primary]
| 2006-07-13 14:24:19,950 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] table found: jbossportal.jbp_cms_repositoryentry
| 2006-07-13 14:24:19,950 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [fsentry_path, fsentry_data, fsentry_name, fsentry_length, fsentry_lastmod, pk]
| 2006-07-13 14:24:19,966 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: []
| 2006-07-13 14:24:19,966 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [primary]
| 2006-07-13 14:24:20,044 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] table found: jbossportal.jbp_cms_versionentry
| 2006-07-13 14:24:20,044 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [fsentry_path, fsentry_data, fsentry_name, fsentry_length, fsentry_lastmod, pk]
| 2006-07-13 14:24:20,044 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: []
| 2006-07-13 14:24:20,059 INFO [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [primary]
| 2006-07-13 14:24:20,059 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] schema update complete
| 2006-07-13 14:24:20,075 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
| 2006-07-13 14:24:20,075 INFO [org.jboss.portal.cms.hibernate.HibernateStore] HibernateSessionFactory Created.
| 2006-07-13 14:24:20,091 INFO [org.jboss.portal.cms.hibernate.HibernateStore] BUILDING SessionFactory.
| 2006-07-13 14:24:20,106 INFO [org.hibernate.cfg.Configuration] Reading mappings from resource: org/jboss/portal/cms/hibernate/CMSEntry.hbm.xml
| 2006-07-13 14:24:20,138 INFO [org.hibernate.cfg.HbmBinder] Mapping class: org.jboss.portal.cms.hibernate.CMSEntry -> jbp_cms_cmsentry
| 2006-07-13 14:24:20,153 INFO [org.hibernate.cfg.Configuration] Reading mappings from resource: org/jboss/portal/cms/hibernate/VersionEntry.hbm.xml
| 2006-07-13 14:24:20,200 INFO [org.hibernate.cfg.HbmBinder] Mapping class: org.jboss.portal.cms.hibernate.VersionEntry -> jbp_cms_versionentry
| 2006-07-13 14:24:20,200 INFO [org.hibernate.cfg.Configuration] Reading mappings from resource: org/jboss/portal/cms/hibernate/RepositoryEntry.hbm.xml
| 2006-07-13 14:24:20,247 INFO [org.hibernate.cfg.HbmBinder] Mapping class: org.jboss.portal.cms.hibernate.RepositoryEntry -> jbp_cms_repositoryentry
| 2006-07-13 14:24:20,278 ERROR [org.jboss.portal.cms.hibernate.HibernateStore] failed to initialize file system
| java.lang.NullPointerException
| at java.util.Hashtable.put(Hashtable.java:396)
| at java.util.Properties.setProperty(Properties.java:128)
| at org.hibernate.cfg.Configuration.setProperty(Configuration.java:1289)
| at org.jboss.portal.cms.hibernate.HibernateStore.init(HibernateStore.java:231)
| at org.apache.jackrabbit.core.config.FileSystemConfig.init(FileSystemConfig.java:55)
| at org.apache.jackrabbit.core.config.WorkspaceConfig.init(WorkspaceConfig.java:81)
| at org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:249)
| at org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:128)
| at org.jboss.portal.cms.impl.jcr.jackrabbit.JackrabbitJCRService.start(JackrabbitJCRService.java:101)
| at org.jboss.portal.cms.impl.jcr.JCRCMS.startJCR(JCRCMS.java:233)
| at org.jboss.portal.cms.impl.jcr.JCRCMS.startService(JCRCMS.java:199)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
| at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:86)
| at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
| at $Proxy0.start(Unknown Source)
| (...)
| 2006-07-13 14:24:20,856 WARN [org.jboss.system.ServiceController] Problem starting service portal:service=CMS
| org.apache.jackrabbit.core.config.ConfigurationException: File system initialization failure.: failed to initialize file system: null: failed to initialize file system: null
| at org.apache.jackrabbit.core.config.FileSystemConfig.init(FileSystemConfig.java:61)
| at org.apache.jackrabbit.core.config.WorkspaceConfig.init(WorkspaceConfig.java:81)
| at org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:249)
| at org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:128)
| at org.jboss.portal.cms.impl.jcr.jackrabbit.JackrabbitJCRService.start(JackrabbitJCRService.java:101)
| at org.jboss.portal.cms.impl.jcr.JCRCMS.startJCR(JCRCMS.java:233)
| at org.jboss.portal.cms.impl.jcr.JCRCMS.startService(JCRCMS.java:199)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
| at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:86)
| at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
| at $Proxy0.start(Unknown Source)
| (...)
| 2006-07-13 14:24:40,466 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: org.apache.jackrabbit.core.config.ConfigurationException: File system initialization failure.: failed to initialize file system: null: failed to initialize file system: null
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| portal:service=JAASLoginModule
| Depends On Me:
| portal:mapper=CMSObject
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: org.apache.jackrabbit.core.config.ConfigurationException: File system initialization failure.: failed to initialize file system: null: failed to initialize file system: null
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| portal:service=JAASLoginModule
| Depends On Me:
| portal:mapper=CMSObject
Any ideas of what is going on?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957823#3957823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957823
19 years, 9 months
[Beginners Corner] - Look-up ejb class getInterfaces shows my home interface, but
by MainLineDude
I'm trying to instantiate a simple bean:
The class object for the bean as looked up says it implements my home interface, but in reality it does not (see jsp code below):
| Object theBean =
| ctx.lookup("DemoBean");
| out.write("<hr /><h3>looked up DemoBean</h3><hr />");
|
| Method!! methods = theBean.getClass().getDeclaredMethods();
| out.write("<p>Methods:<ul>");
| for (int i = 0; i < methods.length; i++) {
| out.write("<li>" + methods!i!.getName() + "</li>");
| }
| out.write("</ul></p>");
|
| Class!! interfaces = theBean.getClass().getInterfaces();
| out.write("<p>Interfaces:<ul>");
| for (int i = 0; i < interfaces.length; i++) {
| out.write("<li>" + interfaces!i!.getName() + "</li>");
| }
| out.write("</ul></p>");
| // list includes my home interface: ejb.demo.DemoHome
|
| out.write("<hr />" +
| ((theBean instanceof ejb.demo.DemoHome) ?
| " is " : " is not " ) +
| "an instance of DemoHome");
| // note: it is not
|
| out.write("<hr />" +
| ((theBean.getClass().
| isAssignableFrom(ejb.demo.DemoHome.class) ) ?
| " is " : " is not " ) +
| "assignable from DemoHome");
| // note: it is not
|
| out.write("<hr />about to try cast");
| ejb.demo.DemoHome dhome = (ejb.demo.DemoHome) theBean;
| //fails with ClassCastException
|
Is this a some sort of scoping issue? (Note that I created this thru NetBeans 5.0, which wanted me to have two separate projects within the same application -- the above file is in the WebModule, while the EJB classes are in the EJBModule)
Note that in the above code ! are used for array brackets, because, try as I might, I could not get bbCode to be disabled, at least in the preview (ditto for HTML actually, but in bbCode mode that didn't seem to matter)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957821#3957821
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957821
19 years, 9 months