WSO2 IS Unable to compile class for JSP - wso2

I'm using WSO2 IS 5.10 with docker and after making a change to the image, which has nothing to do with JSPs, opening the dashboard on the service provider list I see a white screen.
In wso2 log I found errors like this:
Servlet.service() for servlet [bridgeservlet] threw exception org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [17] in the generated java file: [/home/wso2carbon/wso2is-5.10.0/lib/tomcat/work/Catalina/localhost/ROOT/proxytemp/hc_1893914628/org/apache/jsp/application/list_002dservice_002dproviders_jsp.java]
Only a type can be imported. org.wso2.carbon.identity.application.common.model.xsd.ApplicationBasicInfo resolves to a package
An error occurred at line: [118] in the jsp file: [/application/list-service-providers.jsp]
ApplicationBasicInfo cannot be resolved to a type
115: <%
116: String BUNDLE = "org.wso2.carbon.identity.application.mgt.ui.i18n.Resources";
117: ResourceBundle resourceBundle = ResourceBundle.getBundle(BUNDLE, request.getLocale());
118: ApplicationBasicInfo[] applications = null;
119:
120: String filterString = request.getParameter(ApplicationMgtUIConstants.SP_NAME_FILTER);
121: filterString = ApplicationMgtUIUtil.resolveFilterString(filterString);
this disappears when restarting the image.
I’d like to know what it’s due to

Related

Logstash grok pattern to catch the first line with the string Exception

This is the an example log:
2022-01-07 11:05:01,185 [http-nio-8080-exec-526] WARN de.web.Main| = - Error while execute Request
javax.servlet.ServletException: com.cg.blart.web.HttpInvocationException: Invalid tenant session
at com.cg.blume.web.DispatchingServlet.doGet(DispatchingServlet.java:169)
at de.jinx.lee.web.AutoDBUpgradeDispatchingServlet.lambda$doGet$0(AutoDBUpgradeDispatchingServlet.java:200)
at de.jinx.lee.web.AutoDBUpgradeDispatchingServlet.addMDCKey(AutoDBUpgradeDispatchingServlet.java:297)
Caused by: com.cg.blume.web.HttpInvocationException: Invalid tenant session
at com.cg.blume.web.procedure.HttpSessionManager.get(HttpSessionManager.java:190)
at de.jinx.lee.web.session.leeHttpSessionManager.get(leeHttpSessionManager.java:76)
... 41 more
This ist the pattern so far:
^.*?Exception: +%{DATA:exception}$
The output i get is close but no cigar: "com.cg.blart.web.HttpInvocationException: Invalid tenant session". For the live of me i dont get it to match the whole line. Can you show me the way? The desired output is:
javax.servlet.ServletException: com.cg.blart.web.HttpInvocationException: Invalid tenant session
Here is a link for a test tool: https://grokdebug.herokuapp.com/
Solution was this pattern:
(?<DATA:mps_exception>.*?(Exception:).*)
It is explained here: https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html#_custom_patterns

Getting error Unable to compile class for JSP when running playground2

I am going through local authenticator example and at step 14, after I press 'Authorize', getting exception
[2021-02-02 18:13:41,087] [0528806c-f8f8-4df5-abca-5f47c3972b24] ERROR
{org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/authenticationendpoint].
[default]} - Servlet.service() for servlet [default] in context with path
[/authenticationendpoint] threw exception [Unable to compile class for JSP:
An error occurred at line: [25] in the jsp file: [/includes/localize.jsp]
Duplicate local variable BUNDLE
22: <%# page import="java.nio.charset.StandardCharsets" %>
23: <%#page contentType="text/html; charset=UTF-8"%>
24: <%
25: String BUNDLE =
"org.wso2.carbon.identity.application.authentication.endpoint.i18n.Resources";
26: ResourceBundle resourceBundle = ResourceBundle.getBundle(BUNDLE, request.getLocale(),
new
27: EncodedControl(StandardCharsets.UTF_8.toString()));
28: %>
I am running WSO2 5.11 and Tomcat 7.0.107.

WSO2 APIM PUBLISHER - issue with importing swagger definition

When trying to import the swagger definition into WSO2 APIM publisher - the wso2 apim publisher failing with the following error -
ERROR - RhinoEngine org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 11 (http#17)
ERROR - WebAppManager org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 11 (http#17)
org.jaggeryjs.scriptengine.exceptions.ScriptException:
org.mozilla.javascript.WrappedException: Wrapped
com.google.gson.JsonSyntaxException:
com.google.gson.stream.MalformedJsonException: Expected EOF at line 1
column 11 (http#17)
Any solution to this problem?
Did you verify the swagger definition for syntax errors .seems there is a json syntax error. use json validator like jsLint
I assumed your APIM version is 1.8.
Can you please tryout below solution to fix the issue.
Move 'XMLHttpRequest' instance creation inside for loop in file, \repository\deployment\server\jaggeryapps\publisher\site\blocks\item-design\ajax\import.jag
Ex:
for(var i = 0; i < swaggerJson.apis.length; i++){
var xhr = new XMLHttpRequest();
xhr.open("GET", url + swaggerJson.apis[i].path);
...
It has been resolved in the new WSO2 APIM 3.0 version.
Try this out :
https://wso2.com/api-management/

Grails g:render template from plugin - not found

I need to render a template from a plugin to a .gsp page. I wrote : <g:render plugin="melanin 2.0.0" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>
But then I get this error :
Error 500: Error processing GroovyPageView: Template not found for
name [/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Servlet:
grails URI: /RBCS/grails/VIBAction/index.dispatch Exception Message:
Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Caused by:
Error processing GroovyPageView: Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Class:
actionPlan.gsp At Line: [40] Code Snippet: 39: 40: 41:
This is my project:
Please help me fix it. Sorry my English is not good. Thank you.
try removing the version from your plugin-ref:
<g:render plugin="melanin" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>

I cannot put file with cfftp, any ideas why?

I am trying to create a function to upload two xml files to another website once a day, I can make a connection fine using this code
<cfftp action = "open"
username = "xxxx"
connection = "MyConnection"
password = "xxxx"
server = "xxx"
passive="yes"
secure="true">
but then when I try to put the file using this code
<cfftp
action="putFile"
connection="MyConnection"
localfile="xxx"
remotefile="xxx">
then I get this error
An error occurred during the sFTP putFile operation.
Error: Permission denied.
The error occurred in xxxxx: line 13
11 : connection="MyConnection"
12 : localfile="xxxx"
13 : remotefile="xxxx">
Additional background info is that I can upload via filezilla.
Just use passive="yes" with the putFile operation:
<cfftp
action="putFile"
connection="MyConnection"
localfile="xxx"
remotefile="xxx"
passive="yes">
I just had a look at some code I wrote a while ago that uses cfftp, and my remotefile contains the full path. Can you confirm if yours does this?
The error "permission denied" would make sense it if was trying to upload it into the wrong directory also. Let us know how you go.