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 26729 - absolute href links don't get resolved correctly
Summary: absolute href links don't get resolved correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-23 08:52 UTC by _ briansmith
Modified: 2004-08-17 15:29 UTC (History)
0 users

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 _ briansmith 2002-08-23 08:52:41 UTC
I downloaded the "official" Model.xml document
from OMG. The document uses absolute href links to
link between elements. For a variety of reasons,
this file wouldn't import. However, one of the
reasons seems to be that the XMI reader is
treating all links as though they are relative,
even though the links may be absolute. I believe
that the XMI writer needs to test whether or not
the link is absolute before it prepends the base URI.

For example, If you download the file into
directory "E:\test", then the XMI reader will look
for files named 
"file:/E:/test/http://www.omg.org/models/MOF1.4/XMI1.1/Model1.4/PrimitiveTypes.x
ml" instead of going to the url
"http://www.omg.org/models/MOF1.4/XMI1.1/Model1.4/PrimitiveTypes.x
ml". 

Here is the stacktrace:

resolving reference: null,
file:/E:/brian/projects/ssm/build/models/omg/Model.dt
d
org.netbeans.lib.jmi.util.DebugException: no
protocol: /E:/brian/projects/ssm/bu
ild/models/omg/http://www.omg.org/models/MOF1.4/XMI1.1/Model1.4/PrimitiveTypes.x
ml
        at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
        at
org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

        at
javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at
org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:99)
        at
org.netbeans.lib.jmi.xmi.XmiSAXReader.read(XmiSAXReader.java:80)
        at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImpl.java:
78)
        at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImpl.java:
56)
        at
org.netbeans.modules.mdrexplorer.looks.reflect.actions.LoadXMIAction$
1.run(LoadXMIAction.java:112)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:599)
*********** Exception occurred ************ at Fri
Aug 23 02:36:14 CDT 2002
javax.jmi.xmi.MalformedXMIException:
org.netbeans.lib.jmi.util.DebugException: n
o protocol:
/E:/brian/projects/ssm/build/models/omg/http://www.omg.org/models/MO
F1.4/XMI1.1/Model1.4/PrimitiveTypes.xml
        at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImpl.java:
84)
        at
org.netbeans.lib.jmi.xmi.XMISaxReaderImpl.read(XMISaxReaderImpl.java:
56)
[catch] at
org.netbeans.modules.mdrexplorer.looks.reflect.actions.LoadXMIAction$
1.run(LoadXMIAction.java:112)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:599)
java.lang.ClassCastException
        at
org.netbeans.modules.mdrexplorer.looks.MDREventHandler.changeCancelle
d(MDREventHandler.java:142)
        at
org.netbeans.mdr.util.EventNotifier.fireCancelled(EventNotifier.java:
181)
        at
org.netbeans.mdr.util.EventNotifier.fireCancelled(EventNotifier.java:
197)
        at
org.netbeans.mdr.util.TransactionMutex.leave(TransactionMutex.java:16
7)
        at
org.netbeans.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:
177)
        at
org.netbeans.modules.mdrexplorer.looks.reflect.actions.LoadXMIAction$
1.run(LoadXMIAction.java:117)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:599)
java.lang.Exception: Stack trace
        at
java.lang.Thread.dumpStack(Thread.java:1071)
        at
org.netbeans.mdr.util.TransactionMutex.leave(TransactionMutex.java:16
9)
        at
org.netbeans.mdr.NBMDRepositoryImpl.endTrans(NBMDRepositoryImpl.java:
177)
        at
org.netbeans.modules.mdrexplorer.looks.reflect.actions.LoadXMIAction$
1.run(LoadXMIAction.java:117)
        at org.openide.util.Task.run(Task.java:136)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java
:599)
rolled back!
Comment 1 Daniel Prusa 2004-08-17 15:29:00 UTC
I am not able to reproduce this problem using the current version of
xmi reader. Inspecting the related code, it seems it has been already
fixed.