代码之家  ›  专栏  ›  技术社区  ›  ammanbesaw

由于未知原因调用API时收到错误

  •  0
  • ammanbesaw  · 技术社区  · 2 年前

    我试图从Postman客户端调用mule API,但收到了一个500错误。我不确定我是否明白发生了什么。我已经在下面发布了错误。我不确定这是否是一个maven依赖性问题。任何帮助都将不胜感激。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

    <html>
       <head>
          <title>Error 500</title>
       </head>
       <body bgcolor="#ffffff">
          <h1>Status Code: 500</h1>
          Exception: The error below occurred during context initialisation, so no further requests
          can be processed:<br>
          <pre>java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
        at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(PropertiesConverter.java:46)
        at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:650)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:323)
        at hudson.util.XStream2.<init>(XStream2.java:62)
        at hudson.model.Hudson.<clinit>(Hudson.java:3736)
        at hudson.WebAppMain.installLogger(WebAppMain.java:252)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:106)
        at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:897)
        at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
        at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
        at winstone.HostGroup.initHost(HostGroup.java:85)
        at winstone.HostGroup.<init>(HostGroup.java:45)
        at winstone.Launcher.<init>(Launcher.java:196)
        at winstone.Launcher.main(Launcher.java:391)
        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 Main._main(Main.java:214)
        at Main.main(Main.java:61)
    </pre>
          <br>Stacktrace:
          <pre>java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties
        at com.thoughtworks.xstream.converters.collections.PropertiesConverter.<clinit>(PropertiesConverter.java:46)
        at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:650)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:323)
        at hudson.util.XStream2.<init>(XStream2.java:62)
        at hudson.model.Hudson.<clinit>(Hudson.java:3736)
        at hudson.WebAppMain.installLogger(WebAppMain.java:252)
        at hudson.WebAppMain.contextInitialized(WebAppMain.java:106)
        at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:897)
        at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
        at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
        at winstone.HostGroup.initHost(HostGroup.java:85)
        at winstone.HostGroup.<init>(HostGroup.java:45)
        at winstone.Launcher.<init>(Launcher.java:196)
        at winstone.Launcher.main(Launcher.java:391)
        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 Main._main(Main.java:214)
        at Main.main(Main.java:61)
    </pre>
          <br>
          <hr size="1" width="90%">
          <i>Generated by Winstone Servlet Engine v0.9.10 at Mon May 02 19:05:42 CDT 2022</i>
       </body>
    </html>
    1 回复  |  直到 2 年前
        1
  •  1
  •   aled    2 年前

    该错误由Jenkins实例返回。该错误中没有Mule生成的任何内容。你要么调用了错误的服务器,要么Mule应用程序只是Jenkins的代理。不管怎样,错误都在詹金斯身上,你需要调查詹金斯在做什么。