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 111918 - Endless exception after synchronization XSL and XML Schema
Summary: Endless exception after synchronization XSL and XML Schema
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Alexey Yarmolenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-03 15:25 UTC by kozlov
Modified: 2007-08-09 16:11 UTC (History)
1 user (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 kozlov 2007-08-03 15:25:47 UTC
Reproduced in build070802.

Steps to reproduce:

- create XSLT project;
- create XML Schema and  XSL transformation;
- tile Schema and XSL windows;
- change global element name in Schema.

Exception occurs after synchronization:
java.lang.NullPointerException
	at org.netbeans.modules.xslt.mapper.model.ModelBridge.checkErrors(ModelBridge.java:118)
	at org.netbeans.modules.xslt.mapper.model.SchemaModelBridge.onModelChanged(SchemaModelBridge.java:38)
	at org.netbeans.modules.xslt.mapper.model.ModelBridge$UpdateTimer$1.actionPerformed(ModelBridge.java:71)
	at javax.swing.Timer.fireActionPerformed(Timer.java:271)
[catch] at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Sergey Lunegov 2007-08-06 12:44:00 UTC
Will be fixed as result of implementing of support of listening of mapper to transformmap changes.
Comment 2 Alexey Yarmolenko 2007-08-06 16:34:55 UTC
We just discovered that listening to changes in schema on mapper side does not work when root element for the mapper
tree was removed. We need to fix this on MapperContext side. MapperContext is a level of indirection between mapper
itself and the project, which owns .xsl file. It contains information about schema types to be displayed as source and
target tree and xslt object model. In XSLT service moduдe, this information is filed by project based on information
found in transformmap.xml.

As a part of this fix mapper will be able to respond to changes in transformmap/schema/wsdl models as well.

Vitaliy, please re-assign this bug to me when you finish your part in MapperContext.


P.S. Philipp, please dont forget to put an exception stack into bug description next time when posting a new bug about
some exception window to appear.

 
Comment 3 Vitaly Bychkov 2007-08-08 13:42:12 UTC
Now MapperContext listens to the global changes which modifies source/target schemas.
Also added API which allows reinitialization of the mappercontext on demand (MapperContextFactory#reinitMapperContext).

Fixed in trunk:

/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangeListener.java,v  <-- 
ProjectsFilesChangeListener.java
initial revision: 1.1
Checking in src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangeEvent.java;
/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangeEvent.java,v  <-- 
ProjectsFilesChangeEvent.java
initial revision: 1.1
Checking in src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangesSupport.java;
/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangesSupport.java,v  <-- 
ProjectsFilesChangesSupport.java
initial revision: 1.1
Checking in src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangeHandler.java;
/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/spi/ProjectsFilesChangeHandler.java,v  <-- 
ProjectsFilesChangeHandler.java
initial revision: 1.1
/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProject.java,v  <--  XsltproProject.java
new revision: 1.13; previous revision: 1.12
/cvs/enterprise/xslt/project/nbproject/project.xml,v  <--  project.xml
new revision: 1.16; previous revision: 1.15




/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/XSLTDataEditorSupport.java,v  <--  XSLTDataEditorSupport.java
new revision: 1.9; previous revision: 1.8
/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/XSLTDataLoader.java,v  <--  XSLTDataLoader.java
new revision: 1.8; previous revision: 1.7
/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/context/MapperContextFactory.java,v  <-- 
MapperContextFactory.java
new revision: 1.7; previous revision: 1.6
/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/context/MapperContextImpl.java,v  <--  MapperContextImpl.java
new revision: 1.4; previous revision: 1.3
/cvs/enterprise/xslt/core/nbproject/project.xml,v  <--  project.xml
new revision: 1.15; previous revision: 1.14
/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/util/Util.java,v  <--  Util.java
new revision: 1.5; previous revision: 1.4
/cvs/enterprise/xslt/core/src/org/netbeans/modules/xslt/core/multiview/mapper/MapperMultiViewElement.java,v  <-- 
MapperMultiViewElement.java
new revision: 1.6; previous revision: 1.5


Comment 4 Alexey Yarmolenko 2007-08-09 12:25:22 UTC
Fixed on mapper side.

Now mapper reacts to changes done in schemas, WSDLs and transformMap.xml itself. As a result it can go to "Unable to
show diagram" state or update left and right trees.
Comment 5 kozlov 2007-08-09 16:11:48 UTC
Verified in build070808.