java.lang.NoClassDefFoundError:com / sun / istack / tools / DefaultAuthenticator $ Receiver

亚历克斯·G。

我有一个Hybris项目,该项目当前已部署在Windows上。我正在尝试更新/修改构建脚本,以允许在Windows和Linux上进行部署。我相信我已经对构建脚本进行了所有必需的更改,但是现在遇到了一个很奇怪的问题。

当我ant all在Hybris目录中运行时,我看到正在执行编译/构建/部署,然后看到一些测试正在运行-然后该过程失败,并NoClassDefFoundError带有以下堆栈跟踪:

BUILD FAILED
/home/aleksg/hybris/bin/platform/build.xml:20: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/compiling.xml:90: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/compiling.xml:148: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/util.xml:20: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/compiling.xml:155: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/compiling.xml:297: The following error occurred while executing this line:
/home/aleksg/hybris/bin/platform/resources/ant/util.xml:144: The following error occurred while executing this line:
/home/aleksg/hybris/bin/custom/bunzl/bunzlcore/buildcallbacks.xml:210: java.lang.NoClassDefFoundError: com/sun/istack/tools/DefaultAuthenticator$Receiver
        at com.sun.tools.ws.ant.WsImport2.runInVm(WsImport2.java:570)
        at com.sun.tools.ws.ant.WsTask2.execute(WsTask2.java:423)
        at com.sun.tools.ws.ant.WsImport2.execute(WsImport2.java:558)
        at com.sun.istack.tools.ProtectedTask.execute(ProtectedTask.java:95)
        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.GeneratedMethodAccessor23.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.taskdefs.Sequential.execute(Sequential.java:68)
        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.MacroInstance.execute(MacroInstance.java:396)
        at sun.reflect.GeneratedMethodAccessor106.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 de.hybris.ant.taskdefs.CallMacro.execute(CallMacro.java:57)
        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 sun.reflect.GeneratedMethodAccessor95.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 net.sf.antcontrib.logic.TryCatchTask.execute(TryCatchTask.java:207)
        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 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.MacroInstance.execute(MacroInstance.java:396)
        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 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.MacroInstance.execute(MacroInstance.java:396)
        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.GeneratedMethodAccessor23.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.taskdefs.Sequential.execute(Sequential.java:68)
        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.MacroInstance.execute(MacroInstance.java:396)
        at net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:259)
        at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268)
        at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:299)
        at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244)
        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 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.MacroInstance.execute(MacroInstance.java:396)
        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:217)
        at sun.reflect.GeneratedMethodAccessor23.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.taskdefs.Sequential.execute(Sequential.java:68)
        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.MacroInstance.execute(MacroInstance.java:396)
        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.GeneratedMethodAccessor23.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.taskdefs.Sequential.execute(Sequential.java:68)
        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.MacroInstance.execute(MacroInstance.java:396)
        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.ClassNotFoundException: com.sun.istack.tools.DefaultAuthenticator$Receiver
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1366)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1315)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1068)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 193 more

如果我在Windows上运行完全相同的命令,则一切都将成功完成。

Windows和Linux都安装了相同版本的Java-jdk-1.8u162。在这两种情况下,我都从相同的git repo获取相同的分支。Hybris版本是6.5。

我显然在这里错过了一些东西。我如何克服(或至少解决)这个问题?

编辑:仍然没有找到解决方案。有趣的是,我检查了系统上的所有jaxb jar文件-这些文件中均不存在该文件。根据要求,这里是external-dependencies.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">   
        <modelVersion>4.0.0</modelVersion>                                                                    
        <groupId>de.hybris.platform</groupId>                                                                 
        <artifactId>bunzlcore</artifactId>                                                                    
        <version>5.0.0.0-SNAPSHOT</version>                                                                   

        <packaging>jar</packaging>                                                                            

        <dependencies>                                                                                        

        </dependencies>                                                                                       
</project>

这是有关的部分externalcallbacks.xml

 <path id="wsimport.classpath">
         <fileset dir="${ext.bunzlcore.path}/lib">
                 <include name="jaxws-tools.jar"/>
         </fileset>
         <fileset dir="${platformhome}/resources/ant/lib">
                 <include name="jaxb-2.2.4-xjc.jar"/>
                 <include name="jaxb-2.2.4-impl.jar"/>
         </fileset>
 </path>
 <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
         <classpath refid="wsimport.classpath"/>
 </taskdef>
 <wsimport
         xnocompile="true"
         quiet="true"
    wsdl="${ext.bunzlcore.path}/resources/bunzlcore/matchcode/GlobalServices15b.wsdl"
    sourcedestdir="${ext.bunzlcore.path}/src">
         <depends file="${ext.bunzlcore.path}/resources/bunzlcore/matchcode/GlobalServices15b.wsdl"/>
         <produces dir="${ext.bunzlcore.path}/src/uk/co/gb"/>
 </wsimport>
阿加布里斯

该类com.sun.istack.tools.DefaultAuthenticator$Receiver已在jaxb-xjc2.2.7中引入您有2.2.4,所以它不存在。我认为真正的问题是

为什么在Windows上可以使用

代替

为什么它在Linux上不起作用

尝试至少使用2.2.7版本,然后它在两种环境下均应工作。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

java.lang.NoClassDefFoundError:com / sun / istack / localization / Localizable?

java.lang.NoClassDefFoundError:com / sun / istack / Pool

com.sun.istack.SAXException2:实例...替换为“ java.lang.Object”,但是...绑定到匿名类型

java.lang.NoClassDefFoundError:com / sun / javafx / css / converters / SizeConverter

java.lang.NoClassDefFoundError:com / sun / javafx / css / converters / EnumConverter

compileReleaseKotlin失败,并出现java.lang.ClassNotFoundException:com.sun.tools.javac.util.Context

Maven:包com.sun.istack.internal不存在

com.sun.istack.internal.Nullable注释和Guice

java.lang.NoClassDefFoundError:com / sun / mail / util / MailLogger for Java Mail的JUnit测试用例

java.lang.NoClassDefFoundError:执行Enunciate ant任务时com / sun / mirror / apt / AnnotationProcessorFactory

轴心/桌面:线程“ main”中的异常java.lang.NoClassDefFoundError:com / sun / jna / Platform

将GlassFish迁移到Tomcat会引发java.lang.NoClassDefFoundError:com / sun / enterprise / InjectionException

由以下原因引起:java.lang.ClassNotFoundException:使用lombok时com.sun.tools.javac.code.TypeTags

java.lang.NoClassDefFoundError:sun / misc / BASE64Encoder

java.lang.NoClassDefFoundError:sun / security / ssl / SupportedEllipticCurvesExtension

渲染问题 java.lang.NoClassDefFoundError: sun/misc/Cleaner

Android构建返回“ java.lang.NoClassDefFoundError:com / android / tools / lint / LintCliClient”

从Java访问com.sun.tools.javac.util 9

java.lang.RuntimeException: com.sun.tools.javac.code.Symbol$CompletionFailure: 找不到 org.bouncycastle.asn1.DERInteger 的类文件

java.lang.IllegalAccessError: 类 lombok.javac.apt.LombokProcessor 无法访问类 com.sun.tools.javac.processing.JavacProcessingEnvironment

com.sun.istack.SAXException2和javax.xml.bind.JAXBException引发的异常

java.lang.NoSuchMethodError:com.sun.mail.util.TraceInputStream

ARM64计算机上的Cassandra启动失败(java.lang.NoClassDefFoundError:无法初始化com.sun.jna.Native类)

如何在IntelliJ IDEA中修复“渲染问题”,“ java.lang.NoClassDefFoundError:sun / misc / Cleaner”?

java.lang.NoClassDefFoundError:无法初始化类sun.nio.ch.FileChannelImpl

java.lang.NoSuchMethodError的原因:com.sun.jna.Native.register(Ljava / lang / String;)V

缺少库com.sun.tools.attach

java.lang.ClassNotFoundException:com.sun.jersey.spi.container.servlet.ServletContainer

java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory