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.

View | Details | Raw Unified | Return to bug 28736
Collapse All | Expand All

(-)xml/core/manifest.mf (-2 / +2 lines)
Lines 7-20 Link Here
7
OpenIDE-Module-Public-Packages: 
7
OpenIDE-Module-Public-Packages: 
8
 org.netbeans.modules.xml.api.**,
8
 org.netbeans.modules.xml.api.**,
9
 org.netbeans.modules.xml.spi.**
9
 org.netbeans.modules.xml.spi.**
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.17
10
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.21
11
OpenIDE-Module-Module-Dependencies: 
11
OpenIDE-Module-Module-Dependencies: 
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
12
 org.netbeans.api.xml/1 > @API_SPEC_VERS_SUBST@,
13
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
13
 org.netbeans.modules.xml.tax/1 = @BUILD_NUMBER_SUBST@,
14
 org.openide.deprecated > 1.0,
14
 org.openide.deprecated > 1.0,
15
 org.openide.execution > 1.0,
15
 org.openide.execution > 1.0,
16
 org.openide.io > 1.0
16
 org.openide.io > 1.0
17
OpenIDE-Module-Requires: org.openide.TopManager, org.openide.windows.IOProvider
17
OpenIDE-Module-Requires: org.openide.TopManager, org.openide.windows.IOProvider, org.openide.modules.InstalledFileLocator
18
Class-Path: docs/xml-core.jar
18
Class-Path: docs/xml-core.jar
19
19
20
Name: org/netbeans/modules/xml/core/XMLDataLoader.class
20
Name: org/netbeans/modules/xml/core/XMLDataLoader.class
(-)xml/core/src/org/netbeans/modules/xml/core/tree/ParserLoader.java (-21 / +10 lines)
Lines 15-20 Link Here
15
import java.io.*;
15
import java.io.*;
16
import java.net.*;
16
import java.net.*;
17
import java.util.*;
17
import java.util.*;
18
import org.openide.modules.InstalledFileLocator;
18
19
19
/**
20
/**
20
 * A filtering classloader (isolator) ensuring that a particuler version of
21
 * A filtering classloader (isolator) ensuring that a particuler version of
Lines 40-46 Link Here
40
    // parser library relative to module directory
41
    // parser library relative to module directory
41
    // library itself can not have a jar extension 
42
    // library itself can not have a jar extension 
42
    // to avoid loading it by module classloader    
43
    // to avoid loading it by module classloader    
43
    private static final String PARSER_MODULES_LIB = "/modules/autoload/ext/xerces2.jar"; // NOI18N
44
    private static final String PARSER_MODULES_LIB = "modules/autoload/ext/xerces2.jar"; // NOI18N
44
    
45
    
45
    // delegating classloader
46
    // delegating classloader
46
    private ClassLoader parentLoader;
47
    private ClassLoader parentLoader;
Lines 49-56 Link Here
49
    private static ParserLoader instance = null;
50
    private static ParserLoader instance = null;
50
    
51
    
51
    /** Creates new ParserLoader */
52
    /** Creates new ParserLoader */
52
    private ParserLoader(URL library) {
53
    private ParserLoader(URL[] libraries) {
53
        super(new URL[] { library });
54
        super(libraries);
54
        parentLoader = org.openide.TopManager.getDefault().systemClassLoader();//getClass().getClassLoader();
55
        parentLoader = org.openide.TopManager.getDefault().systemClassLoader();//getClass().getClassLoader();
55
    }
56
    }
56
57
Lines 63-91 Link Here
63
        if (instance != null) return instance;
64
        if (instance != null) return instance;
64
        
65
        
65
        try {
66
        try {
66
            String prop;
67
            URL xer2url;
68
69
            prop = System.getProperty("netbeans.user"); // NOI18N
70
            xer2url = new URL("file:" + prop + PARSER_MODULES_LIB); // NOI18N                               
71
72
            try {
73
                // just skip netbeans home
74
                xer2url.openStream();
75
            } catch (IOException ex) {
76
                prop = System.getProperty("netbeans.home"); // NOI18N                      
77
                xer2url = new URL("file:" + prop + PARSER_MODULES_LIB); // NOI18N                   
78
            }
79
80
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated jar URL=" + xer2url); // NOI18N
81
82
            instance = new ParserLoader(xer2url);
83
//              URL module = instance.getClass().getProtectionDomain().getCodeSource().getLocation();            
67
//              URL module = instance.getClass().getProtectionDomain().getCodeSource().getLocation();            
68
            // Could also use InstalledFileLocator here, but this should suffice:
84
            URL module = org.netbeans.tax.io.XNIBuilder.class.getProtectionDomain().getCodeSource().getLocation();            
69
            URL module = org.netbeans.tax.io.XNIBuilder.class.getProtectionDomain().getCodeSource().getLocation();            
85
70
86
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated module URL=" + module); // NOI18N
71
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated module URL=" + module); // NOI18N
87
72
88
            instance.addURL(module);
73
            URL xer2url = InstalledFileLocator.getDefault().locate(PARSER_MODULES_LIB, "org.netbeans.modules.xml.tax", false).toURL(); // NOI18N
74
75
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug ("Isolated jar URL=" + xer2url); // NOI18N
76
77
            instance = new ParserLoader(new URL[] {xer2url, module});
89
        } catch (MalformedURLException ex) {
78
        } catch (MalformedURLException ex) {
90
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug (ex);
79
            if ( Util.THIS.isLoggable() ) /* then */ Util.THIS.debug (ex);
91
        }
80
        }

Return to bug 28736