因未知原因调用 API 时收到错误
Recieving an error when calling an API for reasons unknown
我试图从 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>
Jenkins 实例返回错误。 Mule 在该错误中没有生成任何内容。您要么调用了错误的服务器,要么 Mule 应用程序只是 Jenkins 的代理。无论哪种方式,错误都在 Jenkins 中,您需要调查 Jenkins 在做什么。
我试图从 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>
Jenkins 实例返回错误。 Mule 在该错误中没有生成任何内容。您要么调用了错误的服务器,要么 Mule 应用程序只是 Jenkins 的代理。无论哪种方式,错误都在 Jenkins 中,您需要调查 Jenkins 在做什么。