This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192633 - Cannot register Jetty for Java Web project
Summary: Cannot register Jetty for Java Web project
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Jetty (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 194888 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-29 12:10 UTC by tssk
Modified: 2011-02-17 11:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tssk 2010-11-29 12:10:45 UTC
Hello I tried the Jetty plugin. I can register and control server just fine,
but when I try to create Java Web project with the server I receive following
exception:

java.lang.ArrayIndexOutOfBoundsException: 0
    at
org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.extractPlatformLibrariesRoot(J2EEProjectProperties.java:384)
    at
org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.setServerProperties(J2EEProjectProperties.java:163)
    at
org.netbeans.modules.web.project.api.WebProjectUtilities.setupProject(WebProjectUtilities.java:749)
    at
org.netbeans.modules.web.project.api.WebProjectUtilities.importProjectImpl(WebProjectUtilities.java:481)
    at
org.netbeans.modules.web.project.api.WebProjectUtilities.access$200(WebProjectUtilities.java:126)
    at
org.netbeans.modules.web.project.api.WebProjectUtilities$3.run(WebProjectUtilities.java:449)
    at org.openide.filesystems.EventControl.runAtomicAction(Unknown Source)
    at org.openide.filesystems.FileSystem.runAtomicAction(Unknown Source)
    at
org.netbeans.modules.web.project.api.WebProjectUtilities.importProject(WebProjectUtilities.java:447)
    at
org.netbeans.modules.web.project.ui.wizards.ImportWebProjectWizardIterator.instantiate(ImportWebProjectWizardIterator.java:202)
    at
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(Unknown
Source)
    at org.openide.loaders.TemplateWizard.handleInstantiate(Unknown Source)
    at org.openide.loaders.TemplateWizard.instantiateNewObjects(Unknown Source)
    at org.openide.loaders.TemplateWizardIterImpl.instantiate(Unknown Source)
    at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(Unknown
Source)
    at org.openide.WizardDescriptor.callInstantiateOpen(Unknown Source)
    at org.openide.WizardDescriptor.callInstantiate(Unknown Source)
    at org.openide.WizardDescriptor.access$1700(Unknown Source)
    at org.openide.WizardDescriptor$Listener$2$1.run(Unknown Source)
    at org.openide.util.RequestProcessor$Task.run(Unknown Source)
[catch] at org.openide.util.RequestProcessor$Processor.run(Unknown Source)

I believe it is simillar to this problem -
http://forums.netbeans.org/topic32795.html

It would be great if somebody understands what is the problem and could repair
the plugin.

Thanks
Comment 1 Emperorlou 2010-12-13 20:45:00 UTC
+1 vote to fix this
Comment 2 Petr Hejl 2011-01-03 09:54:44 UTC
Should not happen with 7.0. Please, test it.
Comment 3 chrisebejermt 2011-01-30 22:23:04 UTC
Hi all, 

I tried the Jetty Netbeans Plugin version with Netbeans 7.0 and I'm still getting the same error -> java.lang.ArrayIndexOutOfBoundsException: 0

Any chance this problem to be fixed.

Same problem experienced with Netbeans 6.9.1 and 6.9 with the Jetty Netbeans Plugin version 1.0 & version 1.1
Comment 4 Petr Hejl 2011-02-09 15:03:37 UTC
I'm not able to reproduce in nb7 dev. Please attach the uptodate stacktrace if it happens in nb7 dev build.
Comment 5 chrisebejermt 2011-02-14 09:21:18 UTC
Hi Petr,

Thank's for your reply. I would be more then happy to paste the uptodate stack trace with this error. But I do not know how to obtain the stack trace error from netbeans when this error is occurring. Can you please provide some steps, or a link with some how-to.

Regards

Chris
Comment 6 Petr Hejl 2011-02-14 09:37:31 UTC
If the exception really appears it should be visible in dialog or in the IDE log ($HOME/.netbeans/version/var/log).

Please do not reopen issue unless it is reproducible in Netbeans 7 dev.
Comment 7 chrisebejermt 2011-02-14 13:34:01 UTC
Hi Petr,

Below please find the stack trace as requested.

I downloaded Netbeans 7.0 Beta again today. And I'm using the jetty plugin 1.1 downloaded from http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/extra/org-netbeans-modules-j2ee-jetty.nbm

I'm using Linux Ubuntu 10.10, Java JDK 6U22

I hope this could be of any help

Chris

java.lang.ArrayIndexOutOfBoundsException: 0
	at org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.extractPlatformLibrariesRootHeuristic(J2EEProjectProperties.java:459)
	at org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.extractPlatformLibrariesRoot(J2EEProjectProperties.java:430)
	at org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.setServerProperties(J2EEProjectProperties.java:177)
	at org.netbeans.modules.j2ee.common.project.ui.J2EEProjectProperties.setServerProperties(J2EEProjectProperties.java:143)
	at org.netbeans.modules.web.project.api.WebProjectUtilities.setupProject(WebProjectUtilities.java:749)
	at org.netbeans.modules.web.project.api.WebProjectUtilities.createProjectImpl(WebProjectUtilities.java:220)
	at org.netbeans.modules.web.project.api.WebProjectUtilities.access$000(WebProjectUtilities.java:126)
	at org.netbeans.modules.web.project.api.WebProjectUtilities$1.run(WebProjectUtilities.java:193)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:125)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:566)
	at org.netbeans.modules.web.project.api.WebProjectUtilities.createProject(WebProjectUtilities.java:191)
	at org.netbeans.modules.web.project.ui.wizards.NewWebProjectWizardIterator.instantiate(NewWebProjectWizardIterator.java:156)
	at org.netbeans.modules.ide.ergonomics.newproject.FeatureOnDemandWizardIterator.instantiate(FeatureOnDemandWizardIterator.java:189)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1019)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:256)
	at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:168)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1548)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1505)
	at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:137)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2076)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:19
Comment 8 Petr Hejl 2011-02-14 13:39:52 UTC
Please use development build not beta. I still believe this can't happen in extractPlatformLibrariesRootHeuristic due to this:

        if (j2eePlatform.getPlatformRoots() == null || j2eePlatform.getPlatformRoots().length == 0) {
            return null;
        }
Comment 9 chrisebejermt 2011-02-14 14:32:20 UTC
Hi Petr,

In Netbeans 7 Dev 20110210500 everything worked fine. 

Sorry for the reopening this issue.

Just to confirm, that once Netbeans 7 will be Release this bug fix will be included correct?

Thanks for your efficient time and support. Apologise once again

Chris
Comment 10 Petr Hejl 2011-02-14 14:39:18 UTC
(In reply to comment #9)
> Hi Petr,
> 
> In Netbeans 7 Dev 20110210500 everything worked fine. 
Great.
 
> Sorry for the reopening this issue.
It's ok ;)

> Just to confirm, that once Netbeans 7 will be Release this bug fix will be
> included correct?
Yes.
 
> Thanks for your efficient time and support. Apologise once again
> 
> Chris
Comment 11 Petr Hejl 2011-02-17 11:55:38 UTC
*** Bug 194888 has been marked as a duplicate of this bug. ***