简体   繁体   English

WSO2 API 经理 - PizzaShack 网站在登录后给出 HTTP 500 内部错误

[英]WSO2 API Manager - PizzaShack site giving HTTP 500 Internal Error after login

So yesterday I was having some issues with login authentication on the login page of the "Pizza Shack" application in WSO2 API Manager, and couldn't find answers anywhere, so I came here and asked, I got help and everything worked fine.所以昨天我在 WSO2 API Manager 的“Pizza Shack”应用程序的登录页面上遇到了一些登录身份验证问题,并且无法在任何地方找到答案,所以我来这里询问,我得到了帮助并且一切正常。 Here's my question from yesterday issue so you can understand my actual problem a little better:这是我昨天的问题,所以你可以更好地理解我的实际问题:

Problems with authentication login in Pizza Shack WSO2 API Manager Pizza Shack 中身份验证登录的问题 WSO2 API 经理

So, after I log-in on the PizzaShack site, it appears to me in the index.jsp page:因此,在我登录 PizzaShack 网站后,它出现在 index.jsp 页面中:

HTTP Status 500 – Internal Server Error HTTP 状态 500 – 内部服务器错误

I'm actually a beginner in WSO2 API Manager so I dont really understand that much about what is causing this error and why.我实际上是 WSO2 API Manager 的初学者,所以我不太了解导致此错误的原因和原因。 I tried searching for this error and found things that I dont understand very well, so, if anyone can help me, I appreciate it.我尝试搜索此错误并发现了一些我不太了解的内容,因此,如果有人可以帮助我,我将不胜感激。 Here's the error on CMD:`这是 CMD 上的错误:`

ERROR - [jsp] Servlet.service() for servlet [jsp] in context with path [/pizzashack] threw exception [An exception occurred processing [index.jsp] at line [145]
142:             <ul class="thumbnails">
143:             <%
144:                    MenuItemManager manager = new MenuItemManager();
145:                    List<Pizza> menuItems = manager.getAvailablePizzaList(token);
146:                    String serverURL = PizzaShackWebConfiguration.getInstance().getServerURL();
147:                %>
148:             <%

This error is produced due to the missing Pizzashack API WAR.此错误是由于缺少 Pizzashack API WAR 而产生的。 I believe, that you have removed and replaced the existing am#sample#pizzashack#v1.war as instructed in your previous question .我相信,您已经按照上一个问题中的指示删除并替换了现有的am#sample#pizzashack#v1.war

If yes, then you have to put back the removed am#sample#pizzashack#v1.war inside the <apim>/repository/deployment/server/webapps directory along with the newly built WAR artifact (which is pizzashack.war ).如果是,那么您必须将删除的am#sample#pizzashack#v1.war <apim>/repository/deployment/server/webapps目录以及新建的 WAR 工件(即pizzashack.war )。 If you have missed to take a backup of the existing am#sample#pizzashack#v1.war , try getting the same webapp from a fresh WSO2 API Manager 4.0.0 pack and deploy it.如果您错过了备份现有的am#sample#pizzashack#v1.war ,请尝试从新的 WSO2 API Manager 4.0.0 包中获取相同的 webapp 并部署它。 At the end, you will be having both the following WAR artifacts inside the /webapps directory of your pack最后,您将在包的/webapps目录中拥有以下两个 WAR 工件

  1. am#sample#pizzashack#v1.war : which is already in the 4.0.0 pack am#sample#pizzashack#v1.war :已经在 4.0.0 包中
  2. pizzashack.war : which is built from the Product APIM Repo pizzashack.war :它是从 Product APIM Repo 构建的

Once after deploying the webapps as instructed, start the API Manager server, and navigate to and open <apim>/repository/deployment/server/webapps/pizzashack/WEB-INF/web.xml and make the following changes按照说明部署 webapps 后,启动 API Manager 服务器,导航到并打开<apim>/repository/deployment/server/webapps/pizzashack/WEB-INF/web.xml并进行以下更改

  • Update the loginURL as http://localhost:9763/oauth2/token if this has not been changed previouslyloginURL更新为http://localhost:9763/oauth2/token如果之前没有更改过
  • Update the consumerKey and consumerSecret with the correct Consumer credentials that you have generated from Devportal使用您从 Devportal 生成的正确消费者凭据更新consumerKeyconsumerSecret

Save the artifact, wait for a while to apply the changes.保存工件,稍等片刻以应用更改。 Once applied successfully (you will see an INFO log in the carbon logs), you can try accessing the Pizza Shack Portal by going to the http://localhost:9763/pizzashack应用成功后(您将在碳日志中看到 INFO 日志),您可以尝试访问http://localhost:9763/pizzashack来访问 Pizza Shack 门户

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM