3) -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
On Thu, Oct 15, 2020 at 1:41 AM robertlazarski <[email protected]> wrote: > Looks like you are running the axis2 client in Weblogic, and it is loading > xerces from the parent classloader instead of the application classloader. > > Two things you could try: > > 1) Add this to your weblogic-application.xml: > > <prefer-application-packages> > <package-name>com.ctc.wstx.*</package-name> > <package-name>javax.xml.*</package-name> > <package-name>org.apache.*</package-name> > </prefer-application-packages> > > https://axis.apache.org/axis2/java/core/docs/app_server.html > > 2) -*Djavax.xml.transform.TransformerFactory=* > com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl > > > On Wed, Oct 14, 2020 at 9:24 PM Levi, Yogev <[email protected]> wrote: > >> >> >> >> >> Hi >> >> >> >> In addition to the ant output in the attached file, I got the following >> error printed to the screen. >> >> I hope it will help you help me :) >> >> >> >> >> >> Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; >> support was removed in 8.0 >> >> >> >> BUILD FAILED >> >> D:\snap_views\11_2_for_3rdParty\netrac2_j2ee\jcore_mt\assembly\build\build.xml:22: >> The following error occurred while executing this line: >> >> D:\snap_views\11_2_for_3rdParty\netrac2_j2ee\jcore_ant\release\ant\common.xml:2292: >> org.apache.axis2.wsdl.codegen.CodeGenerationException: >> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException >> >> at >> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:294) >> >> at >> org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:416) >> >> at >> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) >> >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> >> at org.apache.tools.ant.Task.perform(Task.java:348) >> >> at >> org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) >> >> at net.sf.antcontrib.logic.IfTask.execute(IfTask.java:197) >> >> at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> >> at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:154) >> >> at >> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) >> >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> >> at org.apache.tools.ant.Task.perform(Task.java:348) >> >> at org.apache.tools.ant.Target.execute(Target.java:435) >> >> at org.apache.tools.ant.Target.performTasks(Target.java:456) >> >> at >> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) >> >> at >> org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) >> >> at org.apache.tools.ant.Project.executeTargets(Project.java:1248) >> >> at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:440) >> >> at >> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) >> >> at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) >> >> at org.apache.tools.ant.Task.perform(Task.java:348) >> >> at org.apache.tools.ant.Target.execute(Target.java:435) >> >> at org.apache.tools.ant.Target.performTasks(Target.java:456) >> >> at >> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) >> >> at org.apache.tools.ant.Project.executeTarget(Project.java:1364) >> >> at >> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) >> >> at org.apache.tools.ant.Project.executeTargets(Project.java:1248) >> >> at org.apache.tools.ant.Main.runBuild(Main.java:851) >> >> at org.apache.tools.ant.Main.startAnt(Main.java:235) >> >> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) >> >> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) >> >> Caused by: java.lang.RuntimeException: >> java.lang.reflect.InvocationTargetException >> >> at >> org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112) >> >> at >> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:247) >> >> ... 42 more >> >> Caused by: java.lang.reflect.InvocationTargetException >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> >> at java.lang.reflect.Method.invoke(Method.java:498) >> >> at >> org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101) >> >> ... 43 more >> >> Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: >> You are running with invalid JAXP api or implementation. JAXP >> api/implementation of version 1.3.1 (included in JDK6) or higher is >> required. In case you are using ant, make sure ant 1.7.0 or higher is used >> - older versions of ant contain JAXP api/impl version 1.2 (in >> xml-apis.jar). If you want to keep using older ant versions, you have to >> configure it to use higher the JAXP api/impl versions. >> >> at >> org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:355) >> >> ... 48 more >> >> Caused by: java.lang.IllegalStateException: You are running with invalid >> JAXP api or implementation. JAXP api/implementation of version 1.3.1 >> (included in JDK6) or higher is required. In case you are using ant, make >> sure ant 1.7.0 or higher is used - older versions of ant contain JAXP >> api/impl version 1.2 (in xml-apis.jar). If you want to keep using older ant >> versions, you have to configure it to use higher the JAXP api/impl versions. >> >> at >> com.sun.xml.bind.v2.util.XmlFactory.createDocumentBuilderFactory(XmlFactory.java:183) >> >> at >> com.sun.tools.xjc.reader.internalizer.DOMForest.<init>(DOMForest.java:162) >> >> at >> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.resetSchema(SchemaCompilerImpl.java:215) >> >> at >> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.<init>(SchemaCompilerImpl.java:114) >> >> at com.sun.tools.xjc.api.XJC.createSchemaCompiler(XJC.java:72) >> >> at >> org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:178) >> >> ... 48 more >> >> Caused by: java.lang.AbstractMethodError: >> javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V >> >> at >> com.sun.xml.bind.v2.util.XmlFactory.createDocumentBuilderFactory(XmlFactory.java:176) >> >> ... 53 more >> >> >> >> Total time: 0 seconds >> >> >> >> >> >> BR, >> >> *Yogev Levi* >> >> Senior Software Engineer >> >> *TEOCO Ltd.* >> >> c: >> >> +972 52 4455 708 >> >> p: >> >> +972 3 9269752 >> >> *E-mail: [email protected] <[email protected]>* >> >> www.teoco.com >> >> >> >> >> >> *From:* Levi, Yogev >> *Sent:* Thursday, October 15, 2020 9:41 AM >> *To:* [email protected] >> *Subject:* RE: axis2-1.7.9 running with invalid JAXP >> >> >> >> >> >> >> >> Hi Robert >> >> >> >> Thank you for the fast reply >> >> Please see the attached file with the output of the flags you recommended >> >> >> >> >> >> >> >> BR, >> >> *Yogev Levi* >> >> Senior Software Engineer >> >> *TEOCO Ltd.* >> >> c: >> >> +972 52 4455 708 >> >> p: >> >> +972 3 9269752 >> >> *E-mail: [email protected] <[email protected]>* >> >> www.teoco.com >> >> >> >> >> >> *From:* robertlazarski [mailto:[email protected] >> <[email protected]>] >> *Sent:* Thursday, October 15, 2020 1:40 AM >> *To:* [email protected] >> *Subject:* Re: axis2-1.7.9 running with invalid JAXP >> >> >> >> I suggest using these flags to ant, then paste the entire output: >> >> >> >> ant -verbose -debug -Djaxp.debug=1 >> >> >> >> Robert >> >> >> >> On Wed, Oct 14, 2020 at 4:08 AM Levi, Yogev <[email protected]> wrote: >> >> >> >> Hi >> >> >> >> I'm trying to generate axis2-1.7.9 stub files from wsdl file by calling >> axis2 classname="org.apache.axis2.tool.ant.AntCodegenTask" >> >> but I keep getting the following error: >> >> java.lang.RuntimeException: java.lang.IllegalStateException: >> >> You are running with invalid JAXP api or implementation. >> >> JAXP api/implementation of version 1.3.1 (included in JDK6) or higher >> is required. >> >> In case you are using ant, make sure ant 1.7.0 or higher is used - >> older versions of ant contain JAXP api/impl version 1.2 (in xml-apis.jar). >> >> If you want to keep using older ant versions, you have to configure >> it to use higher the JAXP api/impl versions. >> >> >> >> at the classpath, I'm using xalan-2.7.2.jar, xml-apis-1.4.01.jar and >> xercesImpl-2.12.1.jar >> >> my ant version is: Apache Ant(TM) version 1.9.1 compiled on May 15 2013 >> >> and my java version is: java version "1.8.0_91" Java(TM) SE Runtime >> Environment (build 1.8.0_91-b15) >> >> I don't understand what is the problem? what I'm missing here? from where >> JAXP with version 1.3.1 comes from? >> >> I also updated the ant jars with xml-apis-1.4.01.jar and >> xercesImpl-2.12.1.jar >> >> and still no luck.... what am I doing wrong? >> >> >> >> >> >> any help will be appreciated >> >> >> >> BR, >> >> *Yogev Levi* >> >> Senior Software Engineer >> >> *TEOCO Ltd.* >> >> c: >> >> +972 52 4455 708 >> >> p: >> >> +972 3 9269752 >> >> *E-mail: [email protected] <[email protected]>* >> >> www.teoco.com >> >> >> >> >> >> >> ------------------------------ >> >> >> PRIVILEGED AND CONFIDENTIAL >> PLEASE NOTE: The information contained in this message is privileged and >> confidential, and is intended only for the use of the individual to whom it >> is addressed and others who have been specifically authorized to receive >> it. If you are not the intended recipient, you are hereby notified that any >> dissemination, distribution or copying of this communication is strictly >> prohibited. If you have received this communication in error, or if any >> problems occur with transmission, please contact sender. Thank you. >> >> >> ------------------------------ >> >> PRIVILEGED AND CONFIDENTIAL >> PLEASE NOTE: The information contained in this message is privileged and >> confidential, and is intended only for the use of the individual to whom it >> is addressed and others who have been specifically authorized to receive >> it. If you are not the intended recipient, you are hereby notified that any >> dissemination, distribution or copying of this communication is strictly >> prohibited. If you have received this communication in error, or if any >> problems occur with transmission, please contact sender. Thank you. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] > >
