[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3639) Need support for hierarchical beanRefFactory in ContextLoader
by Bob Shanahan (JIRA)
Need support for hierarchical beanRefFactory in ContextLoader
-------------------------------------------------------------
Key: JBSEAM-3639
URL: https://jira.jboss.org/jira/browse/JBSEAM-3639
Project: Seam
Issue Type: Feature Request
Components: Spring
Affects Versions: 2.1.0.GA
Reporter: Bob Shanahan
The Spring ContextLoaderListener allows loading of shared (by multiple wars), hierarchical contexts as in the following sample web.xml config:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>locatorFactorySelector</param-name>
<param-value>classpath:com/i2i/services/beanRefFactory.xml</param-value>
</context-param>
<context-param>
<param-name>parentContextKey</param-name>
<param-value>i2i.services</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>i2i.webt</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
The Seam ContextLoader, however, only allows loading of one or more application contexts, neither allowing single instances of shared contexts nor allowing for hierarchical contexts (via setting of parent context key).
Attempts to overcome the limitation with the following <spring:context-loader> config and beanRefFactory.xml fails as only the beans defined in the beanRefFactory are directly visible to Seam.
<spring:context-loader>
<spring:config-locations>
<value>classpath:com/i2i/services/beanRefFactory.xml</value>
<value>/WEB-INF/beanRefFactory.xml</value>
</spring:config-locations>
</spring:context-loader>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
"http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="i2i.web" lazy-init="false"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>
/WEB-INF/applicationContext.xml
</value>
</list>
</constructor-arg>
<constructor-arg>
<ref bean="i2i.services" />
</constructor-arg>
</bean>
</beans>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3619) JpaPermissionStore fails using diffent properties for PermissionRole and PermissionUser on the same entity
by Stefano Travelli (JIRA)
JpaPermissionStore fails using diffent properties for PermissionRole and PermissionUser on the same entity
----------------------------------------------------------------------------------------------------------
Key: JBSEAM-3619
URL: https://jira.jboss.org/jira/browse/JBSEAM-3619
Project: Seam
Issue Type: Bug
Components: Security
Affects Versions: 2.1.0.GA
Environment: JBoss 4.2.2 JVM 1.6.0
Reporter: Stefano Travelli
JpaPermissionStore can be configured omitting the role-permission-class. In such a case the user-permission-class entity is used for both users and roles permission assignments.
In this configuration is @PermissionRole and @PermissionUser can annotate the same property, as in the seam-space example.
While using two different properties is not as valuable in this scenario, if one do this way the JpaPermissionStore uses only the one annotated as @PermissionUser.
Bigger problems arise if @PermissionUser and @PermissionStore are ManyToOne properties since granting a permission to a role results in:
java.lang.IllegalArgumentException: Could not invoke method by reflection: Permission.setOperatore(eu.entaksi.getin.model.Operatore) with parameters: (eu.entaksi.getin.model.Ruolo) on: eu.entaksi.getin.model.Permission
at org.jboss.seam.util.Reflections.invoke(Reflections.java:32)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:126)
at org.jboss.seam.util.AnnotatedBeanProperty.setValue(AnnotatedBeanProperty.java:103)
at org.jboss.seam.security.permission.JpaPermissionStore.updatePermissionActions(JpaPermissionStore.java:372)
... 101 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
I'm almost done with a patch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3618) CNFE javax.ejb.PostActivate with non-ejb3 seam app in websphere v6.1.0.17
by Denis Forveille (JIRA)
CNFE javax.ejb.PostActivate with non-ejb3 seam app in websphere v6.1.0.17
-------------------------------------------------------------------------
Key: JBSEAM-3618
URL: https://jira.jboss.org/jira/browse/JBSEAM-3618
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.0.GA
Environment: Seam v2.1GA, Websphere v6.1.0.17, RF v3.2.2, faclets 1.1.14, JSF RI 1.2_09
Reporter: Denis Forveille
We receive a ClassNotFoundException: javax.ejb.PostActivate when starting our seam application migrated to v2.1.0GA deployed in WebSphere v6.1.0.17 without the EJB3 feature pack
The aplication works fine with seam v2.0.2SP1
It seems that some (internal?0) component is trying to access an EJB3 class even if we deploy our app in a non-EJB3 container...
The component in question is defined as
@Name("achatPromotionUtils")
@Scope(ScopeType.APPLICATION)
@Startup
public class AchatPromotionUtils implements Serializable {
private static final long serialVersionUID = 1L;
...
The exception we receive on startup is :
WebApp E Exception caught while initializing context
java.lang.RuntimeException: Could not create Component: achatPromotionUtils
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1155)
at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1071)
at org.jboss.seam.init.Initialization.init(Initialization.java:720)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:645)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:319)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:290)
at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:90)
at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:618)
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:1303)
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:949)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1486)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4042)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4139)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1491)
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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1090)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1081)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:974)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:179)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:621)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:474)
at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2701)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2575)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.TypeNotPresentException: Type javax.ejb.PostActivate not present
at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38)
at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31)
at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:722)
at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:191)
at com.ibm.oti.reflect.Method.getAnnotation(Method.java:20)
at java.lang.reflect.Method.getAnnotation(Method.java:711)
at java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:187)
at org.jboss.seam.intercept.Interceptor.init(Interceptor.java:130)
at org.jboss.seam.intercept.Interceptor.<init>(Interceptor.java:97)
at org.jboss.seam.Component.initDefaultInterceptors(Component.java:1029)
at org.jboss.seam.Component.initInterceptors(Component.java:927)
at org.jboss.seam.Component.<init>(Component.java:251)
at org.jboss.seam.Component.<init>(Component.java:205)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)
... 53 more
Caused by: java.lang.ClassNotFoundException: javax.ejb.PostActivate
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:163)
at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:33)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 5 months