portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woonsan Ko (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Created: (JS2-1202) Cannot deploy local portlet applications by using the local app staging directory (e.g. /WEB-INF/apps)
Date Wed, 14 Jul 2010 23:26:50 GMT
Cannot deploy local portlet applications by using the local app staging directory (e.g. /WEB-INF/apps)
------------------------------------------------------------------------------------------------------

                 Key: JS2-1202
                 URL: https://issues.apache.org/jira/browse/JS2-1202
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Assembly/Configuration, Deployment
    Affects Versions: 2.2.1
         Environment: WebSphere 6.1
            Reporter: Woonsan Ko
            Assignee: Woonsan Ko
             Fix For: 2.2.2


When deploying jetspeed-layout local PA by extracting all onto /jetspeed/WEB-INF/apps/jetspeed-layout,
it fails to register the local PA with the exception messages below. [Exception message].

The bean, "deploymentManager" (typeof o.a.j.deployment.impl.StandardDeploymentManager) in
deployment.xml, tries to register the scanned local PAs from the staging directory as soon
as it is initialized as a bean.
The registration process passes through o.a.j.tools.pamanager.PortletApplicationManager#grantDefaultPermissions(String),
and it goes to o.a.j.security.util.ojb.JetspeedPrincipalConcreteClassRowReader#extractOjbConcreteClass(ClassDescriptor,
ResultSet).
The problem, however, is that the PortletApplicationManager doesn't have a chance to be called
on the static method, #setJetspeedPrincipalManagerProvider(JetspeedPrincipalManagerProvider),
which is supposed to be called during the *bean initializations* in "static-bean-references.xml".
With the current assembly configurations, it's not guaranteed that the beans in static-bean-references.xml
are initialized before!

This kind of static initialization during the bean initialization could produce other problems
potentially as well; so we need to find a way to avoid this kind of complexities (which seems
to have been introduced after 2.2.0 security provider enhancements.)
However, I think we can postpone refactoring for this now.

Anyway, to resolve this problem, one simplest solution I have in mind is to make the "deploymentManager"
bean in deployment.xml start only after the spring application context finished initialization
on all the beans.
Also, to isolate the ""deploymentManager" from the spring framework API, it is possible to
make a utility bean to invoke "start" method by implementing org.springframework.context.ApplicationListener.

-----------------------------------------------------------------------------

[Exception message]
7/14/10 11:59:06:531 PDT] 00000014 SystemOut     O 14.07.2010 11:59:06 ERROR [org.apache.jetspeed.tools.pamanager.PortletApplicationManager.retryStartPortletApplication():237]
Unable to start portlet application after 10 retries: org.apache.jetspeed.components.portletregistry.RegistryException:
Error starting portlet application jetspeed-layouts
org.apache.jetspeed.components.portletregistry.RegistryException: Error starting portlet application
jetspeed-layouts
	at org.apache.jetspeed.tools.pamanager.VersionedPortletApplicationManager.attemptStartPA(VersionedPortletApplicationManager.java:152)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.tryStartPortletApplication(PortletApplicationManager.java:244)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy15.tryStartPortletApplication(Unknown Source)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.retryStartPortletApplication(PortletApplicationManager.java:214)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.startLocalPortletApplication(PortletApplicationManager.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
	at $Proxy15.startLocalPortletApplication(Unknown Source)
	at org.apache.jetspeed.deployment.impl.DeployPortletAppEventListener.initialize(DeployPortletAppEventListener.java:165)
	at org.apache.jetspeed.deployment.impl.StandardDeploymentManager.start(StandardDeploymentManager.java:122)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(AccessController.java:219)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java: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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:320)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	at java.security.AccessController.doPrivileged(AccessController.java:219)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java: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.apache.jetspeed.components.SpringComponentManager.start(SpringComponentManager.java:308)
	at org.apache.jetspeed.engine.JetspeedEngine.start(JetspeedEngine.java:119)
	at org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:208)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:226)
	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:320)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1305)
	at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:153)
	at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
	at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:887)
	at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:809)
	at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:527)
	at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:364)
	at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:292)
	at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
	at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
	at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:671)
	at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:624)
	at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
	at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1274)
	at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)
	at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
	at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:921)
	at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2124)
	at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:342)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: 
org.apache.jetspeed.components.portletregistry.RegistryException: Failed to register portlet
application, jetspeed-layouts
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.registerPortletApplication(PortletApplicationManager.java:435)
	at org.apache.jetspeed.tools.pamanager.VersionedPortletApplicationManager.attemptStartPA(VersionedPortletApplicationManager.java:121)
	... 86 more
Caused by: 
java.lang.NullPointerException
	at org.apache.jetspeed.security.util.ojb.JetspeedPrincipalConcreteClassRowReader.extractOjbConcreteClass(JetspeedPrincipalConcreteClassRowReader.java:74)
	at org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readObjectArrayFrom(RowReaderDefaultImpl.java:176)
	at org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(RsIterator.java:450)
	at org.apache.ojb.broker.accesslayer.RsIterator.next(RsIterator.java:275)
	at org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(PersistenceBrokerImpl.java:1636)
	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
	at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(DelegatingPersistenceBroker.java:307)
	at org.springframework.orm.ojb.PersistenceBrokerTemplate$2.doInPersistenceBroker(PersistenceBrokerTemplate.java:184)
	at org.springframework.orm.ojb.PersistenceBrokerTemplate.execute(PersistenceBrokerTemplate.java:138)
	at org.springframework.orm.ojb.PersistenceBrokerTemplate.getObjectByQuery(PersistenceBrokerTemplate.java:182)
	at org.apache.jetspeed.security.spi.impl.JetspeedSecurityPersistenceManager.getPrincipal(JetspeedSecurityPersistenceManager.java:342)
	at org.apache.jetspeed.security.spi.impl.JetspeedSecurityPersistenceManager.getPrincipal(JetspeedSecurityPersistenceManager.java:332)
	at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy1.getPrincipal(Unknown Source)
	at org.apache.jetspeed.security.impl.BaseJetspeedPrincipalManager.getPrincipal(BaseJetspeedPrincipalManager.java:158)
	at org.apache.jetspeed.security.impl.RoleManagerImpl.getRole(RoleManagerImpl.java:147)
	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	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.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy6.getRole(Unknown Source)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.grantDefaultPermissions(PortletApplicationManager.java:755)
	at org.apache.jetspeed.tools.pamanager.PortletApplicationManager.registerPortletApplication(PortletApplicationManager.java:391)
	... 87 more


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message