组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Rajesh Thiagarajan
Using Expando Service
2009年10月26日 上午4:32
答复

Rajesh Thiagarajan

等级: New Member

帖子: 18

加入日期: 2008年5月16日

最近的帖子

Hi,

I am trying to use the Expando Local Services to add custom attributes to "User" object. I am seeing the following exception stack while using the same. Any help appreciated

Version : 5.2.x

Snippet :

ExpandoTable expandoTable = null;

try {

expandoTable = ExpandoTableLocalServiceUtil.addTable( User.class.getName(),
ExpandoTableConstants.DEFAULT_TABLE_NAME);

} catch (DuplicateTableNameException dtne) {

expandoTable =
ExpandoTableLocalServiceUtil.getTable( User.class.getName(), ExpandoTableConstants.DEFAULT_TABLE_NAME);
}

ExpandoColumn expandoColumn = ExpandoColumnLocalServiceUtil.getColumn( User.class.getName(),
ExpandoTableConstants.DEFAULT_TABLE_NAME, "test-attr");

if (expandoColumn == null) {

ExpandoColumnLocalServiceUtil.addColumn( expandoTable.getTableId(),
"test-attr", ExpandoColumnConstants.STRING);
}

Here is the exception stack :

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.test.service.test.TestStartupAction'
defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Instantiation of bean failed; nested exception is org.
springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liferay.test.service.test.TestStartupAction]: Con
structor threw exception; nested exception is com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=0, name=Owne
r}
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactor
y.java:883)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFac
tory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.j
ava:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409
)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.jav
a:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java
:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:78)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.portalInit(PortalClassLoaderServletContextListener.j
ava:90)
at com.liferay.portal.kernel.util.PortalInitableUtil.init(PortalInitableUtil.java:48)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextLi
stener.java:74)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4663)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5343)
at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
at com.sun.enterprise.web.WebContainer.enableWebModule(WebContainer.java:2148)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleEnabled(WebModuleDeployEventListener.java:391)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1011)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:190
1)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1968)
at sun.reflect.GeneratedMethodAccessor914.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:387)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:370)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:480)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122
)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcess|#]

[#|2009-10-26T16:12:54.084+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=17;_ThreadName=httpWorkerThread-4848-0
;|orTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.liferay.test.service.test.TestStar
tupAction]: Constructor threw exception; nested exception is com.liferay.portal.NoSuchRoleException: No Role exists with the key {company
Id=0, name=Owner}
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactor
y.java:877)
... 85 more
Caused by: com.liferay.portal.NoSuchRoleException: No Role exists with the key {companyId=0, name=Owner}
at com.liferay.portal.service.persistence.RolePersistenceImpl.findByC_N(RolePersistenceImpl.java:701)
at com.liferay.portal.service.impl.RoleLocalServiceImpl.getRole(RoleLocalServiceImpl.java:243)
at sun.reflect.GeneratedMethodAccessor375.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy83.getRole(Unknown Source)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addResources_1to5(ResourceLocalServiceImpl.java:729)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addResources(ResourceLocalServiceImpl.java:205)
at com.liferay.portal.service.impl.ResourceLocalServiceImpl.addResources(ResourceLocalServiceImpl.java:160)
at sun.reflect.GeneratedMethodAccessor409.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy77.addResources(Unknown Source)
at com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl.addColumn(ExpandoColumnLocalServiceImpl.java:86)
at com.liferay.portlet.expando.service.impl.ExpandoColumnLocalServiceImpl.addColumn(ExpandoColumnLocalServiceImpl.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy114.addColumn(Unknown Source)
at com.liferay.portlet.expando.service.ExpandoColumnLocalServiceUtil.addColumn(ExpandoColumnLocalServiceUtil.java:116)
at com.liferay.test.service.test.TestStartupAction.<init>(TestStartupAction.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
... 87 more
Minhchau Dang
RE: Using Expando Service
2009年10月26日 上午11:35
答复

Minhchau Dang

LIFERAY STAFF

等级: Expert

帖子: 349

加入日期: 2007年10月22日

最近的帖子

If you're using expandos from a servlet or a portlet StartupAction, you'll need to set the thread local company ID using CompanyThreadLocal.setCompanyId() before you use the Expando*LocalServiceUtil methods.
Rajesh Thiagarajan
RE: Using Expando Service
2009年10月26日 下午11:03
答复

Rajesh Thiagarajan

等级: New Member

帖子: 18

加入日期: 2008年5月16日

最近的帖子

Thanks, Great it works
Rajesh Thiagarajan
RE: Using Expando Service
2009年10月27日 下午11:54
答复

Rajesh Thiagarajan

等级: New Member

帖子: 18

加入日期: 2008年5月16日

最近的帖子

Now I am stuck with another issue while using expando. After adding the Column and Table in the StartupAction now I get the following exception while setting the value for the attributes

Here is the code I use to set the attributes

ExpandoBridge expandoBridge = user.getExpandoBridge();

expandoBridge.setAttribute(TEST_ENABLED_COLUMN_NAME, true);
expandoBridge.setAttribute(TEST_SERVER_COLUMN_NAME, "server.com");
expandoBridge.setAttribute(TEST_USERNAME_COLUMN_NAME, "user");
expandoBridge.setAttribute(TEST_PASSWORD_COLUMN_NAME, "samplepassword");


Note : The above setPreference worked for the first time, it starts failing whenever I try to reset of change the attribute values



[#|2009-10-28T11:42:02.448+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=15;_ThreadName=httpSSLWorkerThread-808
0-1;|11:42:02,437 ERROR [ExpandoBridgeImpl:268] com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: Could
not execute JDBC batch update
com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: Could not execute JDBC batch update
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:91)
at com.liferay.portlet.expando.service.persistence.ExpandoValuePersistenceImpl.updateImpl(ExpandoValuePersistenceImpl.java:443)
at com.liferay.portlet.expando.service.persistence.ExpandoValuePersistenceImpl.update(ExpandoValuePersistenceImpl.java:412)
at com.liferay.portlet.expando.service.impl.ExpandoValueLocalServiceImpl.addValue(ExpandoValueLocalServiceImpl.java:95)
at com.liferay.portlet.expando.service.impl.ExpandoValueLocalServiceImpl.addValue(ExpandoValueLocalServiceImpl.java:117)
at com.liferay.portlet.expando.service.impl.ExpandoValueLocalServiceImpl.addValue(ExpandoValueLocalServiceImpl.java:375)
at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy203.addValue(Unknown Source)
at com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.addValue(ExpandoValueServiceImpl.java:54)
at sun.reflect.GeneratedMethodAccessor268.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy204.addValue(Unknown Source)
at com.liferay.portlet.expando.service.ExpandoValueServiceUtil.addValue(ExpandoValueServiceUtil.java:53)
at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.setAttribute(ExpandoBridgeImpl.java:261)
at com.liferay.test.service.test.TestExpando.setExpandoPreferences(TestExpando.java:190)
at org.apache.jsp.latest_jsp._jspService(latest_jsp.java:475)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
at com.sun.portal.portletcontainer.portlet.impl.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:250)
at com.sun.portal.portletcontainer.portlet.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:196)
at com.liferay.util.bridges.jsp.JSPPortlet.include(JSPPortlet.java:193)
at com.liferay.util.bridges.jsp.JSPPortlet.serveResource(JSPPortlet.java:149)
at com.sun.portal.portletcontainer.appengine.PortletAppEngineServlet.service(PortletAppEngineServlet.java:457)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:832)
at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:702)
at com.sun.portal.portletcontainer.impl.PortletContainer.getResources(PortletContainer.java:471)
at com.liferay.portal.portletcontainer.WindowInvoker.invokeResource(WindowInvoker.java:473)
at com.liferay.portlet.InvokerPortletImpl.serveResource(InvokerPortletImpl.java:498)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:672)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:459)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:157)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:608)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:178)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.theme.ThemePreviewFilter.processFilter(ThemePreviewFilter.java:121)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
Rajesh Thiagarajan
RE: Using Expando Service
2009年10月29日 上午4:44
答复

Rajesh Thiagarajan

等级: New Member

帖子: 18

加入日期: 2008年5月16日

最近的帖子

There seems to a bug with expando.setAttribute("attr-name", "value");

Looks like the first time you set the attribute, it works fine. The next time you update it . ie use the same above API to reset the attribute it throws the above exception ir "JDBC batch update"

However if you update an expand attribute using

ExpandoValueLocalServiceUtil.updateExpandoValue(expandoValue, true); it works fine

Any one seeing similiar behaviour or did I miss something ?