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 219778 - IllegalArgumentException: Incorrect number of type arguments
Summary: IllegalArgumentException: Incorrect number of type arguments
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 18:50 UTC by David Konecny
Modified: 2012-11-17 02:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188716


Attachments
stacktrace (4.15 KB, text/plain)
2012-10-09 18:50 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2012-10-09 18:50:51 UTC
Build: NetBeans IDE Dev (Build 20121002-9d6a7516893e)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Linux

User Comments:
dkonecny: i was followinf instructions from issue http://netbeans.org/bugzilla/show_bug.cgi?id=219565 and exception happened during generation of JSF pages from JPA entities




Stacktrace: 
java.lang.IllegalArgumentException: Incorrect number of type arguments
   at com.sun.tools.javac.model.JavacTypes.getDeclaredType0(JavacTypes.java:246)
   at com.sun.tools.javac.model.JavacTypes.getDeclaredType(JavacTypes.java:222)
   at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.jpa.dao.EjbFacadeWizardIterator$3.run(EjbFacadeWizardIterator.java:433)
   at org.netbeans.modules.j2ee.ejbcore.ejb.wizard.jpa.dao.EjbFacadeWizardIterator$3.run(EjbFacadeWizardIterator.java:408)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:644)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:634)
Comment 1 David Konecny 2012-10-09 18:50:55 UTC
Created attachment 125647 [details]
stacktrace
Comment 2 Dusan Balek 2012-10-19 10:24:23 UTC
EjbFacadeWizardIterator should pass the correct number of type arguments to Types.getDeclaredType(...) call.
Comment 3 Martin Fousek 2012-11-15 14:05:35 UTC
David are you able to reproduce this issue?

wc.getElements().getTypeElement(abstactFacedeFQN) didn't resolved TypeElement although this element (class) must exist - that's something which should never happen. I discussed it also with TomasZ and when the file wouldn't be scanned yet, it should fallback to listing package directory to find the class ... it's weird and could be some underlying issue (maybe in filesystems).

Since I'm not able to reproduce (when you will not be able too), I suggest that I would try to wait until scanning will be finished and add few additional defensive changes which could help and for sure I would also add some additional logging.
Comment 4 David Konecny 2012-11-15 19:14:54 UTC
If you cannot reproduce it I would ignore it. There are only two exception reports after all. Perhaps this is P4 or TM=Next.
Comment 5 Sergey Petrov 2012-11-15 20:14:53 UTC
in my opinion this one issue, issue http://netbeans.org/bugzilla/show_bug.cgi?id=221773 and number of similar may have the same cause. all have somehing just generated but isn't parsed properly and failed to be resolved.
Comment 6 Martin Fousek 2012-11-16 13:12:32 UTC
You are right Sergey, that's similar case.

I added more logging information in web-main #34c1a22c2831 as well. Let's wait what could be broken there. I'm closing this issue since new one will be raised once anybody crossed these troubles since the logging is with the SEVERE priority. The new issue will be reported probably quite differently since I'm doing those check in advance to prevent reporting to Java/Compiler component next time.
Comment 7 Quality Engineering 2012-11-17 02:41:58 UTC
Integrated into 'main-golden', will be available in build *201211170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/34c1a22c2831
User: Martin Fousek <marfous@netbeans.org>
Log: #219778 - IllegalArgumentException: Incorrect number of type arguments