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 148553 - [65cat] IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
Summary: [65cat] IllegalArgumentException: The name parameter ('<error>') is not a val...
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@javaee
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-27 18:13 UTC by sunbiz
Modified: 2009-06-08 15:20 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 119407


Attachments
stacktrace (3.03 KB, text/plain)
2008-09-27 18:15 UTC, sunbiz
Details
stacktrace (3.37 KB, text/plain)
2008-10-01 09:53 UTC, rajivderas
Details
stacktrace (3.00 KB, text/plain)
2008-10-01 10:43 UTC, rajivderas
Details
stacktrace (3.38 KB, text/plain)
2008-10-11 08:18 UTC, sunbiz
Details
stacktrace (98 bytes, text/plain)
2008-10-19 18:56 UTC, sunbiz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sunbiz 2008-09-27 18:13:59 UTC
Build: NetBeans IDE Dev (Build 200809220201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Windows Vista, 6.0, x86

User Comments:
sunbiz: Added Business method to CustomerSession bean with an illegal identifier name



Stacktrace: 
java.lang.IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
        at org.openide.util.Parameters.javaIdentifierOrNull(Parameters.java:151)
        at org.openide.util.Parameters.javaIdentifier(Parameters.java:137)
        at org.netbeans.modules.j2ee.common.method.MethodModel$Variable.create(MethodModel.java:130)
        at org.netbeans.modules.j2ee.common.method.MethodModelSupport.createMethodModel(MethodModelSupport.java:104)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:120)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:96)
Comment 1 sunbiz 2008-09-27 18:15:27 UTC
Created attachment 70727 [details]
stacktrace
Comment 2 rajivderas 2008-10-01 09:52:56 UTC
Build: NetBeans IDE Dev (Build 200809281401)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

User Comments: 
Steps to reproduce:
1) Create a J2EE 1.3 project module project
2) Then right click and select add entity bean
3)In the new entity bean wizard select persistence type as CMP and type the following destructive data set to the primary key class text component 
"!@#$%^&*()_+|}{":?><,./;'[]\=-" 
4)Then finish the wizard and you will get this error

Here my point is the primary key class name text component should validate for a valid java class name.

Stacktrace: 
java.lang.IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
        at org.openide.util.Parameters.javaIdentifierOrNull(Parameters.java:151)
        at org.openide.util.Parameters.javaIdentifier(Parameters.java:137)
        at org.netbeans.modules.j2ee.common.method.MethodModel$Variable.create(MethodModel.java:130)
        at org.netbeans.modules.j2ee.common.method.MethodModelSupport.createMethodModel(MethodModelSupport.java:104)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:107)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:96)
Comment 3 rajivderas 2008-10-01 09:53:07 UTC
Created attachment 70956 [details]
stacktrace
Comment 4 rajivderas 2008-10-01 10:43:03 UTC
Build: NetBeans IDE Dev (Build 200809281401)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b21
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
        at org.openide.util.Parameters.javaIdentifierOrNull(Parameters.java:151)
        at org.openide.util.Parameters.javaIdentifier(Parameters.java:137)
        at org.netbeans.modules.j2ee.common.method.MethodModel$Variable.create(MethodModel.java:130)
        at org.netbeans.modules.j2ee.common.method.MethodModelSupport.createMethodModel(MethodModelSupport.java:104)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:107)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:96)
Comment 5 rajivderas 2008-10-01 10:43:13 UTC
Created attachment 70958 [details]
stacktrace
Comment 6 sunbiz 2008-10-11 08:17:19 UTC
Build: NetBeans IDE Dev (Build 200810100201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Windows Vista, 6.0, x86

User Comments: 
Refactor -> Change Method Parameter... Add just parameter name and keep the parameter type blank

Stacktrace: 
java.lang.IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
        at org.openide.util.Parameters.javaIdentifierOrNull(Parameters.java:151)
        at org.openide.util.Parameters.javaIdentifier(Parameters.java:137)
        at org.netbeans.modules.j2ee.common.method.MethodModel$Variable.create(MethodModel.java:130)
        at org.netbeans.modules.j2ee.common.method.MethodModelSupport.createMethodModel(MethodModelSupport.java:104)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:120)
        at org.netbeans.modules.j2ee.ejbcore.ui.logicalview.ejb.shared.ComponentMethodModel$1.run(ComponentMethodModel.java:96)
Comment 7 sunbiz 2008-10-11 08:18:05 UTC
Created attachment 71598 [details]
stacktrace
Comment 8 sunbiz 2008-10-19 18:56:28 UTC
Build: NetBeans IDE Dev (Build 200810171401)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: Windows Vista, 6.0, x86

User Comments: 


Stacktrace: 
java.lang.IllegalArgumentException: The name parameter ('<error>') is not a valid Java identifier
Comment 9 sunbiz 2008-10-19 18:56:31 UTC
Created attachment 72221 [details]
stacktrace
Comment 10 Petr Jiricka 2009-06-08 15:20:36 UTC
I could not find a way to reproduce in NB 6.7 RC2, and the last report is from Oct 2008. So I consider this fixed.