Re: JBWEB000284: Exception starting filter OCPsoft Rewrite Filter

Splash Forums Rewrite Users JBWEB000284: Exception starting filter OCPsoft Rewrite Filter Re: JBWEB000284: Exception starting filter OCPsoft Rewrite Filter

#23143

jlgranda
Participant

Ok Lincoln. This is complete trace:

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/glue]] (MSC service thread 1-2) JBWEB000284: Exception starting filter OCPsoft Rewrite Filter: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.RequestScoped
at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:590) [weld-core-1.1.10.Final.jar:2012-10-12 10:00]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:71) [weld-core-1.1.10.Final.jar:2012-10-12 10:00]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.10.Final.jar:2012-10-12 10:00]
at org.eqaula.glue.model.profile.Profile$Proxy$_$$_WeldClientProxy.isPersistent(Profile$Proxy$_$$_WeldClientProxy.java) [classes:]
at org.eqaula.glue.rewrite.AuthenticationStatusInterceptor.getConfiguration(AuthenticationStatusInterceptor.java:63) [classes:]
at org.eqaula.glue.rewrite.AuthenticationStatusInterceptor.getConfiguration(AuthenticationStatusInterceptor.java:53) [classes:]
at org.ocpsoft.rewrite.config.ConfigurationLoader.build(ConfigurationLoader.java:127) [rewrite-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.ocpsoft.rewrite.config.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:68) [rewrite-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.init(DefaultHttpRewriteProvider.java:46) [rewrite-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider.init(DefaultHttpRewriteProvider.java:33) [rewrite-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.init(RewriteFilter.java:127) [rewrite-servlet-1.1.0.Final.jar:1.1.0.Final]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:416) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3224) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3783) [jbossweb-7.2.0.Alpha2.jar:7.2.0.Alpha2]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:102) [jboss-as-web-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]

09:31:25,604 INFO [solder-servlet] (MSC service thread 1-2) Catch Integration for Servlets enabled
09:31:25,604 ERROR [org.apache.catalina.core] (MSC service thread 1-2) JBWEB001103: Error detected during context /glue start, will stop it
09:31:25,607 INFO [com.ocpsoft.pretty.PrettyFilter] (MSC service thread 1-2) PrettyFilter shutting down...
09:31:25,632 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.web.deployment.default-host./glue: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./glue: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:107)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]

The configurator provider is the same configurator provider in socialpm. When call account.setEntityManager(em); throw exception and deploy stop.

public class AccountVerificationInterceptor extends HttpConfigurationProvider
{
@Inject
private Account account;

@PersistenceContext
private EntityManager em;

@Override
public Configuration getConfiguration(final ServletContext context)
{
ConfigurationBuilder config = ConfigurationBuilder.begin();
account.setEntityManager(em); //
> Throw EXCEPTION
Profile current = account.getLoggedIn();
if (current.isPersistent() && !current.isUsernameConfirmed())
{
return config.defineRule()
.when(DispatchType.isRequest()
.and(Direction.isInbound())
.and(GlueResources.excluded()))
.perform(Forward.to("/account/confirm"))

.addRule(Join.path("/account/confirm").to("/pages/accountConfirm.xhtml"));
}
return config;
}

@Override
public int priority()
{
return 0;
}
}