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 62156 - java.lang.NullPointerException when i open a ejb module
Summary: java.lang.NullPointerException when i open a ejb module
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-11 12:46 UTC by angusyoung4
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log generated by netbeans (4.67 KB, application/octet-stream)
2005-08-11 12:49 UTC, angusyoung4
Details

Note You need to log in before you can comment on or make changes to this bug.
Description angusyoung4 2005-08-11 12:46:17 UTC
I am developing a NetBeans module using the NetBeans IDE. 
Recently, the IDE has been getting regular 'java.lang.NullPointerException' 
errors. Exception occurred in Request Processor.

The errors happen when i open the ejb module. 
I'm worked with this project since 1 month and it had never happened up to 
today.

Also i want to refer you a problem with the clases generated in the ejb.
The method 'create' in a bean generated does not work well when the table of 
the database have 2 foreign keys towards the same table.
When i try to execute this method i get the exception:
"A foreign key constrainst fails".
This occurs because the sql query (insert) than the ejb constructs don't have 
the second foreign key.
How can i fix this?

I'm spanish and don't speak english very well so forgives my mistakes on having 
written.

Thank you.
Comment 1 angusyoung4 2005-08-11 12:49:14 UTC
Created attachment 23719 [details]
messages.log generated by netbeans
Comment 2 angusyoung4 2005-08-11 13:20:57 UTC
Bean 'CasosBean' method ejbSelectLastId: problems running JDOQL 
query.com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got 
a JDBC SQLException while executing the SQL statement:SQL statement<insert into 
casos(Descripcion, FechaComunicacion, FechaResolucion, Id_Caso, Solucion, 
Id_TipodeCaso, Id_Sistema, Id_Contacto_abre) values ( ?, ?, ?, ?, ?, ?, ?, ?)> 
with input values:java.lang.String:prueba, java.sql.Timestamp:2005-08-18 
14:57:52.767, java.sql.Timestamp:2005-08-26 14:57:52.767, java.lang.Integer:0, 
java.lang.String:prueba, java.lang.Integer:1, java.lang.Integer:1, 
java.lang.Integer:1.Please examine the SQLException for more 
information.NestedException: java.sql.SQLException: Cannot add or update a 
child row: a foreign key constraint failsFailedObjectArray: 
[com.cgi.ejb.CasosBean_1291471271_JDOState@17dacb8] 
.............. 
............... 
com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute
(QueryImpl.java:479) at 
com.cgi.ejb.CasosBean_1291471271_ConcreteImpl.ejbSelectLastId
(CasosBean_1291471271_ConcreteImpl.java:550) at 
com.cgi.ejb.CasosBean.ejbHomeLastId(CasosBean.java:145) 
Comment 3 Andrei Badea 2005-08-11 13:58:48 UTC
Please always describe one problem in one issue (unless the problems are
related, which doesn't seem to be the case). Could you please file another issue
for the EJB generation problem? File it against the j2ee component and ejb
subcomponent. Thank you.
Comment 4 Jan Becicka 2005-08-18 12:21:37 UTC
ava.lang.NullPointerException
	at org.netbeans.modules.javacore.parser.InfoUtil.getElementNames(InfoUtil.java:75)
Comment 5 Martin Matula 2005-08-19 12:45:51 UTC
I'm going to fix this.
Comment 6 Martin Matula 2005-08-19 15:52:15 UTC
Fixed.

Checking in src/org/netbeans/mdr/storagemodel/AttrCollection.java;
/cvs/mdr/src/org/netbeans/mdr/storagemodel/AttrCollection.java,v  <-- 
AttrCollection.java
new revision: 1.18; previous revision: 1.17
done
Comment 7 Max Sauer 2007-02-14 14:54:03 UTC
Marking as verified. Obsolete since retouche intergration.
---
NetBeans IDE Dev (Build 070214)
1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 8 Quality Engineering 2007-09-20 09:54:12 UTC
Reorganization of java component