加密Web应用程序在本地运行良好,但不在云上运行

时间:2014-11-09 18:56:40

标签: java cryptography wso2

我制作了一个加密Web应用程序并在本地试用,效果很好。但是当我在WSO2云上尝试它时,它会给出这个异常报告:

HTTP Status 500 - PWC6033: Error in Javac compilation for JSP

message PWC6033: Error in Javac compilation for JSP

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.BadPaddingException resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.Cipher resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.IllegalBlockSizeException resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.KeyGenerator resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.NoSuchPaddingException resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.SecretKey resolves to a package

PWC6199: Generated servlet error:
Only a type can be imported. javax.crypto.spec.SecretKeySpec resolves to a package

PWC6197: An error occurred at line: 21 in the jsp file: /Certificate_student.jsp
PWC6199: Generated servlet error:
Cipher cannot be resolved to a type

PWC6197: An error occurred at line: 138 in the jsp file: /Certificate_student.jsp
PWC6199: Generated servlet error:
SecretKeySpec cannot be resolved to a type

等错误,请问如何解决这些异常?

这是我的标题

<%@page import="org.apache.catalina.tribes.util.Arrays"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="connection.jsp"%>
<%@page import="java.io.UnsupportedEncodingException" %>
<%@page import="java.security.InvalidKeyException" %>
<%@page import="java.security.NoSuchAlgorithmException" %>
<%@page import="javax.crypto.BadPaddingException" %>
<%@page import="javax.crypto.Cipher" %>
<%@page import="javax.crypto.IllegalBlockSizeException" %>
<%@page import="javax.crypto.KeyGenerator" %>
<%@page import="javax.crypto.NoSuchPaddingException" %>
<%@page import="javax.crypto.SecretKey" %>
<%@page import="javax.crypto.spec.SecretKeySpec"%>

1 个答案:

答案 0 :(得分:1)

WSO2 App Cloud的运行时由WSO2 App Server提供支持。此问题是由于WSO2 App Server中的类加载问题。我们WSO2已经解决了这个问题,你现在应该能够成功地尝试你的代码了。

BTW,下次当您想在问题中标记WSO2 Cloud时,请使用wso2cloud标记。它将帮助我们快速回答您的问题。