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 207695 - ArrayStoreException: java.net.URL
Summary: ArrayStoreException: java.net.URL
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB Project (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-01-24 19:52 UTC by dienert
Modified: 2012-02-13 12:37 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182506


Attachments
stacktrace (1.12 KB, text/plain)
2012-01-24 19:52 UTC, dienert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dienert 2012-01-24 19:52:15 UTC
Build: NetBeans IDE 7.1 (Build 201112071828)
VM: Java HotSpot(TM) Client VM, 22.0-b10, Java(TM) SE Runtime Environment, 1.7.0_02-b13
OS: Linux

User Comments:
dienert: I can't open an EJB project from a previos netbeans version

GUEST: Trying to open an ejb module that i had in my project.

GUEST: Opening a ejb Project.
Works fine with Netbeans < 7.1

GUEST: Opening an EJB project

GUEST: Creting a new project with existing J2EE EJB source. 

From messages.log:

SEVERE:  Cannot lock read-only file /opt/callsource/perforce/head/core/core/EJB/ejb-jar.xml.

msg
Caused: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot lock read-only file /opt/callsource/perforce/head/core/core/
EJB/ejb-jar.xml.
        at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:118)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:350)
        at org.openide.loaders.MultiDataObject$Entry.takeLock(MultiDataObject.java:1352)
        at org.netbeans.modules.xml.multiview.XmlMultiViewEditorSupport$XmlEnv.takeLock(XmlMultiViewEditorSupport.java:560)
[catch] at org.netbeans.modules.xml.multiview.XmlMultiViewDataObject$DataCache.saveData(XmlMultiViewDataObject.java:486)
        at org.netbeans.modules.xml.multiview.XmlMultiViewDataObject$DataCache.setData(XmlMultiViewDataObject.java:452)
        at org.netbeans.mod

GUEST: Trying to open a JEE5 ejb module

GUEST: Trying to open Java EE 5 (glassfish 2) EJB module.

GUEST: open an existing project




Stacktrace: 
java.lang.ArrayStoreException: java.net.URL
   at java.util.LinkedList.toArray(LinkedList.java:1090)
   at org.netbeans.modules.j2ee.ejbjarproject.EjbJarProject$ProjectOpenedHookImpl.projectOpened(EjbJarProject.java:788)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:84)
   at org.netbeans.spi.project.ui.support.UILookupMergerSupport$OpenHookImpl.projectOpened(UILookupMergerSupport.java:196)
   at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:84)
   at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:1127)
Comment 1 dienert 2012-01-24 19:52:18 UTC
Created attachment 115203 [details]
stacktrace
Comment 2 Martin Fousek 2012-01-25 08:03:23 UTC
Looks like regression after issue #196455. I would highly recommend to approve that into 7.1.1 patch since the code change is minimal (no rist at all) and the impact of this issue is really big - everybody who has set lib.dir property for his EJB project (and at least one library in it) get this exception by opening the project.
Comment 3 Martin Fousek 2012-01-25 08:13:19 UTC
David, I fixed it since the change should be trivial, to speed up the process of getting that fix for verification and consequently into the patches branch.

web-main #50a47bef42ba
Comment 4 David Konecny 2012-01-25 22:01:43 UTC
Thanks Martin. This should go into a patch release.

To reproduce the problem create a new EJB Project with a dedicated "Libraries Folder" and then add a library to project. Reopening such project will always throw this exception.

It also means that any user with an EJB project with Libraries folder and non-empty list of project libraries is impacted.

The fix is safe - it removes unneeded code. Consider it reviewed from me.
Comment 5 Martin Fousek 2012-01-26 06:14:15 UTC
Thanks David for your review. I'll transplant the fix into the branch once will be verified in trunk.
Comment 6 Quality Engineering 2012-01-26 16:11:04 UTC
Integrated into 'main-golden', will be available in build *201201260600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/50a47bef42ba
User: Martin Fousek <marfous@netbeans.org>
Log: #207695 - ArrayStoreException: java.net.URL
Comment 7 dienert 2012-01-26 19:20:05 UTC
Problem solved, thanks!
Comment 8 Martin Fousek 2012-01-27 09:03:20 UTC
Dienert you should have it fixed in NB7.1 once 7.1.1 patch will be available.

Transplanted into release71_fixes branch of releases repository:

Summary:   #207695 - ArrayStoreException: java.net.URL
Changeset: releases #c275338f6c1d

Summary:   updated spec. version, long description after integration of #207695
Changeset: releases #b587a67148b4
Comment 9 dienert 2012-01-30 11:47:46 UTC
Yes, I have downloaded the dev build 201201260600.