title: org.drools.RuntimeDroolsException: invalid package name
body: <p>I am a new bie to JBPM.</p>
  
  <p>I have created bpmn file with a start ,diverge and two scripts and a converge and endtask.</p>
  
  <p>MY code is</p>
  
  <pre><code>package com.sample;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import org.drools.KnowledgeBase;
  import org.drools.builder.KnowledgeBuilder;
  import org.drools.builder.KnowledgeBuilderFactory;
  import org.drools.builder.ResourceType;
  import org.drools.io.ResourceFactory;
  import org.drools.runtime.StatefulKnowledgeSession;
  import org.drools.runtime.process.ProcessInstance;
  
  
   public class ProcessTest {
  
  public static void main(String[] args){
  
      KnowledgeBuilder kbuilder =      KnowledgeBuilderFactory.newKnowledgeBuilder();
  
      kbuilder.add( ResourceFactory.newClassPathResource("sample.bpmn"),
  
                    ResourceType.BPMN2 );
      KnowledgeBase kbase = kbuilder.newKnowledgeBase();
  
      StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
  
      Map&lt;String,Object&gt; params=new HashMap&lt;String,Object&gt;();
  
      params.put("income", 1200);
  
  
      ProcessInstance processInstance = ksession.startProcess("com.sample.bpmn.hello",params);
  }
  
  }
  </code></pre>
  
  <p>But i am getting the following error </p>
  
  <pre><code>org.drools.RuntimeDroolsException: invalid package name
  at org.jbpm.compiler.ProcessBuilderImpl.buildProcess(ProcessBuilderImpl.java:175)
  at org.jbpm.compiler.ProcessBuilderImpl.addProcessFromXml(ProcessBuilderImpl.java:254)
  at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:564)
  at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:608)
  at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:37)
  at com.sample.ProcessTest.main(ProcessTest.java:23)
    [6,13]: [ERR 102] Line 6:13 mismatched input 'income' in rule "RuleFlow-    Split-com.sample.bpmn.hello-2-3-DROOLS_DEFAULT"
    [13,13]: [ERR 102] Line 13:13 mismatched input 'income' in rule "RuleFlow-  Split-com.sample.bpmn.hello-2-4-DROOLS_DEFAULT"
    [0,0]: Parser returned a null Package
  ProcessLoadError: unable to parse xml : Exception class    org.drools.RuntimeDroolsException : invalid package name
  Exception in thread "main" java.lang.IllegalArgumentException: Could not    parse knowledge.
      at    org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuilde    rImpl.java:67)
    at com.sample.ProcessTest.main(ProcessTest.java:26)
  </code></pre>
  
  <p>I have given package name com.sample in sample.bpmn</p>
  
  <p>My sample.bpmn file is </p>
  
  <p><a href="https://i.stack.imgur.com/WWGc7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WWGc7.png" alt="sample.bpmn"></a></p>