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 189413 - Entity Classes from database wizard fails
Summary: Entity Classes from database wizard fails
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 19:21 UTC by thealy
Modified: 2010-10-07 13:42 UTC (History)
2 users (show)

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 thealy 2010-08-11 19:21:51 UTC
Following Tutorial http://wiki.netbeans.org/DevelopJavaEE6App having upgraded to 6.9.1. 

Procedure works as described, minus the 6.8 / 6.9 differences, but fails on execution with a pop-up error: "Freemaker.core.ParseException: Unexpected end of file reached. Unclosed if directive." It creates an empty file called Customer.java in this case.

FYI, I had the same issue with 6.9 and other tutorials ("Generating a JavaSever Faces 2.0 CRUD Application from a Database") and I exchanged some mail with someone who's name I forget, but he got pissed off and basically blew me off. I tried to explain that it worked OK when I tried it using 6.9 on my Mac laptop, but that is not my work development environment.

I need this functionality, but can't get past any of the tutorials, so I don't have much faith that I can develop an enterprise app.

Please contact via email if you need any further info: thealy@bnl.gov
Comment 1 Peter Pis 2010-08-12 07:43:14 UTC
Please evaluate.
Comment 2 thealy 2010-09-24 13:32:06 UTC
Any hope this one will be fixed in the next release?
Comment 3 Jeffrey Rubinoff 2010-09-24 14:15:57 UTC
I do not understand this bug. 
First, it is a bug against the web tutorials. Therefore, I assume that the IDE works correctly, but that the instructions in the tutorial are incorrect.
However, the user does not say which instructions are incorrect, only that the instructions worked on Mac but not in his work environment.
If this is a problem with the Entities from Database wizard, it should be filed against javaee, not userguide.
Some steps to reproduce this bug are also necessary. I do not know what the user's work environment is. I have never encountered this problem.
If no one can reproduce this bug, it must be closed.
Comment 4 Jeffrey Rubinoff 2010-09-24 14:30:19 UTC
I am guessing that this is a problem with Freemarker API and NetBeans entity class generation.
Comment 5 thealy 2010-09-24 15:21:49 UTC
Jeff-

I reported the bug and someone there put it in the 'Tutorials' category - which is where I encountered it, but not where I believe it belongs. I can reproduce this at will - it failed when I tried it again yesterday under 6.9.1 I was able to create the entity classes by falling back to 6.8, but I cannot "import" them into the project and continue with it under 6.9.1

To reproduce in my environment (NB 6.9.1, Linux Mint 8 Helena , java version "1.6.0_20".

Frankly, I have no idea what Freemarker  is or what it has to do with the internal process called from within the IDE; I did notice a newer version of the Freemarker.jar is available, but I was unsure how to properly integrate it with NetBeans.

If I can provide additional information to resolve this, it would be most helpful. Please re-classify it into whatever category is appropriate.
Comment 6 Sergey Petrov 2010-09-24 18:14:17 UTC
What do you mean by "fails on execution", does it mean run action on final project? May it be caused by some changes in templates you may done occasionally?
Comment 7 Sergey Petrov 2010-10-06 11:24:52 UTC
will try this tutorial with 6.9.1.
Comment 8 Sergey Petrov 2010-10-07 13:34:07 UTC
ok, from "It creates an empty file called
Customer.java in this case." I see it should be thrown at the beginning of tutorial, I've passed 60+% of tutorial already and have no problems so far with 6.9.1.

there are several more question, can usual java class be created? can entity be created with new|entity class? Can you attach message log? Or complete exception stack trace. it may help but it still likely some template corruption(may be occational/manual) i.e. removed some part so there is "if" start and no close tag </#if> for example somewhere.

Please reopen with more details.