[
http://jira.jboss.com/jira/browse/JBIDE-1845?page=comments#action_12418412 ]
Dima Geraskov commented on JBIDE-1845:
--------------------------------------
The property that set to exporter (see tab 'Exporters') owerrwites 'output
path' from main tab.
If current path is not exists we do not create folder structure and you'll get
exception, but not NPE. You should get a hibernate exception with message that output
directory does not exists.
a)
1.EXECUTE: Import attached java project.
2.EXECUTE: Run hsqldb
3.EXECUTE: Open Hibernate Configuration View
4.EXECUTE: Right mouse click and select Add Configuration from context menu
5.EXECUTE: On Main tab select imported project and path to cfg.xml
6.EXECUTE: On Clathpath tab set path to hsqldb.jar
7.EXECUTE: On Mappings tab add path to mapping file.
8.EXECUTE: Press Apply button and Ok button
ASSERT: Hibernate configuration appear in Hibernate Configuration View
9.EXECUTE: Right mouse click on configeration in Hibernate Configuration View and select
Run SchemaExport
10.EXECUTE: Hibernate Code Generation
11.EXECUTE: Select your configuration
12.EXECUTE: Set path to non-existent package in Output directory field
13.EXECUTE: Select one exporter option on Exporters tab.
14.EXECUTE: Press Apply and Run buttons
ASSERT: HibernateConsoleRuntimeException tells that output path does not exists.
b)
...
13. EXECUTE: Select one exporter option on Exporters tab.
13.1. Press Add button
13.2 Select property *Output directory [outputdir]* from list and set value to existent
path
14. EXECUTE: Press Apply and Run buttons
ASSERT generation runs without exception
c)
...
12.EXECUTE: Set path to *existent* package(pathA) in Output directory field
13. EXECUTE: Select one exporter option on Exporters tab.
13.1. Press Add button
13.2 Select property *Output directory [outputdir]* from list and set value to
*non-existent* path(pathB)
14. EXECUTE: Press Apply and Run buttons
ASSERT: HibernateConsoleRuntimeException tells that path pathB does not exists.
java.lang.NullPointerException when run Hibernate Code Generation and
set path to non-existent package in output directory field for generated files.
------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBIDE-1845
URL:
http://jira.jboss.com/jira/browse/JBIDE-1845
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 2.0.1
Reporter: Anton Klimkovich
Assigned To: Anton Klimkovich
Priority: Minor
Fix For: 2.1.0.beta1
Attachments: exception.txt, TestHib.zip
EXECUTE: Import attached java project.
EXECUTE: Run hsqldb
EXECUTE: Open Hibernate Configuration View
EXECUTE: Right mouse click and select Add Configuration from context menu
EXECUTE: On Main tab select imported project and path to cfg.xml
EXECUTE: On Clathpath tab set path to hsqldb.jar
EXECUTE: On Mappings tab add path to mapping file.
EXECUTE: Press Apply button and Ok button
ASSERT: Hibernate configuration appear in Hibernate Configuration View
EXECUTE: Right mouse click on configeration in Hibernate Configuration View and select
Run SchemaExport
EXECUTE: Hibernate Code Generation
EXECUTE: Select your configuration
EXECUTE: Set path to non-existent package in Output directory field
EXECUTE: Select one exporter option on Exporters tab.
EXECUTE: Press Apply and Run buttons
ASSERT: Expect files should be created in directory that was set in Output directory
field.
FAILURE: java.lang.NullPointerException
Log attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira