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 157563 - IllegalStateException: Cannot find a public top-level class named BuchKonkret in /home/hani/NetBeansProjects/Bibliothek/src/entitaetsKlassen/BuchKonkret.java
Summary: IllegalStateException: Cannot find a public top-level class named BuchKonkret...
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sergey Petrov
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-28 16:33 UTC by boustanihani
Modified: 2010-03-31 09:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 2512


Attachments
stacktrace (1.88 KB, text/plain)
2009-01-28 16:34 UTC, boustanihani
Details
Project zip (25.64 KB, application/zip)
2009-11-12 14:37 UTC, malakim
Details
Database structure grab (user table) (1.53 KB, text/plain)
2009-11-12 14:41 UTC, malakim
Details
Database structure grab (photo table) (1.47 KB, text/plain)
2009-11-12 14:41 UTC, malakim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description boustanihani 2009-01-28 16:33:55 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Linux, 2.6.24-23-generic, i386

User Comments:
jclee: When generating entity classes from database schema.

vieiro: While creating entities from database

GUEST: Added EntityClass from Database

GUEST: Creating an entity class from database

GUEST: When i try to generate database entities from the table, it instead generates the java template i customly modified. Note that my first try was a successful one means i have generated entites and transacted with the database using them also using the same java template.



Stacktrace: 
java.lang.IllegalStateException: Cannot find a public top-level class named BuchKonkret in /home/hani/NetBeansProjects/Bibliothek/src/entitaetsKlassen/BuchKonkret.java
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$ClassGenerator.<init>(JavaPersistenceGenerator.java:510)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$EntityClassGenerator.<init>(JavaPersistenceGenerator.java:786)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$1.run(JavaPersistenceGenerator.java:425)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator$1.run(JavaPersistenceGenerator.java:423)
        at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:953)
        at org.netbeans.modules.j2ee.persistence.wizard.fromdb.JavaPersistenceGenerator$Generator.runImpl(JavaPersistenceGenerator.java:422)
Comment 1 boustanihani 2009-01-28 16:34:04 UTC
Created attachment 76312 [details]
stacktrace
Comment 2 Sergey Petrov 2009-07-28 10:59:00 UTC
.
I can't reproduce it myself now
please check if file from exception report exist and have content,
if the issue is reproducible for some database, please provide schema and or attach project if possible.
also information of project type, database etc may help. if issue is random, always reproducible etc
Comment 3 Martin Schovanek 2009-09-18 15:59:31 UTC
Without requested information for long time - INVALID. We can't do anything in this case. Reporter, please add requested
information and reopen issue. Thanks in advance.
Comment 4 malakim 2009-11-12 14:37:22 UTC
Created attachment 90949 [details]
Project zip

Attached project where I face this issue
Comment 5 malakim 2009-11-12 14:41:17 UTC
Created attachment 90950 [details]
Database structure grab (user table)
Comment 6 malakim 2009-11-12 14:41:58 UTC
Created attachment 90951 [details]
Database structure grab (photo table)

Attached database structure grab files
Comment 7 Sergey Petrov 2009-11-13 00:29:30 UTC
thanks, what is grab files?
Comment 8 Sergey Petrov 2010-03-31 09:39:18 UTC
Can't find how to use grab, it's better if schema or sql script will be provided,
attached project contain classes like 
<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">

<#if package?? && package != "">
package ${package};

</#if>
/**
 *
 * @author ${user}
 */
public class ${name} {

}

is it valid project?
Also have you tried 6.8 or some latest 6.9 build?
If it's somehow  related to templates modification, can you provide complete steps what templates and how was modified? Entity from db generation may depend on class template and may not be compatible with some modification but I need a sample to try. Currently I don;t see any difference between Photo.java and Java Class template.