<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Migrate Drools 4.0.7 from JBoss 4.2.3 to JBoss7
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/juhu182">Christian Wahl</a> in <i>Beginner's Corner</i> - <a href="https://community.jboss.org/message/737658#737658">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hey folks,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I migrate an application from JBoss 4.2.3 to JBoss 7. The application uses Drools 4.0.7. (and I´m noob to Drools and JBoss)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In the old JBoss version the drl files were not included in the EAR file. The conf folder was the directory for the drl files. We´d like to keep the structure in JBoss7 and use the JBoss\standalone\configuration for the files.<br/>So I put the Drools JAR files in the lib directory. Then I configured the path to the drl files in my application to JBoss\standalone\configuration. When I start the server I get a (lot of) warning(s) like: </p><p>(alpha, beta are placeholder[company issues])</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt;">12:15:37,966 WARN  [org.jboss.modules] (MSC service thread 1-4) Failed to define class de.alpha.beta.model.tcws in Module "deployment.beta-ear.ear.beta-ejb.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link de/alpha/beta/model/tcws (Module "deployment.beta-ear.ear.beta-ejb.jar:main" from Service Module Loader)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.Module.loadModuleClass(Module.java:517)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)</span></p><p><span style="font-size: 8pt;">    at org.mvel.ParserContext.checkForDynsarvamicImport(ParserContext.java:128) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.ParserContext.hasImport(ParserContext.java:163) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.PropertyVerifier.getBeanProperty(PropertyVerifier.java:96) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.PropertyVerifier.analyze(PropertyVerifier.java:73) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.ExpressionCompiler.verify(ExpressionCompiler.java:257) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.ExpressionCompiler._compile(ExpressionCompiler.java:190) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.mvel.ExpressionCompiler.compile(ExpressionCompiler.java:31) [mvel14.jar:]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.dialect.mvel.MVELDialect.compile(MVELDialect.java:387) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.dialect.mvel.MVELPredicateBuilder.build(MVELPredicateBuilder.java:69) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:553) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.rewriteToEval(PatternBuilder.java:388) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:273) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:199) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:168) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167) [drools-compiler-4.0.7.jar:4.0.7]</span></p><p><span style="font-size: 8pt;">    at de.alpha.beta.config.RuleConfigHandlerBean.createRulePackage(RuleConfigHandlerBean.java:748) [beta-ejb.jar:4.2.2-b5]</span></p><p><span style="font-size: 8pt;">    at de.</span><span style="font-size: 8pt;">alpha</span><span style="font-size: 8pt;">.beta.config.RuleConfigHandlerBean.createRuleBase(RuleConfigHandlerBean.java:672) [</span><span style="font-size: 8pt;">beta</span><span style="font-size: 8pt;">-ejb.jar:4.2.2-b5]</span></p><p><span style="font-size: 8pt;">    at de.</span><span style="font-size: 8pt;">alpha</span><span style="font-size: 8pt;">.beta.config.RuleConfigHandlerBean.loadDefaultRules(RuleConfigHandlerBean.java:649) [</span><span style="font-size: 8pt;">beta</span><span style="font-size: 8pt;">-ejb.jar:4.2.2-b5]</span></p><p><span style="font-size: 8pt;">    at de.</span><span style="font-size: 8pt;">alpha</span><span style="font-size: 8pt;">.beta.config.RuleConfigHandlerBean.loadDefaultRuleset(RuleConfigHandlerBean.java:159) [</span><span style="font-size: 8pt;">beta</span><span style="font-size: 8pt;">-ejb.jar:4.2.2-b5]</span></p><p><span style="font-size: 8pt;">    at de.</span><span style="font-size: 8pt;">alpha</span><span style="font-size: 8pt;">.beta.config.RuleConfigHandlerBean.<clinit>(RuleConfigHandlerBean.java:134) [</span><span style="font-size: 8pt;">beta</span><span style="font-size: 8pt;">-ejb.jar:4.2.2-b5]</span></p><p><span style="font-size: 8pt;">    at sun.misc.Unsafe.ensureClassInitialized(Native Method) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.reflect.Field.getFieldAccessor(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.reflect.Field.set(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.util.Reflections.set(Reflections.java:64) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.util.Reflections.setAndWrap(Reflections.java:106) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.Component.scanField(Component.java:839) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.Component.initMembers(Component.java:537) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.Component.<init>(Component.java:254) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.Component.<init>(Component.java:217) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.init.Initialization.addComponent(Initialization.java:974) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.init.Initialization.installComponents(Initialization.java:911) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.init.Initialization.init(Initialization.java:589) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) [jboss-seam.jar:2.0.3.CR1]</span></p><p><span style="font-size: 8pt;">    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]</span></p><p><span style="font-size: 8pt;">    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]</span></p><p><span style="font-size: 8pt;">    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]</span></p><p><span style="font-size: 8pt;">    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)</span></p><p><span style="font-size: 8pt;">    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)</span></p><p><span style="font-size: 8pt;">    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">Caused by: java.lang.NoClassDefFoundError: de/alpha/beta/model/tcws (wrong name: de/alpha/beta/model/TCWS)</span></p><p><span style="font-size: 8pt;">    at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.ClassLoader.defineClassCond(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.6.0_26]</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)</span></p><p><span style="font-size: 8pt;">    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The Drools are called from the beta-ejb.jar. The directorys in my EAR file are    lib,    META-INF,   <span style="font-size: 10pt;"> beta.war,    beta-ejb.jar,    beta-test-ejb.jar</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 10pt;">I´d like to know:</span></p><p><span style="font-size: 10pt;">1. Is it possible to use Drools 4.0.7 with JBoss 7?</span></p><p><span style="font-size: 10pt;">2. C</span><span style="font-size: 10pt;">an configure the path where the Drools lookup the classes?</span></p><p><span style="font-size: 10pt;">3. What the hell is wrong? It seems like the Drools tool can not find my classes, or am I wrong?</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I googled a time and found nothing. But I think these are easy questions for the JBoss/Drools masters in this community!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>With hope and regards,</p><p>Christian</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/737658#737658">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>