title: java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/ScriptUtils in osgi bundle
body: <pre><code>ScriptEngineManager manager = new ScriptEngineManager(null);
  ScriptEngine engine = manager.getEngineByName("nashorn");
  BundleContext context = FrameworkUtil.getBundle(FormulaImpl.class).getBundleContext();
  URL configURL = context.getBundle().getEntry("eval.txt");
  if (configURL != null) {
      InputStream input = null;
      try {
          input = configURL.openStream();
          BufferedReader reader = new BufferedReader(new InputStreamReader(input));
          StringBuilder out = new StringBuilder();
          String line;
          while ((line = reader.readLine()) != null) {
              out.append(line);
          }
          engine.eval(out.toString());
      } catch (Exception e) {
          throw new RuntimeException(e.getMessage());
      } finally {
          try {
              input.close();
          } catch (Exception e) {
              throw new RuntimeException(e.getMessage());
          }
      }
  }
  
  Object obj = engine.get("formulaColumn");
  </code></pre>
  
  <p>In this code, obj is getting as object array.
  I can not convert into object.
  In java 1.7 using Rhino object is getting.
  I tried with </p>
  
  <pre><code>Object obj = (Object)ScriptUtils.convert(engine.get("formulaColumn"), Object.class);
  </code></pre>
  
  <p>But No calssDef error showing in java 1.8</p>
  
  <p>I am using osgi. I exported jdk.nashorn.api.scripting.ScriptUtils  .
  From my jsfile i am returning an array.</p>