Deploy Drools-Guvnor5.4.0CR1 to Jboss-eap-5.1.2

I want to deploy Drools-Guvnor 5.4.0 CR1 to JBoss-eap-5.1.2 and start a first surf,  but i met some questions in guvnor deploy, I list it below, hopefully this can help others.

 

1. A RuntimeException threw while deploy guvnor.war, I post some Exception trace:

java.lang.RuntimeException: mapped-name is required for BeanManager of deployment guvnor.war

    at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(WebResourceHandler.java:287)

    at org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(WebResourceHandler.java:325)

    at org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:537)

    at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)

 

How to fix this question:

I add jboss-web.xml under GUVNOR.WAR/WEB-INF folder, the jboss-web.xml contents is:

<!DOCTYPE jboss-web PUBLIC

   "-//JBoss//DTD Web Application 5.0//EN"

   "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">

<jboss-web>

   <resource-env-ref>

        <resource-env-ref-name>BeanManager</resource-env-ref-name>

        <jndi-name>BeanManager</jndi-name>

    </resource-env-ref>

</jboss-web>

After added this file, start the JBoss again, guvnor.war can deploy success.

 

2. Jar(jboss-logmanager.jar) version problem

Drools-Guvnor 5.4.0 CR1 need higher version jboss-logmanager.jar, so while you deploy guvnor to JBoss-eap-5.1.2, the following exception throwing:

java.lang.NoSuchMethodError: org.jboss.logmanager.LogContext.getAttachment(Ljava/lang/String;Lorg/jboss/logmanager/Logger$AttachmentKey;)Ljava/lang/Object;

    at org.jboss.solder.logging.internal.JBossLogManagerProvider.doGetLogger(JBossLogManagerProvider.java:52)

    at org.jboss.solder.logging.internal.JBossLogManagerProvider.getLogger(JBossLogManagerProvider.java:47)

    at org.jboss.solder.logging.internal.LoggerProviders.find(LoggerProviders.java:37)

    at org.jboss.solder.logging.internal.LoggerProviders.<clinit>(LoggerProviders.java:32)

    at org.jboss.solder.logging.internal.Logger.getLogger(Logger.java:2163)

    at org.jboss.solder.logging.Logger.<init>(Logger.java:43)

I tied replace jboss-logmanager.jar under JBOSS5_HOME/lib with a high version jboss-logmanager.jar, but still can not sucess, I am try to deploy guvnor to JBoss-eap-6.0 now