首先,有两台Linux服务器.我想web server在两台服务器上构建一个冗余.
我在两台服务器上同样安装了jre1.8.0.我在两台服务器上同样安装了相同的spring boot war文件.
顺便说一句....服务器1通常上升并正常工作.服务器#2出错...
我已经将服务器#1上的war和tomcat复制到服务器#2.我仍然在服务器#2上收到错误.
复制结构几乎与所有设置相同......
jre路径我查了.. 1.8.0我检查了.....哈哈......有什么问题?
我无法弄清楚为什么错误仅在服务器2上,因为它是具有相同设置的相同文件.
这是错误日志.
:: Spring Boot ::(v2.1.0.BUILD-SNAPSHOT)
2018-09-17 16:31:35 [DEBUG] [StartupInfoLogger.java] logStarting(53):运行Spring Boot v2.1.0.BUILD-SNAPSHOT,Spring v5.1.0.BUILD-SNAPSHOT
2018-09-17 16:31:35 [INFO] [SpringApplication.java] logStartupProfileInfo(701):以下配置文件处于活动状态:dev
2018-09-17 16:31:35 [ERROR] [LoggingFailureAnalysisReporter.java]报告(42):
应用程序未能启动
描述:
尝试调用方法org.springframework.beans.factory.annotation.AnnotatedBeanDefinition.setRole(I)V但它不存在.它的类org.springframework.beans.factory.annotation.AnnotatedBeanDefinition可从以下位置获得:
jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
jar:file:{path}/WEB-INF/lib/spring-beans-5.1.0.BUILD-SNAPSHOT.jar!/org/springframework/beans/factory/annotation/AnnotatedBeanDefinition.class
Run Code Online (Sandbox Code Playgroud)
它是从以下位置加载的:
file:{path}/WEB-INF/lib/spring-beans-5.1.0.RC3.jar
Run Code Online (Sandbox Code Playgroud)
行动:
更正应用程序的类路径,使其包含单个兼容版本的
org.springframework.beans.factory.annotation.AnnotatedBeanDefinition
17-Sep-2018 16:31:35.890 ½É°¢ [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:
Run Code Online (Sandbox Code Playgroud)
开始:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/url]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) …Run Code Online (Sandbox Code Playgroud) 我正在构建一个应用程序react-native并axios package用于post请求。axios 在react-nativeandroid 应用程序中发布请求时出现错误。SSL证书是用letsencrypt 签名的。
Https request 正在与 React-Native 0.47.2 一起使用,但在升级到 React-Native 0.55.0 后,它给出了证书错误。
证书适用于桌面和移动浏览器以及应用程序 Web 门户,但不适用于 android 应用程序。
版本 android: 8.0.0 React Native: 0.55.0
错误
“java.security.cert.CertPathValidatorException:未找到证书路径的信任锚。”
码:
@Entity(tableName = "UserRepo", indices = @Index(value = "id", unique = true))
public class GitHubRepo {
@PrimaryKey(autoGenerate = true)
public int _id;
public int id;
public String name;
public String description;
@Embedded
public RepoOwner owner;
public GitHubRepo(int id, String name, String description, RepoOwner owner) {
this.id = id;
this.name = name;
this.description = description;
this.owner = owner;
}
public class RepoOwner {
@ColumnInfo(name = "user_id")
public int id;
public String login;
public RepoOwner(int id, String login) {
this.id = id; …Run Code Online (Sandbox Code Playgroud) 我想在演讲结束后setOnUtteranceProgressListener通知a Toast。似乎不起作用。我已经使用过setOnUtteranceProgressListener,在语音功能中,我提到了paramaters以下内容。
Bundle params = new Bundle();
params.putString(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, MainActivity.this.getPackageName());
Run Code Online (Sandbox Code Playgroud)
我在调用语音功能时给出了“ UniqueId”,如下所示。
myTTS.speak(message,TextToSpeech.QUEUE_FLUSH,params,"UniqueId");
Run Code Online (Sandbox Code Playgroud)
在program“文字转语音”引擎完成发言后的“ 我的”中,应运行Toast通知其已结束发言。但setOnUtteranceProgressListner似乎不起作用。
myTTS.setOnUtteranceProgressListener(new UtteranceProgressListener() {
@Override
public void onStart(String utteranceId) {
}
@Override
public void onDone(String utteranceId) {
Toast.makeText(MainActivity.this,"Finished speaking.",Toast.LENGTH_LONG).show();
}
@Override
public void onError(String utteranceId) {
}
});
Run Code Online (Sandbox Code Playgroud)
所有代码如下。
public class MainActivity extends AppCompatActivity {
String message;
private TextToSpeech myTTS;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myTTS = new TextToSpeech(this, new TextToSpeech.OnInitListener() {
@Override …Run Code Online (Sandbox Code Playgroud) 我有一个应用程序,可以打开地图并用标记缩放我的位置,然后如果我长按任何位置,它会将该位置保存在数据库中,一切正常,但我无法管理的一件事是在两个位置标记之间绘制一条路径线。
这是三个全局变量
Location myLocation;
LatLng onmaplongclicklastlatlng;
private GoogleMap mMap;
Run Code Online (Sandbox Code Playgroud)
mylocation由我分配LocationListener,并且onmaplongclicklastlatlng当我长按地图上的任何位置时分配。
将标记放置在两个位置上已完成,我已经有了要在其上画线的两个点。
我只需要在这两个位置之间画一条线(我当前的位置在myLocation变量中定期更新)
每当我长按地图时,onmaplongclicklastlatlng就会发生变化。
整个代码已完成,我有一个button想要用于该行的代码,因为我可以通过此方法draw访问这两个位置,其他代码无需更改。variablesbutton
public void getLine(View view) {
// need to draw a line here from user gps posiution to the marker location
}
Run Code Online (Sandbox Code Playgroud)
我已经尝试了很多教程,但由于某种原因它们不起作用,任何帮助将不胜感激。
哦,最后但并非最不重要的一点
onmaplongclicklastlatlng
Run Code Online (Sandbox Code Playgroud)
是 LatLng 且
myLocation
Run Code Online (Sandbox Code Playgroud)
是一个位置
但它们可以互换以适应目的
ex. Location maplocation = new Location(onmaplongclicklastlatlng
.latitude, onmaplongclicklastlatlng.longitude);
Run Code Online (Sandbox Code Playgroud)
和
Latlng myLatLng = new LatLng(myLocation.getLatitude(), myLocation.getLongitude());
Run Code Online (Sandbox Code Playgroud)
正如我所说,任何帮助将不胜感激。如果还需要任何其他信息,请告诉我,我将编辑问题。
android ×4
java ×3
axios ×1
geolocation ×1
lets-encrypt ×1
migration ×1
react-native ×1
spring ×1
ssl ×1
tomcat ×1
war ×1