6 Replies Latest reply on Aug 29, 2011 9:16 AM by Chris Nash

    Error debugging on clean install

    Chris Nash Newbie



      I've installed jBPM5.1 on a bare OS: Windows Server 2003. It had nothing else installed on it previously. I installed the latest version of the Java JDK and Ant and set them up appropriately (JAVA_HOME, ANT_HOME, both \bins in the Path). I ran ant install.demo.


      So far so good.


      In Eclipse, I tried to debug the first sample app: evaluation | ProcessTest.java. I got this error:


      org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'

          at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:277)

          at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:262)

          at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:175)

          at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:153)

          at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:254)

          at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:182)

          at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)

          at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)

          at com.sample.ProcessTest.readKnowledgeBase(ProcessTest.java:40)

          at com.sample.ProcessTest.main(ProcessTest.java:24)

      Caused by: org.drools.RuntimeDroolsException: value '1.7' is not a valid language level

          at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.getDefaultLanguageLevel(JavaDialectConfiguration.java:161)

          at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)

          at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:273)



      Obviously there's more, but that's all my Console pane would show.


      Anyone know what's going on? What I'm possibly missing?


      Curious: It looks like the root of the problem is "org.drools.RuntimeDroolsException: value '1.7' is not a valid language level", but I doubt Drools would refuse to run on a newer version of the JDK.


      Thanks in advance for any help!

        • 1. Re: Error debugging on clean install
          Esteban Aliverti Master

          Java 1.7 "support" was added on August the 2nd: https://github.com/droolsjbpm/drools/commit/bc259b264a5a088d7704ba319014ce4838cb382e

          The only modification was to add 1.7 to the list of allowed Java versions

          If you want to use java 1.7, then you will need to use the latest snapshot of drools. You can also modify JavaDialectConfiguration.java and EclipseJavaCompilerSettings.java by hand.

          1 of 1 people found this helpful
          • 2. Re: Error debugging on clean install
            Chris Nash Newbie

            Thanks, Esteban. I moved everything to point to a Java 1.6 install, and that allows me to debug the sample app. However, now I get another error:


            SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

            SLF4J: Defaulting to no-operation (NOP) logger implementation

            SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

            java.lang.IllegalArgumentException: Could not connect task client

                at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.connect(WSHumanTaskHandler.java:64)

                at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.executeWorkItem(WSHumanTaskHandler.java:89)

                at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)

                at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)

                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)

                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)

                at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)

                at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)

                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

                at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)

                at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)

                at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:302)

                at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:154)

                at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:124)

                at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1095)

                at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:306)

                at com.sample.ProcessTest.main(ProcessTest.java:32)


            I think the top 3 lines are the key. I looked up the URL it mentioned and installed one of the jars in the CLASSPATH as it says to do, but that didn't help. Is there any direction on what I should do from here? Thanks again!

            • 3. Re: Error debugging on clean install
              Chris Melas Apprentice


              The first three lines just notify that there is no binding for sl4j.

              I would focus on this "java.lang.IllegalArgumentException: Could not connect task client".... have you started the human task service??

              • 4. Re: Error debugging on clean install
                Chris Nash Newbie

                Yes, but it errors out (so it doesn't start). I get this:



                    [javac] C:\jbpm-installer\build.xml:500: warning: 'includeantruntime' was no

                t set, defaulting to build.sysclasspath=last; set to false for repeatable builds

                     [java] java.lang.UnsupportedClassVersionError: org/jbpm/DemoTaskService : U

                nsupported major.minor version 51.0

                     [java]     at java.lang.ClassLoader.defineClass1(Native Method)

                     [java]     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

                     [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

                     [java]     at java.security.SecureClassLoader.defineClass(SecureClassLoader


                     [java]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

                     [java]     at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

                     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

                     [java]     at java.security.AccessController.doPrivileged(Native Method)

                     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                     [java] Could not find the main class: org.jbpm.DemoTaskService.  Program wi

                ll exit.

                     [java] Exception in thread "main"

                     [java] Java Result: 1


                Now it apparently doesn't like the Java minor version I'm using. I really don't want to have to regress to Java 1.5 if I don't have to. Why is jBPM so picky about the Java version numbers? Aren't they all backwards compatible? What's the latest version I can get away with? Thanks again!

                • 5. Re: Error debugging on clean install
                  Chris Melas Apprentice


                  The human task is run from the compiled sources that come within the installation. So i think you have to make sure that whatever jdk is used to compile the sources (the compilation takes place when you run target start.human.task check it out in the build.xml, task javac) the same or higher version of jre must run the classes (backward compatibility). There might be a conflict or mix up with the JREs / JDKs you have installed. If that is the case I would advice to uninstall them all and just install one version, if it is possible.

                  1 of 1 people found this helpful
                  • 6. Re: Error debugging on clean install
                    Chris Nash Newbie

                    I removed JDK 1.7 from the system, but that didn't help. I then removed the jbpm-install from my system and re-installed it. I didn't notice before, but, like you said, the first time you run "ant start.demo", the script compiles from Java files and use them on subsequent runs. So, on my system, it had compiled the sources with 1.7, but afterwards it wouldn't run them on JDK 1.6. Removing and reinstalling jbpm-install and re-running with just JDK 1.6 fixed the problem.


                    Thanks for all the help.