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 252036 - freemarker.core.InvalidReferenceException: Expression project is undefined on line 4, column 14 in Templates/NetBeansModuleDevelopment-files/moduleInstall.java.
Summary: freemarker.core.InvalidReferenceException: Expression project is undefined on...
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
: 253327 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-04-23 18:53 UTC by cezariusz
Modified: 2015-07-10 13:46 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 23414


Attachments
stacktrace (3.14 KB, text/plain)
2015-04-23 18:53 UTC, cezariusz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2015-04-23 18:53:25 UTC
Build: NetBeans IDE Dev (Build 201504210001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14
OS: Windows 7

User Comments:
GUEST: Creating a new Grails Server Page.
Sorry, I don't speak English.

cezariusz: Added action using the wizard.

bleonard: Created a new GSP file.

hippy: Created a new GSP template file  (e.g. _someFileName.gsp)




Stacktrace: 
freemarker.core.InvalidReferenceException: Expression project is undefined on line 4, column 14 in Templates/NetBeansModuleDevelopment-files/moduleInstall.java.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
   at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
   at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
   at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
   at freemarker.core.Expression.getStringValue(Expression.java:93)
   at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
Comment 1 cezariusz 2015-04-23 18:53:27 UTC
Created attachment 153340 [details]
stacktrace
Comment 2 cezariusz 2015-04-23 19:01:57 UTC
The exception occurred when I've added an installer to a platform module. The code of the installer was generated like this:

 Expression project is undefined on line 4, column 14 in Templates/NetBeansModuleDevelopment-files/moduleInstall.java.
package org.cezariusz.navi;

import org.openide.modules.ModuleInstall;



public class Installer extends ModuleInstall {

    @Override
    public void restored() {
        // TODO
    }

}
Comment 3 cezariusz 2015-05-22 11:52:09 UTC
Product Version: NetBeans IDE Dev (Build 201505160001)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; pl_PL (nb)

This error is still valid for the Build 201505160001. This time I have added a Window (TopComponent) to a new platform application. There is no longer an exception, but the first line of the file is erroneous:

 Expression project is undefined on line 4, column 14 in Templates/NetBeansModuleDevelopment-files/templateTopComponent637.java.
Comment 4 Antonin Nebuzelsky 2015-07-10 13:46:15 UTC
*** Bug 253327 has been marked as a duplicate of this bug. ***