Thursday, January 14, 2010

Error using upgrade assistant in JDeveloper 11.1.1.2.0

Today I was running the upgrade assistant in  JDeveloper 11.1.1.2.0 to migrate an ear file to see if we can get a quick deployment on the WLServer.
But then I suddenly received  the following error:


31:57 WARNING - ***
[ERROR] Action in Web Service Artifact Generation 10.1.3javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException (<Unknown Source>#10)    at com.sun.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:41)    at oracle.migration.action.ScriptBody.execute(ScriptBody.java:122)    at oracle.migration.action.Action.eval(Action.java:210)    at oracle.migration.action.Action.execute(Action.java:176)    at oracle.migration.action.Action.doAction(Action.java:227)    at oracle.migration.action.Action.doFinally(Action.java:231)    at oracle.migration.action.Action.execute(Action.java:188)    at oracle.migration.rule.MigrationRule.performAction(MigrationRule.java:808)    at oracle.migration.update.Updator$ActionContent.doUpdate(Updator.java:100)    at oracle.migration.update.Updator.doUpdate(Updator.java:110)    at oracle.migration.rule.MigrationRule.doUpdate(MigrationRule.java:788)    at oracle.migration.rule.MigrationRule.doUpdate(MigrationRule.java:781)    at oracle.migration.Migrator.generateArtifacts(Migrator.java:762)    at oracle.migration.MigrationPlan.doMigration(MigrationPlan.java:511)    at oracle.migration.MigrationPlan.execute(MigrationPlan.java:438)    at oracle.weblogic.jdeveloper.migration.io.WLMigrationManager.executeArchiveFindings(WLMigrationManager.java:288)    at oracle.weblogic.jdeveloper.migration.addin.application.ArchiveMigrationContext.regenerateFindings(ArchiveMigrationContext.java:85)    at oracle.weblogic.jdeveloper.migration.addin.application.ArchiveMigrationContext.continueUpgrade(ArchiveMigrationContext.java:131)    at oracle.weblogic.jdeveloper.migration.addin.command.ContinueUpgradeCommand.run(ContinueUpgradeCommand.java:89)    at oracle.toplink.workbench.utility.command.CommandWorker.run(CommandWorker.java:61)Caused by: sun.org.mozilla.javascript.internal.WrappedException: Wrapped java.lang.NullPointerException (<Unknown Source>#10)    at sun.org.mozilla.javascript.internal.Context.throwAsScriptRuntimeEx(Context.java:1699)    at sun.org.mozilla.javascript.internal.MemberBox.invoke(MemberBox.java:147)    at sun.org.mozilla.javascript.internal.NativeJavaMethod.call(NativeJavaMethod.java:190)    at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:3073)    at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:2239)    at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:138)    at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:323)    at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:2747)    at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(InterpretedFunction.java:149)    at com.sun.script.javascript.RhinoCompiledScript.eval(RhinoCompiledScript.java:37)    ... 19 moreCaused by: java.lang.NullPointerException    at java.io.File.<init>(File.java:222)    at oracle.migration.ws.config.cli.SmartUpgradeEntry.createContinuationStateFile(SmartUpgradeEntry.java:285)    at oracle.migration.ws.config.cli.SmartUpgradeEntry.upgrade(SmartUpgradeEntry.java:174)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)    at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244)    at sun.org.mozilla.javascript.internal.MemberBox.invoke(MemberBox.java:132)    ... 27 more[INFO]: script file:
null
script line:

   extraArgs=migrator.getLocator("_cliArgs")
   if (extraArgs==null) {
          map = null;
   } else {
          leaves=extraArgs.getLeafMigrationElements(rule)
          migEl=leaves.get(0)  
          map=migEl.getArtifact()    
   }
          Packages.oracle.migration.ws.config.cli.SmartUpgradeEntry.upgrade(rule, migrationElement, map, targetVersion)
      ot=Packages.oracle.migration.ws.config.cli.SmartUpgradeEntry.getOutString();
          migrationElement.setAttribute("ws.upgrade.out", ot)

 
script code:
null


I did not see this in previous migrations.........

After a while of debugging and looking for certain errors finally it came to mind that spaces in paths of imported files could be disastrous.

The error changed a bit, now it could find de ear but still ended in a nullpointer exception :-(
The fix for this that the whole workspace and project also had a space in the path.
After changing this the upgrade went through and we could continue looking into the migration of all parts for the ear......