I am getting the following error from an application I am migrating to JBoss Wildfly and I've Googled around an haven't been able to find this specific error.
Has anyone else seen this?
What is the cause and/or solution?
We are seeing this error in Wildfly. We are not seeing the error in AS.
EDIT: This error is occuring at startup. The method is being invoked using an @Startup annotation.
12:43:34,442 ERROR [org.jboss.as.ejb3.invocation] (schema_update_thread) WFLYEJB0034: EJB Invocation failed on component DBSchemaUpdateBean for method public void com.mycompany.myappserver.ejb.DBSchemaUpdateBean.processUpdates(com.mycompany.myappserver.config.sql.DBType) throws java.lang.Exception: javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public void com.mycompany.myappserver.ejb.DBSchema
UpdateBean.processUpdates(com.mycompany.myappserver.config.sql.DBType) throws java.lang.Exception of bean: DBSchemaUpdateBean is not allowed
at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:134)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:634)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
at com.mycompany.myappserver.ejb.DBSchemaUpdateBean$$$view31.processUpdates(Unknown Source)
at com.mycompany.myappserver.ejb.SharedDataBean$1.run(SharedDataBean.java:89)
at java.lang.Thread.run(Thread.java:744)
The key part is:
WFLYEJB0364: Invocation on method: [blah] of bean: DBSchemaUpdateBean is not allowed
JBAS014502 seems like a closely related error too (for example here) but is mentioned more often.
Looks like DBSchemaUpdateBean
method processUpdates
uses a @RolesAllowed
annotation and is being called by a client without the permitted roles. If this is happening at startup, that suggests this might be a system call during initialisation? I suggest checking that any calls to this method during initialisation have the correct roles, and that these roles are configured properly.