Skip to content

Commit

Permalink
[NETBEANS-2800] - Repairs for Unable to create Servlet/Filter in Java…
Browse files Browse the repository at this point in the history
… EE 8 application (apache#1375)

* [NETBEANS-2800] - Repairs for Unable to create Servlet/Filter in Java EE 8 application

* Updating gitignore to include auto-generated classes for model_4_0

* [NETBEANS-2800] - Added application_8.mdd; web-fragment_4_0.mdd; amended gitignore

* Updated j2ee.dd/licenseinfo.xml to include the mdd files that are added by the build

* Updated j2ee.dd/licenseinfo.xml to include the mdd files that are added by the build
  • Loading branch information
juneau001 authored and neilcsmith-net committed Jul 12, 2019
1 parent 9807ca5 commit ab4e095
Show file tree
Hide file tree
Showing 10 changed files with 4,307 additions and 679 deletions.
5 changes: 4 additions & 1 deletion enterprise/j2ee.dd/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ src/org/netbeans/modules/j2ee/dd/impl/application/model_1_4/*
src/org/netbeans/modules/j2ee/dd/impl/application/model_5/*
src/org/netbeans/modules/j2ee/dd/impl/application/model_6/*
src/org/netbeans/modules/j2ee/dd/impl/application/model_7/*
src/org/netbeans/modules/j2ee/dd/impl/application/model_8/*
src/org/netbeans/modules/j2ee/dd/impl/client/model_1_4/*
src/org/netbeans/modules/j2ee/dd/impl/client/model_5_0/*
src/org/netbeans/modules/j2ee/dd/impl/client/model_6_0/*
Expand All @@ -16,4 +17,6 @@ src/org/netbeans/modules/j2ee/dd/impl/web/model_2_5/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_3_0/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_3_0_frag/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_3_1/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_3_1_frag/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_3_1_frag/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_4_0/*
src/org/netbeans/modules/j2ee/dd/impl/web/model_4_0_frag/*
1,413 changes: 773 additions & 640 deletions enterprise/j2ee.dd/build.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions enterprise/j2ee.dd/licenseinfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application_6.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application_7.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application_7.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application_8.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application_8.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_1_4.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/application-client_1_4.xsd</file>
Expand Down Expand Up @@ -87,6 +88,7 @@
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_3_0.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_3_1.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_3_1.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_4_0.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-app_4_0.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_3_0.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-common_3_1.xsd</file>
Expand All @@ -95,6 +97,7 @@
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_3_0.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_3_1.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_3_1.xsd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_4_0.mdd</file>
<file>src/org/netbeans/modules/j2ee/dd/impl/resources/web-fragment_4_0.xsd</file>
<license ref="CDDL-1.1" />
<comment type="CATEGORY_B" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public static EjbJarProxy createEjbJarProxy(FileObject fo) throws IOException {
inputStream.close();
}
}

public static EjbJarProxy createEjbJarProxy(Reader reader) throws IOException {
return createEjbJarProxy(new InputSource(reader));
}

public static EjbJarProxy createEjbJarProxy(InputSource inputSource) throws IOException {
try {
return (EjbJarProxy) DDProvider.getDefault().getDDRoot(inputSource);
Expand All @@ -73,8 +73,8 @@ public static EjbJarProxy createEjbJarProxy(InputSource inputSource) throws IOEx
return ejbJarProxy;
}
}


public static void merge(EjbJarProxy ejbJarProxy, Reader reader) {
try {
EjbJarProxy newEjbJarProxy = createEjbJarProxy(reader);
Expand All @@ -95,10 +95,10 @@ public static void merge(EjbJarProxy ejbJarProxy, Reader reader) {
// so lets not set the original to null here but wait
// until the file becomes parsable again to do a merge
//ejbJarProxy.setOriginal(null);
} catch (Schema2BeansRuntimeException s2bre){ // see #70286
} catch (Schema2BeansRuntimeException s2bre){ // see #70286
ejbJarProxy.setStatus(EjbJar.STATE_INVALID_UNPARSABLE);
ejbJarProxy.setError(new SAXParseException(null, null, s2bre));
} catch (RuntimeException re){ // see #99047
} catch (RuntimeException re){ // see #99047
if (re.getCause() instanceof Schema2BeansException){
ejbJarProxy.setStatus(EjbJar.STATE_INVALID_UNPARSABLE);
ejbJarProxy.setError(new SAXParseException(null, null, (Schema2BeansException) re.getCause()));
Expand All @@ -121,6 +121,8 @@ public static WebApp createWebApp(InputStream is, String version) throws IOExcep
return org.netbeans.modules.j2ee.dd.impl.web.model_3_0.WebApp.createGraph(is);
} else if (WebApp.VERSION_3_1.equals(version)) {
return org.netbeans.modules.j2ee.dd.impl.web.model_3_1.WebApp.createGraph(is);
} else if (WebApp.VERSION_4_0.equals(version)) {
return org.netbeans.modules.j2ee.dd.impl.web.model_4_0.WebApp.createGraph(is);
} else {
return null;
}
Expand All @@ -137,7 +139,7 @@ public static WebApp createWebApp(FileObject fo, String version) throws IOExcept
inputStream.close();
}
}

public static AppClient createAppClient(InputStream is, String version) throws IOException, SAXException {
try {
if (AppClient.VERSION_1_4.equals(version)) {
Expand Down
Loading

0 comments on commit ab4e095

Please sign in to comment.