Skip to main content

Problem w/ adding to web project - NPE

9 replies [Last post]
zambizzi
Offline
Joined: 2005-08-19
Points: 0

I installed the netbeans module and when I add the jMaki framework to a web project it fails w/ this message:

<br />
java.lang.NullPointerException<br />
	at org.netbeans.modules.sun.jmaki.LibraryProvider.addStylizedJSP(LibraryProvider.java:327)<br />
	at org.netbeans.modules.sun.jmaki.LibraryProvider.extend(LibraryProvider.java:91)<br />
	at org.netbeans.modules.web.project.ui.customizer.WebProjectProperties.save(WebProjectProperties.java:365)<br />
	at org.netbeans.modules.web.project.ui.customizer.CustomizerProviderImpl$OptionListener.actionPerformed(CustomizerProviderImpl.java:313)<br />
	at org.netbeans.modules.project.uiapi.CustomizerDialog$OptionListener.actionPerformed(CustomizerDialog.java:162)<br />
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)<br />
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)<br />
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)<br />
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)<br />
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)<br />
	at java.awt.Component.processMouseEvent(Component.java:6038)<br />
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)<br />
	at java.awt.Component.processEvent(Component.java:5803)<br />
	at java.awt.Container.processEvent(Container.java:2058)<br />
	at java.awt.Component.dispatchEventImpl(Component.java:4410)<br />
	at java.awt.Container.dispatchEventImpl(Container.java:2116)<br />
	at java.awt.Component.dispatchEvent(Component.java:4240)<br />
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)<br />
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)<br />
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)<br />
	at java.awt.Container.dispatchEventImpl(Container.java:2102)<br />
	at java.awt.Window.dispatchEventImpl(Window.java:2429)<br />
	at java.awt.Component.dispatchEvent(Component.java:4240)<br />
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)<br />
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)<br />
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)<br />
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)<br />
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)<br />
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)<br />
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)<br />

I can drag widgets into a JSF page but also get an error about a missing template when I run the file.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ludo
Offline
Joined: 2003-06-10
Points: 0

The Ajax update center is now up to date...
So get the 1.6.1 version,
Thanks,
Ludo

zambizzi
Offline
Joined: 2005-08-19
Points: 0

I went to the Ajax update center, downloaded everything, restarted netbeans...and...

I removed jMaki from the enterprise web project that it was throwing the error on, re-added it...and get the same exact error.

I do not get this error on Ubuntu Linux using JDK 6 RC and NB 5.5. In fact, in enterprise or plain web projects I don't get this issue on Linux.

I do get this error on Windows XP w/ JDK 6 RC and NB 5.5, but only for this one project (unfortunately, the one I need it for.) On a new enterprise project it fails, on any new "plain" web project...I don't get the error.

Any other ideas?

ludo
Offline
Joined: 2003-06-10
Points: 0

Please, give the new exception... I guess if you have the new plugin, the line numbers changed a bit. Otherwise, it would mean you still have the previous plugin for some reason...Maybe installed as global and not in your user dir?

Or better, file a bug with the latest config+stack trace. I'll look into it asap,
Ludo

ludo
Offline
Joined: 2003-06-10
Points: 0

Also, I am not sure how you remove the jmaki from your project... To really do that:
you need also to remove the related entries in your web.xml if they have been added... Can you also check this?
Thanks,
Ludo

ludo
Offline
Joined: 2003-06-10
Points: 0

A fix is integrated, but I guess you do not have an index.jsp there...If you want to workaround without the fix, create a dummy index.jsp and add the framework...

zambizzi
Offline
Joined: 2005-08-19
Points: 0

You were correct, I was missing an index.jsp. Once I added that, removed, and re-added the jMaki framework to the project - everything works.

I guess the obvious fix is to create an index.jsp file if one doesn't exist when the framework is added?

Thanks for all the help, great module!!

carlavmott
Offline
Joined: 2005-02-10
Points: 0

I installed the lastest plugin to NetBeans 5.5 and didn't
see this problem. Do you have the latest release of the plugin and are you using NetBeans 5.5?

I'll try again just to verify.

Carla

zambizzi
Offline
Joined: 2005-08-19
Points: 0

Yep, nb 5.5 and I just downloaded the latest jMaki nb module before I posted here.

It fails for me in an enterprise web project but in a plain web project, it appears to work just fine.

I can't re-create this very large project I'd like to add jMaki to, however...so hopefully there's a way to correct it.

ludo
Offline
Joined: 2003-06-10
Points: 0

Can you check if you really have the version 1.6.1 on the plugin...It should be fixed there.
How did you install the plugin: via the ajax update center, or a nbm download? The AU may not contain the latest one...
For now, I recommend the download page.

Let me know,
Ludo