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 220322 - IndexOutOfBoundsException at org.netbeans.modules.schema2beans.BeanProp.checkParams
Summary: IndexOutOfBoundsException at org.netbeans.modules.schema2beans.BeanProp.check...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 220946 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-17 19:05 UTC by Exceptions Reporter
Modified: 2015-04-27 09:13 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 193683


Attachments
stacktrace (5.41 KB, text/plain)
2012-10-17 19:05 UTC, Exceptions Reporter
Details
stacktrace (5.46 KB, text/plain)
2012-12-14 18:50 UTC, Sergey Petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-10-17 19:05:53 UTC
This bug was originally marked as duplicate of bug 152630, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 Beta (Build 201210011125)
VM: OpenJDK 64-Bit Server VM, 23.2-b09, OpenJDK Runtime Environment, 1.7.0_07-b30
OS: Linux

User Comments:
GUEST: I pasted a String into the persistence.xml form field: Persistence Unit Name:




Stacktrace: 
java.lang.IndexOutOfBoundsException
   at org.netbeans.modules.schema2beans.BeanProp.checkParams(BeanProp.java:912)
   at org.netbeans.modules.schema2beans.BeanProp.setAttributeValue(BeanProp.java:1270)
   at org.netbeans.modules.schema2beans.BaseBean.setAttributeValue(BaseBean.java:671)
   at org.netbeans.modules.j2ee.persistence.dd.persistence.model_1_0.PersistenceUnit.setName(PersistenceUnit.java:104)
   at org.netbeans.modules.j2ee.persistence.unit.PersistenceUnitPanel.setValue(PersistenceUnitPanel.java:426)
   at org.netbeans.modules.xml.multiview.ui.SectionInnerPanel$TextListener.update(SectionInnerPanel.java:344)
Comment 1 Exceptions Reporter 2012-10-17 19:05:56 UTC
Created attachment 126111 [details]
stacktrace
Comment 2 Petr Hejl 2012-11-07 15:28:59 UTC
*** Bug 220946 has been marked as a duplicate of this bug. ***
Comment 3 Petr Jiricka 2012-12-14 14:28:50 UTC
Sergey, can you please investigate as the owner of Persistence? I am not sure if there are specific steps to reproduce. Thanks.
Comment 4 Sergey Petrov 2012-12-14 15:34:42 UTC
I should try to handle incorrect values
Comment 5 Sergey Petrov 2012-12-14 18:50:18 UTC
Created attachment 129392 [details]
stacktrace

In design view for persistence.xml
select second half of pu name
press ctrl-x
press ctrl-z
press ctrl-v
got exception

there may be two issues, first - after ctrl-z source is reverted but design remains
second - exception in s2b
Comment 6 Marian Mirilovic 2015-02-04 10:21:16 UTC
131 duplicates -> P2
Comment 7 Petr Hejl 2015-04-23 10:32:23 UTC
(In reply to Sergey Petrov from comment #5)
> Created attachment 129392 [details]
> stacktrace
> 
> In design view for persistence.xml
> select second half of pu name
> press ctrl-x
> press ctrl-z
> press ctrl-v
> got exception
> 
> there may be two issues, first - after ctrl-z source is reverted but design
> remains
> second - exception in s2b

I can't reproduce the issue this way so far.
Comment 8 Petr Hejl 2015-04-23 14:14:48 UTC
Ok in build from 2014-07-30 I was able to reproduce it this way:

In design view for persistence.xml
select second half of pu name
press ctrl-x
press ctrl-s
press ctrl-z
press ctrl-s
press ctrl-v
press ctrl-s
got exception

I'll try the dev build again.
Comment 9 Petr Hejl 2015-04-23 14:40:12 UTC
Reproducible this way even in dev build.
Comment 10 Petr Hejl 2015-04-24 16:41:40 UTC
This might be a fix - web-main e0ff4afdc58c. I need to double check as the multiview code is very complex.
Comment 11 Petr Hejl 2015-04-27 09:13:51 UTC
I've tried different test cases and it seems to be working ok.