Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Java 17 (works with JDK 8) with org.jvnet.jaxb:jaxb-maven-plugin:2.0.14:generate maven build fails with error: Unable to parse input schema(s). #561

Open
ssanket143 opened this issue Aug 26, 2024 · 30 comments
Labels

Comments

@ssanket143
Copy link

[INFO] The [forceRegenerate] switch is turned on, XJC will be executed.
[INFO] Parsing input schema(s)...
[ERROR] Error while parsing schema(s).Location [].
org.xml.sax.SAXParseException; schema_reference.4: Failed to read schema document 'http://csi.cingular.com/Schemas/v00/xyz/Legacy/AE/Base/ResponseStatus.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4258)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4241)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2532)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2354)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:576)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:618)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:577)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:543)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:281)
at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:81)
at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:301)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:121)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76)
at org.jvnet.jaxb.maven.XJC2Mojo.loadModel(XJC2Mojo.java:58)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:48)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:28)
at org.jvnet.jaxb.maven.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:491)
at org.jvnet.jaxb.maven.RawXJC2Mojo.execute(RawXJC2Mojo.java:330)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:904)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:281)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:204)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: java.net.UnknownHostException: csi.cingular.com
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:572)
at java.base/java.net.Socket.connect(Socket.java:633)
at java.base/java.net.Socket.connect(Socket.java:583)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:534)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:639)
at java.base/sun.net.www.http.HttpClient.(HttpClient.java:282)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:387)
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:409)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1308)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1241)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1127)
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1056)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1686)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1610)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:861)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2326)
... 41 more
org.xml.sax.SAXParseException; systemId: maven:acsi.abc.xyz.schema:CommonServices-v00:jar::!/Schemas/v00/AtlasxyzLegacy/AE/Base/AccountProfile.xsd; lineNumber: 19; columnNumber: 135; schema_reference.4: Failed to read schema document './LecProfile.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:100)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4254)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4249)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2543)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2239)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2129)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1050)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:653)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:618)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:577)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:543)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:281)
at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:81)
at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:301)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:121)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76)
at org.jvnet.jaxb.maven.XJC2Mojo.loadModel(XJC2Mojo.java:58)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:48)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:28)
at org.jvnet.jaxb.maven.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:491)
at org.jvnet.jaxb.maven.RawXJC2Mojo.execute(RawXJC2Mojo.java:330)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:904)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:281)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:204)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: java.net.MalformedURLException: unknown protocol: maven
at java.base/java.net.URL.(URL.java:681)
at java.base/java.net.URL.(URL.java:569)
at java.base/java.net.URL.(URL.java:516)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:593)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:696)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2227)
... 43 more

@ssanket143 ssanket143 changed the title Using Java 17 with org.jvnet.jaxb:jaxb-maven-plugin:2.0.14:generate but maven build fails with error: Unable to parse input schema(s). Using Java 17 (works with JDK 8) with org.jvnet.jaxb:jaxb-maven-plugin:2.0.14:generate but maven build fails with error: Unable to parse input schema(s). Aug 26, 2024
@laurentschoelens
Copy link
Collaborator

Hi @ssanket143 : could you share the pom.xml config please ? or a link to your project ?

@ssanket143
Copy link
Author

ssanket143 commented Aug 26, 2024


4.0.0
acsi.gddn.atlas.schema
gddn-build
pom
24.08.00.00-RELEASE
${project.artifactId} [${project.groupId}]

<properties>
	<!-- -->
	<gddn.version>24.08.00.00-RELEASE</gddn.version>
	<!-- -->
	<org.osgi.core.version>4.3.1</org.osgi.core.version>
	<commonservices.schema.version>200</commonservices.schema.version>
	<commonservices.ccp.schema.version>234</commonservices.ccp.schema.version>
	<commonservices.legacy.schema.version>00</commonservices.legacy.schema.version>
	<org.apache.felix.main.version>4.2.1</org.apache.felix.main.version>
	<slf4j.version>1.7.24</slf4j.version>
	<logback.version>1.2.1</logback.version>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
	<net.sourceforge.fmpp.version>0.9.14</net.sourceforge.fmpp.version>
	<junit.version>4.8.2</junit.version>
	<surefire.version>2.17</surefire.version>
	<jaxb2.basics.version>0.6.4</jaxb2.basics.version>
	<jaxb2.plugin.version>2.0.14</jaxb2.plugin.version>
	<maven.dependency.plugin.version>2.8</maven.dependency.plugin.version>
	<maven.resources.plugin.version>3.0.1</maven.resources.plugin.version>
	<maven.bundle.plugin.version>2.4.0</maven.bundle.plugin.version>
</properties>

<modules>
	<module>CommonServices-v${commonservices.legacy.schema.version}</module>
	<module>CommonServices-v40</module>
	<module>ae</module>
	<module>atlas-container</module>
	<module>atlas-jms</module>
	<module>billerdatamodel</module>
	<module>cam</module>
	<module>cingulardatamodel</module>
	<module>clarify</module>
	<module>compass</module>
	<module>csi-container</module>
	<module>csi-jms</module>
	<module>ericsson</module>
	<module>geh</module>
	<module>csi-ccp</module>
	<module>nppc</module>
	<module>schemaUpgrade</module>
</modules>

<dependencies>
	<dependency>
		<groupId>org.osgi</groupId>
		<artifactId>org.osgi.core</artifactId>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>acsi.gddn.osgi.util</groupId>
		<artifactId>jaxb.dpool.anno</artifactId>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>acsi.gddn.osgi.util</groupId>
		<artifactId>common.utils</artifactId>
		<version>${gddn.version}</version>
		<scope>provided</scope>
	</dependency>
	
	<dependency>
		<groupId>acsi.gddn.osgi.util</groupId>
		<artifactId>jaxb.dpool</artifactId>
		<version>${gddn.version}</version>
		<scope>provided</scope>
	</dependency>
</dependencies>

<build>
	<finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
	<pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${surefire.version}</version>
				<configuration>
					<parallel>methods</parallel>
					<threadCount>10</threadCount>
					<forkMode>once</forkMode>
					<workingDirectory>target</workingDirectory>
					<argLine>-Djava.library.path=${basedir}/lib</argLine>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>${maven.dependency.plugin.version}</version>
				<executions>
					<execution>
						<id>copy-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<prependGroupId>true</prependGroupId>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${maven.resources.plugin.version}</version>
			</plugin>

			<!-- default jaxb xjc config -->
			<plugin>
				<groupId>org.jvnet.jaxb</groupId>
				<artifactId>jaxb-maven-plugin</artifactId>
				<version>${jaxb2.plugin.version}</version>
				<inherited>true</inherited>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
							<specVersion>2.2</specVersion>
							<extension>true</extension>
							<removeOldOutput>true</removeOldOutput>
							<verbose>true</verbose>
							<forceRegenerate>true</forceRegenerate>
							<args>
								<arg>-Xdefault-value</arg>
								<arg>-Xannotate</arg>
								<arg>-Xdpool-xjc-plugin</arg>
								<arg>-Xdpool-schema-version ${commonservices.schema.version}</arg>
							</args>
							<plugins>
								<plugin>
									<groupId>org.jvnet.jaxb2_commons</groupId>
									<artifactId>jaxb2-basics</artifactId>
									<version>${jaxb2.basics.version}</version>
								</plugin>
								<plugin>
									<groupId>org.jvnet.jaxb2_commons</groupId>
									<artifactId>jaxb2-basics-annotate</artifactId>
									<version>${jaxb2.basics.version}</version>
								</plugin>
								<plugin>
									<groupId>acsi.gddn.util</groupId>
									<artifactId>jaxb.dpool.plugin</artifactId>
									<version>${gddn.version}</version>
								</plugin>
							</plugins>
							<destDir>target/generated-sources/xjc</destDir>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.slf4j</groupId>
						<artifactId>slf4j-api</artifactId>
						<version>${slf4j.version}</version>
					</dependency>
					<dependency>
						<groupId>org.slf4j</groupId>
						<artifactId>jcl-over-slf4j</artifactId>
						<version>${slf4j.version}</version>
					</dependency>
					<dependency>
						<groupId>ch.qos.logback</groupId>
						<artifactId>logback-core</artifactId>
						<version>${logback.version}</version>
					</dependency>
					<dependency>
						<groupId>ch.qos.logback</groupId>
						<artifactId>logback-classic</artifactId>
						<version>${logback.version}</version>
					</dependency>
					<dependency>
						<groupId>org.jvnet.jaxb2_commons</groupId>
						<artifactId>jaxb2-default-value</artifactId>
						<version>1.1</version>
					</dependency>
					<dependency>
						<groupId>acsi.gddn.osgi.util</groupId>
						<artifactId>jaxb.dpool.anno</artifactId>
						<version>${gddn.version}</version>
						<scope>compile</scope>
					</dependency>
				</dependencies>
			</plugin>

			<!--  default OSGi maven-bundle-plugin config -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>${maven.bundle.plugin.version}</version>
				<extensions>true</extensions>
				<!-- the following instructions build a simple set of public/private
					classes into an OSGi bundle -->
				<configuration>
					<manifestLocation>${project.build.directory}/META-INF</manifestLocation>
					<unpackBundle>true</unpackBundle>
					<instructions>
						<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
						<!-- assume public classes are in the top package, and private classes
							are under ".internal" -->
						<!-- Export-Package>!${project.groupId}.${package-qualifier}.internal.*,${project.groupId}.*;version="${project.version}"</Export-Package -->
						<!-- Private-Package>${project.groupId}.${package-qualifier}.internal.*</Private-Package -->
						<!-- Bundle-Activator>Should be specified in the per-bundle osgi.bnd
							file</Bundle-Activator -->
						<!-- Import-Package>*;scope=provided;resolution:=optional, *;scope=compile|runtime</Import-Package -->
						<!-- embed compile/runtime dependencies using path that matches the
							copied dependency folder -->
						<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
						<Embed-Directory>target/dependency</Embed-Directory>
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-StripGroup>true</Embed-StripGroup>

						<!-- | each module can override these defaults in their osgi.bnd file -->
						<_include>-osgi.bnd</_include>
						<_removeheaders>Bnd-LastModified</_removeheaders>

						<!-- include Java package version information.. -->
						<Specification-Title>${project.groupId}.${project.artifactId}</Specification-Title>
						<Specification-Version>${project.version}</Specification-Version>
						<Specification-Vendor>ACSI</Specification-Vendor>
						<Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
						<Implementation-Version>${project.version}-${maven.build.timestamp}</Implementation-Version>
						<Implementation-Vendor>ACSI</Implementation-Vendor>
						<Implementation-Build>${maven.build.timestamp}</Implementation-Build>

					</instructions>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<!-- This main-class is in the config-generator project. since
											we re-shade that project into each of the configuration projects, we have
											to declare the main-class outside of the project that defines it. -->
										<Main-Class>acsi.gddn.configuration.config.fmpp.generator.CmdLine</Main-Class>
										<url>${project.url}</url>

										<Specification-Title>${project.groupId}.${project.artifactId}</Specification-Title>
										<Specification-Version>${project.version}</Specification-Version>
										<Specification-Vendor>ACSI</Specification-Vendor>
										<Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
										<Implementation-Version>${project.version}-${maven.build.timestamp}</Implementation-Version>
										<Implementation-Vendor>ACSI</Implementation-Vendor>
										<Implementation-Build>${maven.build.timestamp}</Implementation-Build>
									</manifestEntries>
								</transformer>
							</transformers>
							<minimizeJar>false</minimizeJar>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>distro-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
							<descriptor>src/assemblies/kit.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- Specify version -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.7</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.8</version>
			</plugin>
			<plugin>
				<groupId>acsi.gddn.util</groupId>
				<artifactId>jaxb.schemacatalog.plugin</artifactId>
				<version>${gddn.version}</version>
			</plugin>

			<!-- handle certain m2e plugin life cycle mapping -->
			<plugin>
				<groupId>org.eclipse.m2e</groupId>
				<artifactId>lifecycle-mapping</artifactId>
				<version>1.0.0</version>
				<configuration>
					<lifecycleMappingMetadata>
						<pluginExecutions>

							<!-- exec-maven-plugin - ignore -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.codehaus.mojo</groupId>
									<artifactId>exec-maven-plugin</artifactId>
									<versionRange>[1.0.0,)</versionRange>
									<goals>
										<goal>java</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore />
								</action>
							</pluginExecution>

							<!-- maven-remote-resources-plugin - ignore -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.apache.maven.plugins</groupId>
									<artifactId>maven-remote-resources-plugin</artifactId>
									<versionRange>[1.0.0,)</versionRange>
									<goals>
										<goal>bundle</goal>
										<goal>process</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<ignore />
								</action>
							</pluginExecution>

							<!-- maven-dependency-plugin - copy-dependencies - ignore -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.apache.maven.plugins</groupId>
									<artifactId>maven-dependency-plugin</artifactId>
									<versionRange>[1.0.0,)</versionRange>
									<goals>
										<goal>copy-dependencies</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute />
								</action>
							</pluginExecution>

							<!-- maven-dependency-plugin - unpack-dependencies - execute -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.apache.maven.plugins</groupId>
									<artifactId>maven-dependency-plugin</artifactId>
									<versionRange>[0.0,)</versionRange>
									<goals>
										<goal>unpack-dependencies</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute />
								</action>
							</pluginExecution>
							<!-- maven-dependency-plugin - unpack - execute -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>org.apache.maven.plugins</groupId>
									<artifactId>maven-dependency-plugin</artifactId>
									<versionRange>[0.0,)</versionRange>
									<goals>
										<goal>unpack</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute />
								</action>
							</pluginExecution>
							<!-- fmpp-maven-plugin - generate - execute -->
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>com.googlecode.fmpp-maven-plugin</groupId>
									<artifactId>fmpp-maven-plugin</artifactId>
									<versionRange>[0.0,)</versionRange>
									<goals>
										<goal>generate</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute />
								</action>
							</pluginExecution>
							<pluginExecution>
								<pluginExecutionFilter>
									<groupId>acsi.gddn.util</groupId>
									<artifactId>jaxb.schemacatalog.plugin</artifactId>
									<versionRange>[1.0.0,)</versionRange>
									<goals>
										<goal>GenCatalogs</goal>
									</goals>
								</pluginExecutionFilter>
								<action>
									<execute />
								</action>
							</pluginExecution>
						</pluginExecutions>
					</lifecycleMappingMetadata>
				</configuration>
			</plugin>
		</plugins>
	</pluginManagement>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.7.0</version>
			<inherited>true</inherited>
			<configuration>
				<compilerVersion>17</compilerVersion>
				<source>17</source>
				<target>17</target>
				<debug>true</debug>
				<verbose>true</verbose>
				<compilerArgument />
			</configuration>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<inherited>true</inherited>
		</plugin>
		<plugin>
			<groupId>org.apache.felix</groupId>
			<artifactId>maven-bundle-plugin</artifactId>
			<inherited>true</inherited>
		</plugin>
		<plugin>
			<!-- Eclipse PDE expects dependencies to exist in specific locations.. -->
			<artifactId>maven-dependency-plugin</artifactId>
			<inherited>true</inherited>
		</plugin>
	</plugins>
</build>
<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>${org.osgi.core.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>acsi.gddn.osgi.util</groupId>
			<artifactId>jaxb.dpool.anno</artifactId>
			<version>${gddn.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</dependencyManagement>
   <distributionManagement>
	<repository>	<!-- organization repo path -->	</repository>
</distributionManagement>

Here is Parent pom.xml of module where build fails...

4.0.0 acsi.gddn.atlas.schema gddn-build 24.08.00.00-RELEASE

ae

<name>${project.artifactId} [${project.groupId}]</name>

<description>
 Schemas for AE (Legacy ${commonservices.legacy.schema.version})
</description>

<packaging>bundle</packaging>

<dependencies>
	<dependency>
		<groupId>acsi.gddn.osgi.util</groupId>
		<artifactId>jaxb.dpool.spec</artifactId>
		<version>${gddn.version}</version>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>acsi.gddn.atlas.schema</groupId>
		<artifactId>CommonServices-v${commonservices.legacy.schema.version}</artifactId>
		<version>${project.version}</version>
		<scope>provided</scope>
	</dependency>
</dependencies>

<build>

	<resources>
		<resource>
			<directory>${basedir}/target/generated-resources/xjc</directory>
		</resource>
	</resources>

	<plugins>

		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-resources-plugin</artifactId>
			<executions>
				<execution>
					<id>filterBindings</id>
					<phase>initialize</phase>
					<goals>
						<goal>copy-resources</goal>
					</goals>
					<configuration>
						<outputDirectory>${basedir}/target/generated-resources/xjc</outputDirectory>
						<resources>
							<resource>
								<directory>${basedir}/src/main/resources</directory>
								<filtering>true</filtering>
							</resource>
						</resources>
					</configuration>
				</execution>
			</executions>
		</plugin>

		<plugin>
			<groupId>org.jvnet.jaxb</groupId>
			<artifactId>jaxb-maven-plugin</artifactId>
			<executions>
				<execution>
					<phase>generate-sources</phase>
					<goals>
						<goal>generate</goal>
					</goals>
					<configuration>
						<schemas>
							<schema>
								<dependencyResource>
									<groupId>acsi.gddn.atlas.schema</groupId>
									<artifactId>CommonServices-v${commonservices.legacy.schema.version}</artifactId>
									<resource>Schemas/v${commonservices.legacy.schema.version}/Atlas/Legacy/AE/Base/ResponseStatus.xsd</resource>
								</dependencyResource>
							</schema>
							<schema>
								<dependencyResource>
									<groupId>acsi.gddn.atlas.schema</groupId>
									<artifactId>CommonServices-v${commonservices.legacy.schema.version}</artifactId>
									<resource>Schemas/v${commonservices.legacy.schema.version}/Atlas/Legacy/AE/Base/ServiceEntityFault.xsd</resource>
								</dependencyResource>
							</schema>
						</schemas>
						<bindingDirectory>${basedir}/target/generated-resources/xjc</bindingDirectory>
						<bindingIncludes>
							<include>**/*.xjb</include>
						</bindingIncludes>
						<args>
							<arg>-Xdefault-value</arg>
							<arg>-Xannotate</arg>
							<arg>-Xdpool-xjc-plugin</arg>
							<arg>-Xdpool-schema-version ${commonservices.legacy.schema.version}</arg>
							<arg>-Xdpool-episode-spec acsi.gddn.atlas.schema.ae.model.osgi.impl.EpisodeSpecImpl</arg>
						</args>
					</configuration>
				</execution>
			</executions>
		</plugin>

	</plugins>
	
</build>

@laurentschoelens
Copy link
Collaborator

I've seen in your stacktrace the following error :

Caused by: java.net.UnknownHostException: csi.cingular.com

Also I'd suggest you upgrade also the jaxb2-basics dependency to the corresponding version of the plugin. Please look at migration guide.
With the new version, you'll also have the Default Value Plugin in it.

@ssanket143
Copy link
Author

Thank you @laurentschoelens for suggestions.
I have tried adding all the required plugins with corrosponding version but actual issue is : Caused by: java.net.MalformedURLException: unknown protocol: maven

plugins=[file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb/jaxb2-basics/2.0.14/jaxb2-basics-2.0.14.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb/jaxb2-basics-runtime/2.0.14/jaxb2-basics-runtime-2.0.14.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2_commons/jaxb2-basics-runtime/2.0.12/jaxb2-basics-runtime-2.0.12.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb/jaxb2-basics-tools/2.0.14/jaxb2-basics-tools-2.0.14.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/slf4j/slf4j-api/1.7.24/slf4j-api-1.7.24.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/commons-beanutils/commons-beanutils/1.9.4/commons-beanutils-1.9.4.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/slf4j/jcl-over-slf4j/1.7.36/jcl-over-slf4j-1.7.36.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/github/javaparser/javaparser-core/3.25.9/javaparser-core-3.25.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb/jaxb-basics-annotate/2.0.14/jaxb-basics-annotate-2.0.14.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb/jaxb-annox/2.0.14/jaxb-annox-2.0.14.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/util/jaxb.dpool.plugin/24.08.00.00-RELEASE/jaxb.dpool.plugin-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/0.15.3/maven-jaxb2-plugin-0.15.3.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin-core/0.15.3/maven-jaxb2-plugin-core-0.15.3.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/org/apache/xml/internal/resolver/20050927/resolver-20050927.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/glassfish/jaxb/txw2/2.3.7/txw2-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-plugin-api/2.0.9/maven-plugin-api-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-project/2.0.9/maven-project-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-settings/2.0.9/maven-settings-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-model/2.0.9/maven-model-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/junit/junit/4.8.2/junit-4.8.2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-profile/2.0.9/maven-profile-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-artifact-manager/2.0.9/maven-artifact-manager-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-repository-metadata/2.0.9/maven-repository-metadata-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-artifact/2.0.9/maven-artifact-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/maven-plugin-registry/2.0.9/maven-plugin-registry-2.0.9.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.7.1/maven-plugin-annotations-3.7.1.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2/maven2/maven-jaxb23-plugin/0.15.3/maven-jaxb23-plugin-0.15.3.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/glassfish/jaxb/jaxb-runtime/2.3.7/jaxb-runtime-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/istack/istack-commons-runtime/3.0.12/istack-commons-runtime-3.0.12.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/glassfish/jaxb/jaxb-xjc/2.3.7/jaxb-xjc-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/glassfish/jaxb/xsom/2.3.7/xsom-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/xml/bind/external/relaxng-datatype/2.3.7/relaxng-datatype-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/glassfish/jaxb/codemodel/2.3.7/codemodel-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/xml/bind/external/rngom/2.3.7/rngom-2.3.7.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/xml/dtd-parser/dtd-parser/1.4.5/dtd-parser-1.4.5.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/istack/istack-commons-tools/3.0.12/istack-commons-tools-3.0.12.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/osgi/exceptions/24.08.00.00-RELEASE/exceptions-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/osgi/util/jaxb.dpool.anno/24.08.00.00-RELEASE/jaxb.dpool.anno-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/osgi/util/jaxb.dpool.spec/24.08.00.00-RELEASE/jaxb.dpool.spec-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/GIT/GDDN/atlas-schema/acsi.gddn.atlas.schema/CommonServices-v00/target/acsi.gddn.atlas.schema.CommonServices-v00-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/osgi/org.osgi.core/4.3.1/org.osgi.core-4.3.1.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/osgi/util/common.utils/24.08.00.00-RELEASE/common.utils-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/xml/bind/jaxb-core/2.3.0/jaxb-core-2.3.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/xml/bind/jaxb-impl/2.3.0/jaxb-impl-2.3.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/acsi/gddn/osgi/util/jaxb.dpool/24.08.00.00-RELEASE/jaxb.dpool-24.08.00.00-RELEASE.jar, file:/C:/Users/sc949r/.m2/gddnatlas/repository/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar]
readOnly=false
packageLevelAnnotations=true
noFileHeader=false
enableIntrospection=false
disableXmlSecurity=true
accessExternalSchema=all
accessExternalDTD=all
contentForWildcard=false
extension=true
strict=true
verbose=true
debugMode=false
arguments=[-Xdefault-value, -Xannotate, -Xdpool-xjc-plugin, -Xdpool-schema-version 00, -Xdpool-episode-spec acsi.gddn.atlas.schema.ae.model.osgi.impl.EpisodeSpecImpl, -episode, C:\Users\sc949r\GIT\GDDN\atlas-schema\acsi.gddn.atlas.schema\ae\target\generated-sources\xjc\META-INF\sun-jaxb.episode]]
[WARNING] You are using forceRegenerate=true in your configuration.
This configuration setting is deprecated and not recommended as it causes problems with incremental builds in IDEs.
Please refer to the following link for more information:
https://github.com/highsource/jaxb-tools/wiki/Do-Not-Use-forceRegenerate
Consider removing this setting from your plugin configuration.

[INFO] The [forceRegenerate] switch is turned on, XJC will be executed.
[INFO] Parsing input schema(s)...
[WARNING] Error while parsing schema(s).Location [ maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd{13,149}].
org.xml.sax.SAXParseException; systemId: maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd; lineNumber: 13; columnNumber: 149; schema_reference.4: Failed to read schema document 'ServiceEntityFault.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:100)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4254)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4249)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2543)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2239)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2129)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1050)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:653)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:618)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:577)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:543)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:281)
at com.sun.tools.xjc.reader.xmlschema.parser.SchemaConstraintChecker.check(SchemaConstraintChecker.java:81)
at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:301)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:121)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76)
at org.jvnet.jaxb.maven.XJC2Mojo.loadModel(XJC2Mojo.java:58)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:48)
at org.jvnet.jaxb.maven.XJC2Mojo.doExecute(XJC2Mojo.java:28)
at org.jvnet.jaxb.maven.RawXJC2Mojo.doExecute(RawXJC2Mojo.java:491)
at org.jvnet.jaxb.maven.RawXJC2Mojo.execute(RawXJC2Mojo.java:330)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:904)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:281)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:204)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: java.net.MalformedURLException: unknown protocol: maven
at java.base/java.net.URL.(URL.java:681)
at java.base/java.net.URL.(URL.java:569)
at java.base/java.net.URL.(URL.java:516)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:150)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:593)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:696)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2227)
... 43 more
[ERROR] Error while parsing schema(s).Location [ maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd{21,90}].
org.xml.sax.SAXParseException; systemId: maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd; lineNumber: 21; columnNumber: 90; src-resolve: Cannot resolve the name 'sef:ServiceEntityFault' to a(n) 'element declaration' component.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)

@laurentschoelens
Copy link
Collaborator

Could you share MRE (minimal reproductible example) so I can analyse this deeper ?

@laurentschoelens
Copy link
Collaborator

Moreover, I've seen some strange things, did you still have some org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.15.3 stuff ?

file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/0.15.3/maven-jaxb2-plugin-0.15.3.jar,
file:/C:/Users/sc949r/.m2/gddnatlas/repository/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin-core/0.15.3/maven-jaxb2-plugin-core-0.15.3.jar, 

@ssanket143
Copy link
Author

ssanket143 commented Aug 26, 2024

I dont have org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.15.3 anymore but will again clean build the project and prepare an MRE for your reference to share.

@laurentschoelens
Copy link
Collaborator

Maybe as dependency of some other dependency.
Like the jaxb.dpool.plugin maybe. I dont find it in public maven repo

@ssanket143
Copy link
Author

ssanket143 commented Aug 30, 2024

Hi @laurentschoelens I'm still trying to figure out way to share MRE but meanwhile going through migration guide i came across below page at the end about issue with import in schema..
https://github.com/highsource/jaxb-tools/wiki/Modular-Schema-Compilation

Here is my xsd which is failing to parse schema and the error..

<?xml version = "1.0" encoding = "UTF-8"?>

<xsd:schema	xmlns="http://csi.cingular.com/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd" targetNamespace="http://csi.cingular.com/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd" xmlns:xsd = "http://www.w3.org/2001/XMLSchema" xmlns:sef="http://csi.cingular.com/Schemas/v00/Atlas/Legacy/AE/Base/ServiceEntityFault.xsd"	elementFormDefault = qualified">

	<xsd:import namespace="http://csi.cingular.com/Schemas/v00/Atlas/Legacy/AE/Base/ServiceEntityFault.xsd" schemaLocation = "ServiceEntityFault.xsd"/>
	<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by b (k) -->
	
	<xsd:element name = "ResponseStatus">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name = "responseCode" type = "xsd:string"/>
				<xsd:element name = "responseDescription" type = "xsd:string" minOccurs = "0"/>
				<xsd:element ref = "sef:ServiceEntityFault" minOccurs = "0" maxOccurs = "unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>

[WARNING] Error while parsing schema(s).Location [ maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd{13,151}].
org.xml.sax.SAXParseException; systemId: maven:acsi.gddn.atlas.schema:CommonServices-v00:jar::!/Schemas/v00/Atlas/Legacy/AE/Base/ResponseStatus.xsd; lineNumber: 13; columnNumber: 151; schema_reference.4: Failed to read schema document 'ServiceEntityFault.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
.
.
.
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
Caused by: java.net.MalformedURLException: unknown protocol: maven
at java.base/java.net.URL.(URL.java:681)
at java.base/java.net.URL.(URL.java:569)
at java.base/java.net.URL.(URL.java:516)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)

If you can suggest which plugin and version i should try for Java 17 ?

@laurentschoelens
Copy link
Collaborator

Maybe as dependency of some other dependency.
Like the jaxb.dpool.plugin maybe. I dont find it in public maven repo

@ssanket143 could you tell me this ?

@ssanket143
Copy link
Author

Hi @laurentschoelens yes that jaxb.dpool.plugin is internal dependency added as new module.
I have shared MRE as two repo, if you could please take a look once and suggest the fix.
https://github.com/ssanket143/gddn
https://github.com/ssanket143/atlas-schema

@ssanket143 ssanket143 changed the title Using Java 17 (works with JDK 8) with org.jvnet.jaxb:jaxb-maven-plugin:2.0.14:generate but maven build fails with error: Unable to parse input schema(s). Using Java 17 (works with JDK 8) with org.jvnet.jaxb:jaxb-maven-plugin:2.0.14:generate maven build fails with error: Unable to parse input schema(s). Sep 3, 2024
@laurentschoelens
Copy link
Collaborator

Hi @ssanket143

Thanks for the MRE in the two repository.
From what I've seen, it's quite complex but, my first idea is a good one : you may have dependencies issues with the jaxb.dpool.plugin :

Context of line 19 to 29

        <properties>
		<jaxb2.plugin.version>0.9.0</jaxb2.plugin.version>
                <maven.shade.plugin.version>2.4.3</maven.shade.plugin.version>
	</properties>

	<dependencies>
		<!-- lib dependencies -->
		<dependency>
			<groupId>org.jvnet.jaxb2.maven2</groupId>
			<artifactId>maven-jaxb2-plugin</artifactId>
			<version>${jaxb2.plugin.version}</version>
		</dependency>

Your plugin is depending on older maven-jaxb2-plugin, which I think is also wrong since it only should depend on jaxb-xjc artifact. By doing so, you may have conflicts with XJC / JAXB and other libraries that was upgraded to support JDK17.

You should remove this dependency and replace it with the good one(s) (I guess jaxb-xjc is a good first step)

    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-xjc</artifactId>
      <version>2.3.9</version>
    </dependency>

You should also consider moving to latest 2.3.x jaxb-api and jaxb-runtime in order to be sure to support JDK17.

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Sep 4, 2024

See commit https://github.com/ssanket143/gddn/commit/17d1c8de8b1ca5008526d6a26beb67ce9674efb4 for minimal adjustments I've spotted.
Can't compile since missing parent pom.xml in your MRE

@ssanket143
Copy link
Author

ssanket143 commented Sep 4, 2024

image

Thank you @laurentschoelens for your feedback and changes, we have parent pom.xml in both repo. Just we need to run maven build on \gddn\acsi.gddn for 1st repo and \atlas-schema\acsi.gddn.atlas.schema for 2nd repo. I did try to compile but still same error.

image

image

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Sep 4, 2024

I'm getting following error :

Could not resolve dependencies for project acsi.gddn.osgi:gddn-build:pom:24.08.00.00-RELEASE: The following artifacts could not be resolved: acsi.gddn:unittest:jar:24.08.00.00-RELEASE (absent): acsi.gddn:unittest:jar:24.08.00.00-RELEASE was not found

@ssanket143
Copy link
Author

image

i have commented that unncessary dependency

@laurentschoelens
Copy link
Collaborator

It's used in the common.utils module / artifact and in the surefire plugin.
I ended up creating empty module with only two classes (Unstable and Soak) to make it pass

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Sep 5, 2024

I've made some adjustments but even with downgrading to jdk8 and using 0.15.3, still having same issue.
Could you share MRE working with JDK8 (and maybe previous version of plugin) so I can reproduce the : not working in 2.0.14 with JDK17 but working with JDK8 ?

@ssanket143
Copy link
Author

Ok @laurentschoelens , will share working MRE with JDK8 which uses 0.9.0 version of plugin.

@laurentschoelens
Copy link
Collaborator

Many thanks. Waiting for this 😀

@ssanket143
Copy link
Author

ssanket143 commented Sep 6, 2024

I have added two new repo which works with JDK 8 and plugin 0.9.0 version to parse and compile schema with import statements in xsd.
https://github.com/ssanket143/gddn_8/
https://github.com/ssanket143/atlas-schema_8

Also lookout for difference in NetHelper and UuidHelper classes under common.utils for JDK8 and JDK17 repo, if that makes any difference here for issue we are trying to resolve

@laurentschoelens
Copy link
Collaborator

Could you grant me access please ? 😄

@laurentschoelens
Copy link
Collaborator

Build is OK for gddn_8 and atlas-schema_8 with JDK8, I can try look what's going wrong 👍

@laurentschoelens
Copy link
Collaborator

What I can tell is, 0.9.0 is OK with JDK8, as well as 0.9.1, but moving to 0.10.0 breaks build with JDK8.
I'll dig in more to see what might have change in this.

@laurentschoelens
Copy link
Collaborator

@ssanket143
Copy link
Author

I went through that earlier but couldn't follow much as i'm not able to open https://java.net/jira/browse/ .
Hence requesting your help to understand if that stopped working from 0.10.0 , is there a workaround that we can make code change to still make it work ?

@laurentschoelens
Copy link
Collaborator

You can look at the issues in github (they are migrated) : example like https://github.com/eclipse-ee4j/jaxb-ri/issues/1044 here eclipse-ee4j/jaxb-ri#1044

It's too deep in jaxb-ri and plugin for me to understand why it failed with 0.10.0 modifications and it might need updates in both jaxb-ri and maven-plugin to make it works again if feasible 😞

@laurentschoelens
Copy link
Collaborator

laurentschoelens commented Sep 8, 2024

I've managed to do some adjustments to make it work again but that need new jaxb-ri release and I don't feel OK with the modifications in it.

My best bet in order for you to go forward would be to add an extra :

<plugin>
    <!-- add XSD from schemas into the temp directory -->
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
        <execution>
            <id>copy</id>
            <phase>initialize</phase>
            <goals>
                <goal>unpack</goal>
            </goals>
            <configuration>
                <artifactItems>
                    <artifactItem>
                        <groupId>acsi.gddn.atlas.schema</groupId>
                        <artifactId>CommonServices-v${commonservices.legacy.schema.version}</artifactId>
                        <overWrite>true</overWrite>
                        <outputDirectory>target</outputDirectory>
                    </artifactItem>
                </artifactItems>
            </configuration>
        </execution>
    </executions>
</plugin>

And then run the jaxb-maven-plugin with the copy of the XSD in the target directory.
That should do the job for me.

@ssanket143
Copy link
Author

Thank you @laurentschoelens for this awesome workaround, i have tried it in MRE and believe it will work with my actual implementation as well.

@laurentschoelens
Copy link
Collaborator

Glad to hear it worked for you too

Maybe it will work one day "out of the box" but for the moment, maven dependency resource with relative imports will certainly fail from what I've seen in xjc code

Repository owner deleted a comment from MinecraftEarthVillage Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants