The absolute path of the xsl reference may be a problem, I suggest
removing the leading "/" and seeing if that helps.

On Mon, Dec 16, 2019 at 6:50 AM robertlazarski .
<robertlazar...@gmail.com> wrote:
>
> Somehow it seems axis2-xmlbeans-1.7.9.jar is not in the same
> classloader that calls getClass() in the getSourceFromTemplateName()
> method. The URL resource of the xsl file is not in any of the jars
> loaded.
>
> The level of detail here is helpful, it eliminates a lot of things
> already. Try passing -X into maven, it will show if
> axis2-xmlbeans-1.7.9.jar is being loaded by maven and from where. If
> its loaded in the same classloader, there is problem maybe with the
> path or name of the xsl file.
>
> Regards,
> Robert
>
> On Mon, Dec 16, 2019 at 4:53 AM Mike Fryars <mfry...@hotmail.com> wrote:
> >
> > Hello Robert, no not Ant-based, it's a maven plugin that runs code 
> > generation. (axis2-wsdl2code-maven-plugin)
> > Some news:
> > 1) The Windows vs Linux difference is a red herring, in fact the problem is 
> > showing up under Windows as well as Linux now. (kind of good news in a way)
> > 2) I did some investigation to find out where the "databindsupporter" error 
> > comes from...
> > The "databindsupporter" string is present as a place-holder in :
> >               axis2-codegen-1.7.9.jar : 
> > /org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
> > ... and is supposed to cause another XST to be pulled at the moment of 
> > 'compilation'.
> >   - My maven POM supplies a configuration value of databindingName=xmlbeans
> >   - codegen-config.properties maps this to a specific XSL file to pull in
> >               axis2-codegen-1.7.9.jar : 
> > /org/apache/axis2/wsdl/codegen/codegen-config.properties
> >                   
> > codegen.databinding.xmlbeans.supporter.template=/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
> > (this .xsl is present in axis2-xmlbeans-1.7.9.jar)
> >   - axis2-codegen-1.7.9.jar : org.apache.axis2.wsdl.util.XSLTIncludeResolver
> >               private Source getSourceFromTemplateName(String templateName) 
> > throws TransformerException
> >                   ...
> >                   URL templateUrl = getClass().getResource(templateName);
> > This method receives 
> > "/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl" as a 
> > parameter and attempts to read the file in as a resource. But the call to 
> > getClass().getResource(templateName) returns null.  [I confirmed this by 
> > tweaking/recompiling the source to add some debug output]
> > So the problem seems to come down to failing to read in the 
> > xmlbeans-specific file from a different jar.
> > I note that the old implementation (1.4.1) of this method uses 
> > getResourceAsStream() rather than getResource() here.
> > However, when I experimented with replacing this method in 1.7.9 with the 
> > 1.4.1 version, the build passed this step but failed later on, again with a 
> > message relating to a null URL object.
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Michael FRYARS
> > mfry...@hotmail.com
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > ________________________________
> > From: robertlazarski . <robertlazar...@gmail.com>
> > Sent: 05 December 2019 14:24
> > To: java-dev@axis.apache.org <java-dev@axis.apache.org>
> > Subject: Re: axis2 codegen error: No such file or directory: 
> > databindsupporter
> >
> > This is a build via jenkins right, that is running ant for codegen? Try 
> > passing -debug and -verbose to ant in the build, and paste the entire build 
> > output here.
> >
> > On Wed, Dec 4, 2019 at 4:45 AM Mike Fryars <mfry...@hotmail.com> wrote:
> >
> > Hi Robert, the file doesn't exist, no. But then it never has up to now. The 
> > old stack worked without it, the new stack works without it as long as the 
> > Maven build is under Windows. But under linux the new stack fails.
> > I'm guessing here, but the "databindsupporter" (referenced in 
> > /org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl) 
> > looks like a place holder that should be replaced by something more 
> > specific, i.e. something specific to XmlBeans in my case.
> > Execution of the maven mojo seems like it should know to use XmlBeans (see 
> > config parameter databindingName) …
> >
> > [DEBUG] Configuring mojo 
> > org.apache.axis2:axis2-wsdl2code-maven-plugin:1.7.9:wsdl2code from plugin 
> > realm 
> > ClassRealm[plugin>org.apache.axis2:axis2-wsdl2code-maven-plugin:1.7.9, 
> > parent: jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29]
> > [DEBUG] Configuring mojo 
> > 'org.apache.axis2:axis2-wsdl2code-maven-plugin:1.7.9:wsdl2code' with basic 
> > configurator -->
> > [DEBUG]   (f) allPorts = false
> > [DEBUG]   (f) backwardCompatible = false
> > [DEBUG]   (f) databindingName = xmlbeans
> > [DEBUG]   (f) flattenFiles = false
> > [DEBUG]   (f) generateAllClasses = false
> > [DEBUG]   (f) generateServerSide = false
> > [DEBUG]   (f) generateServerSideInterface = false
> > [DEBUG]   (f) generateServicesXml = false
> > [DEBUG]   (f) generateTestcase = false
> > [DEBUG]   (f) language = java
> > [DEBUG]   (f) options = {}
> > [DEBUG]   (f) outputDirectory = 
> > /var/lib/jenkins/workspace/spf_core_Webservices_develop/MyAppWsAuthenticateClient/generated-sources
> > [DEBUG]   (f) overWrite = false
> > [DEBUG]   (f) packageName = myfirm.myproduct.api.iptv._1.authentication
> > [DEBUG]   (f) project = MavenProject: 
> > com.myfirm.myproduct.myAppWs:myAppWsAuthenticateClient:1.17.1-SNAPSHOT @ 
> > /var/lib/jenkins/workspace/spf_core_Webservices_develop/MyAppWsAuthenticateClient/pom.xml
> > [DEBUG]   (f) skipBuildXML = false
> > [DEBUG]   (f) skipMessageReceiver = false
> > [DEBUG]   (f) skipWSDL = false
> > [DEBUG]   (f) suppressPrefixes = false
> > [DEBUG]   (f) syncMode = sync
> > [DEBUG]   (f) targetSourceFolderLocation = src
> > [DEBUG]   (f) unpackClasses = true
> > [DEBUG]   (f) unwrap = false
> > [DEBUG]   (f) wsdlFile = 
> > /var/lib/jenkins/workspace/spf_core_Webservices_develop/MyAppWsAuthenticateClient/../MyAppWsCommon/wsdl/myproduct_authentication_1.wsdl
> > [DEBUG] -- end configuration --
> >
> >
> >
> > ________________________________
> > From: robertlazarski . <robertlazar...@gmail.com>
> > Sent: 04 December 2019 14:13
> > To: java-dev@axis.apache.org <java-dev@axis.apache.org>
> > Subject: Re: axis2 codegen error: No such file or directory: 
> > databindsupporter
> >
> > That's a very similar environment as my day job, does the dir exist? My 
> > guess is the path is wrong in your config. Less likely but possible, is it 
> > exists though without read access somehow.
> >
> > /var/lib/jenkins/workspace/spf_core_Webservices_develop/databindsupporter
> >
> > Regards,
> > Robert
> >
> > On Tue, Dec 3, 2019 at 11:43 PM Mike Fryars <mfry...@hotmail.com> wrote:
> >
> > Cross-posting from java-user since it may be too low-level to get much 
> > response from fellow users...
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > Hi, can anyone tell me about this error during axis2 code generation from a 
> > Maven build?
> > [INFO] --- axis2-wsdl2code-maven-plugin:1.7.9:wsdl2code
> > .....
> > ERROR:  'Could not compile stylesheet'
> > FATAL ERROR:  
> > '/var/lib/jenkins/workspace/spf_core_Webservices_develop/databindsupporter 
> > (Aucun fichier ou dossier de ce type)'
> >            
> > :/var/lib/jenkins/workspace/spf_core_Webservices_develop/databindsupporter 
> > (Aucun fichier ou dossier de ce type)
> > java.io.FileNotFoundException: 
> > /var/lib/jenkins/workspace/spf_core_Webservices_develop/databindsupporter 
> > (Aucun fichier ou dossier de ce type)
> > at java.base/java.io.FileInputStream.open0(Native Method)
> > at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
> > at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
> > at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
> > at 
> > java.base/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
> > at 
> > java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:184)
> > at 
> > java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:654)
> > 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:860)
> > at 
> > java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
> > 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:1216)
> > at 
> > java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parse(Parser.java:429)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.parse(Parser.java:512)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Include.parseContents(Include.java:113)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseOwnChildren(Stylesheet.java:597)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.parseContents(Stylesheet.java:559)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.createAST(Parser.java:398)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:493)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compile(XSLTC.java:570)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:1018)
> > at 
> > java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:817)
> > at 
> > org.apache.axis2.util.XSLTTemplateProcessor.parse(XSLTTemplateProcessor.java:147)
> > at 
> > org.apache.axis2.util.XSLTTemplateProcessor.parse(XSLTTemplateProcessor.java:117)
> > at 
> > org.apache.axis2.wsdl.codegen.writer.FileWriter.parse(FileWriter.java:175)
> > at 
> > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeFile(AxisServiceBasedMultiLanguageEmitter.java:2663)
> > at 
> > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeInterface(AxisServiceBasedMultiLanguageEmitter.java:1254)
> > at 
> > org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:495)
> > at 
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:283)
> > at 
> > org.apache.axis2.maven2.wsdl2code.WSDL2CodeMojo.execute(WSDL2CodeMojo.java:653)
> >     .....
> > ("Aucun fichier ou dossier de ce type" = no file or folder of this type)
> > I'm getting the above error with the following stack:
> >     CentOS-7
> >     Jenkins
> >     jdk-11.0.2
> >     Maven 3
> >     Axis2 1.7.9
> >     XmlBeans
> > On an older technology stack (axis 1.4.1, Java 6, etc) the same WSDL/XSD 
> > set worked just fine.
> > On a Windows 10 PC the updated Maven build (without Jenkins) now works just 
> > fine with the same WSDL/XSD set.
> > But I need the updated CentOS-7/Jenkins build stack to work.
> > As I understand it the reference to databindsupporter is here:
> >     axis2-codegen-1.7.9.jar : 
> > /org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
> >         <!-- import the databinding template-->
> >         <xsl:include href="databindsupporter"/>
> > Any help/advice much appreciated, thanks in advance,
> > Mike Fryars
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to