Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 232284 - IndexOutOfBoundsException: start < 0 (-1 < 0)
IndexOutOfBoundsException: start < 0 (-1 < 0)
Product: javaee
Classification: Unclassified
Component: Persistence
All All
: P3 (vote)
: 8.0
Assigned To: Michel Graciano
Depends on:
  Show dependency treegraph
Reported: 2013-07-04 20:41 UTC by Michel Graciano
Modified: 2013-12-17 12:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

stacktrace (4.48 KB, text/plain)
2013-07-04 20:41 UTC, Michel Graciano
stacktrace (4.48 KB, text/plain)
2013-07-04 20:44 UTC, Michel Graciano
Sample project (1.91 MB, application/zip)
2013-09-24 14:21 UTC, Michel Graciano

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2013-07-04 20:41:31 UTC
Build: NetBeans IDE 7.3.1 (Build 201306052037)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Linux

User Comments:
hmichel: Opening the IDE with entity classes already opened

hmichel: Opening the IDE

java.lang.IndexOutOfBoundsException: start < 0 (-1 < 0)
   at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(
   at org.netbeans.modules.j2ee.jpa.verification.common.Rule.createProblem(
   at org.netbeans.modules.j2ee.jpa.verification.common.Rule.createProblem(
   at org.netbeans.modules.j2ee.jpa.verification.rules.attribute.ValidModifiers.check(
   at org.netbeans.modules.j2ee.jpa.verification.rules.entity.ValidAttributes.apply(
   at org.netbeans.modules.j2ee.jpa.verification.rules.entity.ValidAttributes.apply(
Comment 1 Michel Graciano 2013-07-04 20:41:33 UTC
Created attachment 136726 [details]
Comment 2 Michel Graciano 2013-07-04 20:44:16 UTC
Created attachment 136727 [details]

Just opening the IDE with the entity already opened and selected.
Comment 3 Michel Graciano 2013-07-04 21:10:33 UTC
Reproducible with the following sample class:

@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class TestEntity implements Serializable {

    private Long id;
    private String numero;
    private String descricao;
    private Integer nivel;

Maybe the problem is the integration with the Lombok processors?
Comment 4 Jan Lahoda 2013-07-08 07:50:33 UTC
Yes, the use of Lombok probably plays a role here.
Comment 5 Sergey Petrov 2013-07-11 14:16:47 UTC
What should be done to make provided sample compilable?
I can't reproduce with the sample, but may be because it's not processed properly.
Comment 6 Michel Graciano 2013-07-11 14:28:43 UTC
Are you using NB 7.4? It won't work because a Lombok issue with Java 8. To test it, you need to use NB < 7.4.
Comment 7 Sergey Petrov 2013-07-11 14:37:14 UTC
yes, 7.4+jdk7.
but I know nothing about lombok
Comment 8 Sergey Petrov 2013-07-11 14:43:20 UTC
there may be an issue with jdk7 also, I have can't initialize ap exception in entity hint after lombok.jar addition.
Comment 9 Sergey Petrov 2013-07-11 14:53:10 UTC
ok, I see now #226165 and
I would say it's blocker for issue fixing at least with this sample as main development is on 7.4 code base it doesn't matter much to evaluate with 7.3.1 source code with jdk8-netbeans-lombok compatibility issue.
Comment 10 Michel Graciano 2013-07-11 14:54:35 UTC
The Lombok problem in 7.4 is the internal NB javac. Nb JavaC now is the same as Java 8, which is not compatible with Lombok it. Even if you run NB with JDK 7, the NB internal parser is the same as JDK 8... so the Lombok Annotation Processors won't work. It is an open issue at Lombok side and should be fixed (I hope soon). To test it you will need to use Nb < 7.4.
Comment 11 Sergey Petrov 2013-08-01 14:19:11 UTC
ok, may not be evaluated in 7.4 timeframe with current lombok, not sure if it may have sense to close as invalid for 7.4 as it's in real invalid for 7.4 with inability to reproduce.
Comment 12 Sergey Petrov 2013-08-07 11:36:59 UTC
Sorry, it's hard to track issues which can't be evaluated in current release or isn't valid in current release, so for now I can either downgrade to P4 or resolve-invalid. Please reopen back when lombok will be updated. Or with new exceptions new issue will be created anyway with link to this one and it will allow to reevaluate after 7.4 with details from this one I hope.
Comment 13 Michel Graciano 2013-09-24 14:21:35 UTC
Created attachment 140417 [details]
Sample project

Lombok team have fixed some issues and now it is possible to test it with our HEAD. I am attaching a sample project with the issue. All the libs are already attached, you should just open the project and see the issue.
Comment 14 Sergey Petrov 2013-09-24 14:48:16 UTC
thanks, will reevaluate, unfortunately it's late for 7.4
Comment 15 Sergey Petrov 2013-12-16 16:41:08 UTC
related jpa verification code was significantly rewritten in 8.0, 
I can't reproduce this exception if open attached project and open provided entity.
but I see quite a lot of others exceptions in output, but these exceptions aren't persistence related and may need to be filed as separate issue, it may also block this one issue verification if it's related.
Comment 16 Sergey Petrov 2013-12-17 12:27:54 UTC
I would say, there are a lot of lombok-nb compatibility issues yet, like etc.
Also this one with out of bounds isn't reproducible, hard to say if it will be reproducible if compatibility problems will be fixed.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo