0

using MobileFirst Platform CLI version 7.1.0.00.20151227-1730 I have suddenly the following error when trying to push an update I made to an adapter:

    Preparing for push...
Verifying Server Configuration...
Runtime 'localMFP' will be used to push the project into.
[Error: 
BUILD FAILED
/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:497: com.worklight.upgrader.UpgradeEngineException: java.lang.NullPointerException
    at com.worklight.upgrader.WLUpgradeEngine.<init>(WLUpgradeEngine.java:142)
    at com.worklight.upgrader.WLUpgradeEngine.<init>(WLUpgradeEngine.java:147)
    at com.worklight.upgrader.ant.UpgraderTask.execute(UpgraderTask.java:100)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.NullPointerException
    at java.text.MessageFormat.applyPattern(MessageFormat.java:436)
    at java.text.MessageFormat.<init>(MessageFormat.java:362)
    at java.text.MessageFormat.format(MessageFormat.java:840)
    at com.worklight.upgrader.WLUpgradeEngine.findProjectVersion(WLUpgradeEngine.java:602)
    at com.worklight.upgrader.WLUpgradeEngine.<init>(WLUpgradeEngine.java:133)
    ... 18 more

Total time: 3 seconds
]
Error: Sorry an error has occurred. Please check the stack above for details.

I have tried to cleanup the project, remove what was already deployed, revert my changes to what I had when I succeeded to deploy, re-install mfp cli, but I still have the issue.

Any hint on what I could do to get rid of the exception?

Thanks!

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Etienne N
  • 31
  • 3

1 Answers1

0

The failure is coming from the upgrader code path, as if something is missing in the adapter files.

My suggestion is to create a new adapter and see that it gets deployed. Then, start adding back code. Maybe you will find the failing part.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • What I have done: create a new project, create the adapter again, then replace the adapter.xml and adapter JS files with the content of the one that was in the project who failed, and it works. This shows that the issue doesn't come from the adapter itself, but rather from the settings of the project... what do you suggest? – Etienne N Jan 27 '16 at 11:25