Friday Mar 06, 2009

Import Woes

I have seen a number of reports of this exception...

java.lang.IllegalStateException: Common server instance not found for [/opt/glassfish-v3-prelude-b28c/glassfish]deployer:gfv3:localhost:8080
        at org.netbeans.modules.glassfish.javaee.Hk2DeploymentManager.getServerInstance(Hk2DeploymentManager.java:476)
        at org.netbeans.modules.glassfish.javaee.Hk2StartServer.getCommonServerSupport(Hk2StartServer.java:106)
        at org.netbeans.modules.glassfish.javaee.Hk2StartServer.isRunning(Hk2StartServer.java:239)
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance$3.run(ServerInstance.java:794)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)

Many of them appear to be because the code that imports/upgrades the userdir from 6.5 to 6.7 misses a very important subdirectory, .netbeans/conf/GlassFish. I fixed the issue in the code, so it should be available in nightly builds of NetBeans 6.7 soon. If you run into the exception with builds younger than 7 March 2009, please let me know.

Friday Feb 20, 2009

Development builds get GlassFish v2.1 bundled

GlassFish v2.1 has been out for a little while and is now part of the development build bundles.

If you are using NetBeans 6.5, you can register a GlassFish v2.1 instance and it should work, but it is not a support combination. I may be able to slip a fix or two into the 6.5 patch releases, if folks run into a serious problem though...

Wednesday Feb 11, 2009

6.7 and GlassFish v3

In yesterday's entry, I talked about some new features in the GlassFish integration module for NetBeans 6.7. I will be honest... they were a bit underwhelming.

In this entry, I want to introduce an early access feature: Support for GlassFish v3!

Since this is early access, I have disabled v3 support, by default. If you want to see the v3 support, you will need to apply a special flag to the command-line used to start the IDE. The flag is:

-J-Dorg.glassfish.v3.enableExperimentalFeatures=true

Once the flag is set, you will start to see 'GlassFish v3' appear in the UI. It will be near/next to 'GlassFish v3 Prelude', in many cases.

Let's take a look at some of the changes.

  1. v3 Appears in the Servers List

    This is pretty self explanatory...

  2. Download Now gets the latest promoted build

    The bits come from http://download.java.net/glassfish/v3/promoted/latest-glassfish.zip. Since this URL always points to the latest promoted build, you can use the 'Download Now' button to keep up with changes in v3 very easily. If you are registering a GlassFish v3 Prelude instance, the 'Download Now' button will download the latest release of GlassFish v3 Prelude... just like you should expect.

  3. Masquerading is a not allowed

    If you have chosen to register v3, you cannot point at a v3 Prelude install. If you have chosen to register v3 Prelude, you cannot point at a v3 install. While their names are similar, the two servers are radically different.

  4. More Java EE support

    GlassFish v3 will eventually support the full spectrum of Java EE projects and the integration allows you to create projects that target a v3 server instance. Pay special attention to the word eventually in the previous sentence. The latest builds of GlassFish v3 are still not ready to support all of Java EE 5, so you will run into bugs while developing and deploying Java EE projects onto v3. Please be patient.


    Create an EJB Module project that targets GlassFish v3

    Create an Application Client project that targets GlassFish v3

    Create an Enterprise Application project that targets GlassFish v3
  5. Autoregistration of GlassFish v3

    To autoregister a GlassFish v3 server instance, you can set the flag:

    -J-Dorg.glassfish.v3ee6.installRoot=<INSTALL-ROOT>
    If you do set this flag, you do not need to set the enableExperimentalFeatures flag, but you can if you want to....

One important thing to note about GlassFish v3 that is different from Glassfish v3 Prelude is the JDK requirements. GlassFish v3 Prelude could run under JDK 5. NetBeans 6.7 will also be able to run under JDK 5. GlassFish v3 requires JDK 6... so you may run into this error message when you attempt to start a registered v3 instance.


Error dialog

You can set the 'Java Executable' instance property to work-around this issue.

One final note: the NetBeans support for v3 is experimental and v3 is not even feature complete at this point. This is definitely the 'bleeding edge'. You will run into bugs. Expect them. When you hit one, please file it, but please include some hint that you are running with experimental features enabled.

Update: Account for name change

Monday Feb 09, 2009

SIP development modules via Auto-update

The SIP application development and testing modules that ship as part of the GlassFish Communication AS v1.5 (SailFin) have been put on the NetBeans 6.5 Beta update center.

Use the Plugins item of the Tools menu to open up the Plugin Manager dialog. Select the two check boxes and press the install button to install these plugins.

Follow this link to see previous entries about the SIP Agent.

Follow this link to see previous entries about SIP Projects.

Thursday Feb 05, 2009

NetBeans, JDK Update 12 and Server Registration Woes!

If you have seen a stacktrace like

java.lang.NullPointerException
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isServerValid(ServerWizardVisual.java:155)
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.isValid(ServerWizardVisual.java:146)
        at java.awt.Component.invalidateIfValid(Component.java:2711)
        at java.awt.Component.setLocale(Component.java:1780)
        at javax.swing.JComponent.(JComponent.java:600)
        at javax.swing.JPanel.(JPanel.java:82)
        at javax.swing.JPanel.(JPanel.java:109)
        at javax.swing.JPanel.(JPanel.java:117)
        at org.netbeans.modules.server.ui.wizard.ServerWizardVisual.(ServerWizardVisual.java:83)
        at org.netbeans.modules.server.ui.wizard.ServerWizardPanel.getComponent(ServerWizardPanel.java:68)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard$AddServerInstanceWizardIterator.initialize(AddServerInstanceWizard.java:270)
        at org.openide.WizardDescriptor.callInitialize(WizardDescriptor.java:1326)
        at org.openide.WizardDescriptor.(WizardDescriptor.java:410)
        at org.openide.WizardDescriptor.(WizardDescriptor.java:419)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.(AddServerInstanceWizard.java:103)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.(AddServerInstanceWizard.java:90)
        at org.netbeans.modules.server.ui.wizard.AddServerInstanceWizard.showAddServerInstanceWizard(AddServerInstanceWizard.java:109)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel.addServer(ServerManagerPanel.java:335)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel.access$000(ServerManagerPanel.java:84)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$.actionPerformed(ServerManagerPanel.java:174)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:253)
        at java.awt.Component.processMouseEvent(Component.java:6218)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3294)
        at java.awt.Component.processEvent(Component.java:5983)
        at java.awt.Container.processEvent(Container.java:2046)
        at java.awt.Component.dispatchEventImpl(Component.java:4578)
        at java.awt.Container.dispatchEventImpl(Container.java:2104)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.LightweightDispatcher.retargetMouseEvent(LightweightDispatcher.java:4565)
        at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4228)
        at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:4158)
        at java.awt.Container.dispatchEventImpl(Container.java:2090)
        at java.awt.Window.dispatchEventImpl(Window.java:2559)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$.run(Dialog.java:1072)
        at java.awt.Dialog$.run(Dialog.java:1126)
        at java.security.AccessController.doPrivileged(AccessController.java:0)
        at java.awt.Dialog.show(Dialog.java:1124)
        at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:835)
        at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:869)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:857)
        at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:108)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1355)
        at org.openide.util.Mutex.readAccess(Mutex.java:268)
        at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:842)
        at java.awt.Component.show(Component.java:1483)
        at java.awt.Component.setVisible(Component.java:1435)
        at java.awt.Window.setVisible(Window.java:875)
        at java.awt.Dialog.setVisible(Dialog.java:1011)
        at org.netbeans.api.server.CommonServerUIs.showCustomizer(CommonServerUIs.java:90)
        at org.netbeans.modules.server.ui.manager.ServerManagerAction.performAction(ServerManagerAction.java:61)
        at org.openide.util.actions.CallableSystemAction$.run(CallableSystemAction.java:118)
        at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77)
        at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:824)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:868)
        at java.awt.Component.processMouseEvent(Component.java:6218)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3294)
        at java.awt.Component.processEvent(Component.java:5983)
        at java.awt.Container.processEvent(Container.java:2046)
        at java.awt.Component.dispatchEventImpl(Component.java:4578)
        at java.awt.Container.dispatchEventImpl(Container.java:2104)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.LightweightDispatcher.retargetMouseEvent(LightweightDispatcher.java:4565)
        at java.awt.LightweightDispatcher.processMouseEvent(LightweightDispatcher.java:4228)
        at java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:4158)
        at java.awt.Container.dispatchEventImpl(Container.java:2090)
        at java.awt.Window.dispatchEventImpl(Window.java:2559)
        at java.awt.Component.dispatchEvent(Component.java:4404)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)

You have probably run into issue 150223.

I blew it. When I first checked-in the fix for this issue, I was under the impression that it was only going to happen to folks running the IDE under JDK 7... But it turns out that the changes associated with JDK 7 that started triggering this issue back in October worked their way into JDK 6 update 12.

So, if you are runnning into this stack trace, please try running the IDE under JDK 6 update 10 (which is what I have been using successfully on Solaris for some time) or update 11 (which doesn't seem to be triggering this issue, either).

See this FAQ entry about selecting the JDK used for the IDE process.

I am hopeful that the fix will get rolled into NetBeans 6.5 patch 3.

Update: here is a link to get JDK 6 Update 11

Update2: This issue has been resolved. Read this entry for more info.

Tuesday Dec 16, 2008

SIP Servlet Development Support and 6.5

Some folks may have read about the work done to create a development environment for SIP Servlet Applications based on NetBeans 6.1.

Now that 6.5 is out, you may have noticed that the bits aren't available on the 6.5 beta update center. The primary reason they aren't there is because I haven't asked that they be pushed into that update center. You can install the NBMs that support SIP Servlet application development,

by installing them from the lib/tools/netbeans subdirectory of a SailFin installation. You can also download the plugin from the 6.1 Beta update center into 6.5, but I do not recommend that. Those NBMs do not have the 'final' JSR289 apis and some other bug fixes.

I will request that the nbms be staged in the 6.5 Beta update center after the SailFin project ships their 1.5 release.

About


Vince Kraemer writes the entries in this blog.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News
Blogroll

No bookmarks in folder

automarks