0

I have a simple hybrid App for Android phones. I have a skin folder created for Android tablets. I create an HTML file under the android.tablet but if this HTML file name match the same name of the HTML file under common folder then Eclipse shows a pop up error message that says: 'Building Workspace' has encountered a problem Errors occurred during the build. Java.Lang.NullPointerException

I have Eclipse Kepler SR1 64bits on OS X I get same error in Eclipse Juno on Win7.

This is the exception:

Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".

org.eclipse.core.runtime.CoreException: java.lang.NullPointerException at com.worklight.studio.plugin.utils.PluginUtils.toCoreException(PluginUtils.java:138) at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:112) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:69) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:80) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49) at com.worklight.studio.plugin.builders.WorklightProjectBuilder.incrementalBuild(WorklightProjectBuilder.java:73) at com.worklight.studio.plugin.builders.WorklightProjectBuilder.build(WorklightProjectBuilder.java:61) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: java.lang.NullPointerException at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:78) ... 19 more

Jorge
  • 25
  • 6
  • And your Worklight version is? – Idan Adar Feb 27 '14 at 00:33
  • Which edition of eclipse? In addition to the version, you also need to ensure you're using a supported edition: Eclipse IDE for Java EE Developers. See here for direct links to the supported versions and editions that work with Worklight: https://www.ibm.com/developerworks/mobile/worklight/download/ – Barbara Feb 27 '14 at 16:39
  • Worklight Version is 6.1 – Jorge Feb 27 '14 at 18:43
  • Eclipse is IDE for Java EE Developers – Jorge Feb 27 '14 at 20:46

1 Answers1

0

I cannot confirm this using Worklight 6.1.0:

  1. Created new project and application, "test"
  2. Added the Android environment
  3. Add a skin to the Android environment, "android.skin"
  4. Copied common\index.html to android.skin\

    No pop-up

  5. Changed the HTML a bit
  6. Run As > Run on Worklight Server

    No pop-up


Suggestions:

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I belive there must be something with the project or HTML itself. As soon as I copy common\index.html to android.tablet\ the auto build will kick off and give the error. This is what I see in the Eclipse Log: Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". org.eclipse.core.runtime.CoreException: java.lang.NullPointerException at com.worklight.studio.plugin.utils.PluginUtils.toCoreException(PluginUtils.java:138) at com.worklight.studio.pl – Jorge Feb 27 '14 at 20:48
  • org.eclipse.core.runtime.CoreException: java.lang.NullPointerException at com.worklight.studio.plugin.utils.PluginUtils.toCoreException(PluginUtils.java:138) at com.worklight.studio.plugin.builders.PreviewResourceDeltaVisitor.visit(PreviewResourceDeltaVisitor.java:112) at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:69) – Jorge Feb 27 '14 at 20:54
  • You could of course just add the exception to your question, you know. – Idan Adar Feb 27 '14 at 20:55
  • I have deleted the the wlBuildResources folder but same problem after I touch or update the HTML under android.tablet/ I have added the exception to the question.... – Jorge Feb 27 '14 at 21:21
  • You can also try re-installing the plug-in in a new copy of Eclipse and a fresh workspace. – Idan Adar Feb 28 '14 at 03:40
  • I have reinstalled Eclipse + Studio plug ins on OSX and still get the same error. I am not sure what could be wrong or unique with this particular project that makes Eclipse throw a Null Pointer... – Jorge Feb 28 '14 at 16:55