[
https://jira.jboss.org/jira/browse/JBIDE-5816?page=com.atlassian.jira.plu...
]
Vitali Yemialyanchyk commented on JBIDE-5816:
---------------------------------------------
to prevent npe i add "build configuration if it is null" change, it fix npe, but
it doesn't fix the problem with Console Config tree items synchronization;
I find the reason - we update tree only in case of "session factory for configuration
is created" - in other case the tree is not updated,
so we can get situation - if the user select other hibernate.cfg for configuration - he
will see old hibernate.cfg configuration tree items - which is wrong - he should rebuild
console config by hands...
NPE -> edit Hibernate Console configuration then Open Mapping
file
------------------------------------------------------------------
Key: JBIDE-5816
URL:
https://jira.jboss.org/jira/browse/JBIDE-5816
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.1.0.CR2
Reporter: Vitali Yemialyanchyk
Assignee: Vitali Yemialyanchyk
Fix For: 3.1.0.CR2
1) create workable Hibernate core console config - with hibernate configured connection;
2) expand configuration tree;
3) edit console config -> setup configuration file - press apply, press ok;
4) try to open mapping file, as result -> npe;
stack trace:
java.lang.NullPointerException
at
org.hibernate.eclipse.console.utils.OpenMappingUtils.searchInMappingFiles(OpenMappingUtils.java:452)
at
org.hibernate.eclipse.console.utils.OpenMappingUtils.searchFileToOpen(OpenMappingUtils.java:619)
at
org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:123)
at
org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:104)
at
org.hibernate.eclipse.console.actions.OpenMappingAction.run(OpenMappingAction.java:72)
at
org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira