Error creating Hello World.

172 views
Skip to first unread message

Rasikh Mashhadi

unread,
Jul 27, 2014, 9:21:18 AM7/27/14
to codenameone...@googlegroups.com
I am on MAX OS X 10.9.4 and JDK 8.1

I installed intelliJ IDEA 13.1.4 CE and also install Codename One plugin.

Now when i create a new Project i am getting following error

Error opening resource editor
java
.lang.NullPointerException
    at java
.io.File.<init>(File.java:222)
    at com
.codename1.plugin.intellij.JavaProcess.getJavaHome(JavaProcess.java:149)
    at com
.codename1.plugin.intellij.JavaProcess.getJavaExe(JavaProcess.java:131)
    at com
.codename1.plugin.intellij.ResourceFile.openResourceEditor(ResourceFile.java:47)
    at com
.codename1.plugin.intellij.ResourceFile.create(ResourceFile.java:39)
    at com
.codename1.plugin.intellij.module.NewCodenameOneProject.createTypeSpecificFiles(NewCodenameOneProject.java:89)
    at com
.codename1.plugin.intellij.module.CodenameOneProjectBuilder.createProject(CodenameOneProjectBuilder.java:98)
    at com
.codename1.plugin.intellij.module.CodenameOneProjectBuilder$1$1.run(CodenameOneProjectBuilder.java:71)
    at com
.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984)
    at com
.codename1.plugin.intellij.module.CodenameOneProjectBuilder$1.run(CodenameOneProjectBuilder.java:68)
    at com
.intellij.ide.startup.impl.StartupManagerImpl$7.run(StartupManagerImpl.java:286)
    at com
.intellij.ide.startup.impl.StartupManagerImpl.runActivities(StartupManagerImpl.java:259)
    at com
.intellij.ide.startup.impl.StartupManagerImpl.access$100(StartupManagerImpl.java:52)
    at com
.intellij.ide.startup.impl.StartupManagerImpl$4.run(StartupManagerImpl.java:184)
    at com
.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:238)
    at com
.intellij.openapi.project.DumbServiceImpl.access$500(DumbServiceImpl.java:53)
    at com
.intellij.openapi.project.DumbServiceImpl$IndexUpdateRunnable$1$3.run(DumbServiceImpl.java:420)
    at java
.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java
.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java
.awt.EventQueue.access$400(EventQueue.java:82)
    at java
.awt.EventQueue$2.run(EventQueue.java:676)
    at java
.awt.EventQueue$2.run(EventQueue.java:674)
    at java
.security.AccessController.doPrivileged(Native Method)
    at java
.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java
.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at com
.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
    at com
.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
    at com
.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java
.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java
.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java
.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java
.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java
.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java
.awt.EventDispatchThread.run(EventDispatchThread.java:122)


also when i try to run this hello world programe i am getting following error.
java.io.IOException: /theme.res not found
    at com
.codename1.ui.util.Resources.open(Resources.java:715)
    at com
.codename1.ui.util.Resources.openLayered(Resources.java:683)
    at com
.codename1.ui.util.Resources.openLayered(Resources.java:647)
    at generated
.StateMachineBase.startApp(StateMachineBase.java:48)
    at generated
.StateMachineBase.<init>(StateMachineBase.java:28)
    at generated
.StateMachineBase.<init>(StateMachineBase.java:99)
    at userclasses
.StateMachine.<init>(StateMachine.java:16)
    at com
.mycompany.myapp.MyApplication.start(MyApplication.java:21)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:483)
    at com
.codename1.impl.javase.Executor$1.run(Executor.java:95)
    at com
.codename1.ui.Display.processSerialCalls(Display.java:1075)
    at com
.codename1.ui.Display.mainEDTLoop(Display.java:897)
    at com
.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com
.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
java
.lang.reflect.InvocationTargetException
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:483)
    at com
.codename1.impl.javase.Executor$1.run(Executor.java:95)
    at com
.codename1.ui.Display.processSerialCalls(Display.java:1075)
    at com
.codename1.ui.Display.mainEDTLoop(Display.java:897)
    at com
.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
    at com
.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.NullPointerException
    at generated
.StateMachineBase.initTheme(StateMachineBase.java:89)
    at generated
.StateMachineBase.startApp(StateMachineBase.java:52)
    at generated
.StateMachineBase.<init>(StateMachineBase.java:28)
    at generated
.StateMachineBase.<init>(StateMachineBase.java:99)
    at userclasses
.StateMachine.<init>(StateMachine.java:16)
    at com
.mycompany.myapp.MyApplication.start(MyApplication.java:21)
   
... 9 more




Shai Almog

unread,
Jul 27, 2014, 11:07:15 AM7/27/14
to codenameone...@googlegroups.com, rasikh....@gmail.com
There seems to be a regression with the latest version of IDEA where they removed the java.home value. As a workaround you can downgrade to 13.0.x or 12.x.

rasikh....@gmail.com

unread,
Jul 28, 2014, 11:16:02 AM7/28/14
to codenameone...@googlegroups.com, rasikh....@gmail.com
Thank you so much for a quick response. I will try that workaround.

keens...@gmail.com

unread,
Aug 10, 2014, 2:39:17 AM8/10/14
to codenameone...@googlegroups.com, rasikh....@gmail.com
Ugh - 13.1.4 here as well, same issue, all projects (I finally resorted to the most basic HelloWorld and found that I couldn't even build it out of the box!). Glad I finally found this here. How did you discover that that was the problem? I would like to track future releases of IDEA and be able to verify whether it is fixed or not as I would prefer to use that IDE over NetBeans stuff.

Thanks!

Shai Almog

unread,
Aug 10, 2014, 11:13:03 AM8/10/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com
We are on the IDEA forum and asked them regarding that issue. There was a suggestion made which we are looking into fixing.

sybe...@gmail.com

unread,
Aug 14, 2014, 4:20:52 AM8/14/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com
Hi Shai,

I am having this problem too. Just a couple of days ago found that I cannot neither send any build to your server nor refresh library. The error appears: The build.xml not found.
The IntelliJ log file has no errors.
But I am still able to run my existing project in the simulator.

I am running IntelliJ 13.1.4 on Windows 7x64

Any thoughts on that?

Kind regards,
Pavel

Shai Almog

unread,
Aug 14, 2014, 1:08:26 PM8/14/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
Currently you need to downgrade to 13.0 until we can figure a fix.

sybe...@gmail.com

unread,
Aug 18, 2014, 3:35:39 AM8/18/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
Downgraded to the Intellij 13.0.4 - same error: "File build.xml not found"


Shai Almog

unread,
Aug 18, 2014, 11:50:59 AM8/18/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
How did you install intellij? On which OS/JVM combination?
In the IDE log do you see a null pointer exception?

Shai Almog

unread,
Sep 7, 2014, 12:23:51 PM9/7/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
This should hopefully be resolved by the new 2.1.0 plugin, can someone in this thread confirm this (or inform us that its unresolved). Sorry for the delay on this, its been hectic around here...

keens...@gmail.com

unread,
Sep 18, 2014, 4:11:01 AM9/18/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
Appears to be working now with he 2.1.1 plugin and Idea 13.1.4b - thank you!

- Sean

Shai Almog

unread,
Sep 18, 2014, 9:43:05 AM9/18/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
Odd, I've installed IDEA 13.1 on a separate system to test this after I didn't get a response and I'm seeing issues.
Can anyone else confirm? Maybe its because I upgraded and didn't do a clean install?

kr0n...@gmail.com

unread,
Dec 25, 2014, 5:57:17 AM12/25/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com
Hello,

I'm using IntelliJ 14 on mac os x yosemite with codename one plugin version 2.1.3.

Error still appears. File "build.xml" not found.

How to fix this issue ?

Shai Almog

unread,
Dec 25, 2014, 10:00:16 AM12/25/14
to codenameone...@googlegroups.com, rasikh....@gmail.com, keens...@gmail.com, sybe...@gmail.com, kr0n...@gmail.com
Hi,
that is odd since other developers claim it was fixed.
Can you post your IntelliJ log to the issue https://code.google.com/p/codenameone/issues/detail?id=1242
Reply all
Reply to author
Forward
0 new messages