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 137704 - Adding of DB table corrupts Page Bean
Summary: Adding of DB table corrupts Page Bean
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-19 11:58 UTC by Roman Mostyka
Modified: 2008-06-23 16:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Sample project with corrupted Page Bean. (25.01 KB, application/octet-stream)
2008-06-19 12:02 UTC, Roman Mostyka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-06-19 11:58:10 UTC
1. Create web application with "Visual Web JSF" framework.
2. Add DB table to the page.
3. Open Page Bean.

Result: Code generated after inserting of DB table is corrupted.
Comment 1 Roman Mostyka 2008-06-19 12:02:19 UTC
Created attachment 63087 [details]
Sample project with corrupted Page Bean.
Comment 2 _ sandipchitale 2008-06-19 18:57:52 UTC
Hmmm...as soon as I create a VW project I am seeing a syntax error in Page1.jsp:

Could not add one or more tag libraries.

Did you see this? This may be the cause of the issue (not confirmed).
Comment 3 _ sandipchitale 2008-06-19 21:12:00 UTC
Actually it turns out to be some issue with java code generation:

Steps:

1. Create a java class with content:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication10;

/**
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        System.out.println(System.getProperty("os.name"));
        
    }

}

2. Select System.getProperty("os.name") expression.
3. Invoke quick fix "Introduce variable".
4. Results in the source:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication10;

/**
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        final String property = System.getProperty(/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */);
        // TODO code application logic here

        System.out.println(property);
        
    }

}
Comment 4 Jan Lahoda 2008-06-20 20:38:15 UTC
Please see issue #137564.

*** This issue has been marked as a duplicate of 137564 ***
Comment 5 Roman Mostyka 2008-06-23 16:39:18 UTC
Fixed.
Comment 6 Roman Mostyka 2008-06-23 16:39:33 UTC
Fixed.
Comment 7 Roman Mostyka 2008-06-23 16:39:45 UTC
Verified with build 080623.