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 79196 - derby crashes while generating db schema
Summary: derby crashes while generating db schema
Status: RESOLVED WONTFIX
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 12:48 UTC by Jan Horvath
Modified: 2006-06-28 12:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Horvath 2006-06-27 12:48:11 UTC
build 200606270200

-create 1000 tables using this method:
public void createTestDB(){
        try {
            conn =
DriverManager.getConnection("jdbc:derby://localhost:1527/test1","app","app");
            Statement st = conn.createStatement();
            StringBuffer sb=new StringBuffer();
            for (int  i  = 0;  i  < 1000;  i ++) {
                sb.delete(0,sb.length());
                sb.append("create table table"+String.valueOf(i));
                sb.append("(ID INT PRIMARY KEY, A BIGINT,B BLOB,C CHAR,D CLOB,E
DATE,F DECIMAL,");
                sb.append("G DOUBLE,H DOUBLE PRECISION,I FLOAT,J INTEGER,K LONG
VARCHAR,");
                sb.append("L NUMERIC,M REAL,N SMALLINT,O TIME,P TIMESTAMP,Q
VARCHAR(255))");
                st.execute(sb.toString());
            }            
            
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }

-create EJB module
-invoke Persistence/Database Schema
-select this tables, click Finish
-ERROR: when progres bar is showing around 70% derby crashes:

Server is ready to accept connections on port 1527.
Connection number: 1.
Exception in thread "DRDAConnThread_2" java.lang.OutOfMemoryError: Java heap space
Connection number: 2.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Connection number: 3.
Comment 1 Andrei Badea 2006-06-28 12:21:17 UTC
This probably requires some performance tuning, which I don't think is necessary
(or doable for all scenarios) for our default Derby installation. 

We could however provide the possibility to pass parameters to the Derby virtual
machine. It would allow to set e.g. the maximum heap size, which is now not
possbile and defaults to the JVM default. But I see no real need for it now
(would like to see at least a request from an user), so closing this issue.