Sie sind auf Seite 1von 4

Inspecting a bean in my JBOSS JMX Agent View Ask Question

fails with an error

I cannot inspect any of my beans in


the JMX Agent View as clicking on
7 any bean results in the error pasted
below. Every thing else seems to be
working fine within JBOSS as it is
properly serving my application.

2 Environment variables as follows...

PATH = C:\Program
Files\Java\jre8\bin;C:\Users\XXX\App
Data\Roaming\npm;C:\Program Files
(x86)\Java\jre7\bin;C:\Program
Files\Java\jre7\bin;

JAVA_HOME = C:\Program Files


(x86)\Java\jdk1.8.0_05

JBossWeb/2.0.1.GA - Error report

HTTP Status 500 -


type Exception report

message

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

exception org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 151 in the jsp file: /inspectMBean.jsp


The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from
required .class files
148: else if (String.valueOf(attrValue).indexOf(sep) == -1)
149: {
150: %>
151: <input type="text" name="<%= attrName %>" value="<%=
attrValue.replace("\"","&quot;") %>" <%= readonly %>>
152: <%
153: }
154: else

An error occurred at line: 151 in the jsp file: /inspectMBean.jsp


The method replace(char, char) in the type String is not applicable for the arguments
(String, String)
By using our site,148:
you acknowledge else
that you
if have read and understand our Cookie Policy,==
(String.valueOf(attrValue).indexOf(sep) Privacy
-1) Policy, and our
Terms of Service. 149: {
150: %>
151: <input type="text" name="<%= attrName %>" value="<%=
attrValue.replace("\"","&quot;") %>" <%= readonly %>>
152: <%
153: }
154: else

Stacktrace:

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorServlet.java:220)

org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:96)
org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.java:77)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

note The full stack trace of the root cause is available in the JBossWeb/2.0.1.GA logs.

JBossWeb/2.0.1.GA

java jboss dcm4che

edited May 2 '14 at 4:05

asked May 2 '14 at 2:46


mccainz
2,761 4 29 41

3 Answers

This worked in jboss-4.2.3.GA: In file

/server/{xxx}/deploy/jmx-console.war/
7
replace the affected

replace("\"","&quot;")

with

replaceAll("\"","&quot;")

answered Dec 10 '15 at 16:14


By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our
Hubert Hirsch
Terms of Service.
121 1 6
2 I can confirm that this solution works
but I only tested it for jboss-4.2.3GA
as well using JDK 1.8. Don't know
whether it works for other versions of
JBoss. It's important to mention here
that all occurrences of the replace
function need to be replaced by
replaceAll (lines 21 and 22 in my
version of the file). – pemistahl Feb
15 '16 at 13:10

Had the same thing happening.

Turns out I was missing


1
inspectMbean_jsp.class in the
dcm4chee-2.17.2-
psql\server\default\work\jboss.web
\localhost\jmx-
console\org\apache\jsp folder.

Not sure why it isn't there

answered May 12 '14 at 18:52


AThom
11 1

Will check this out in a few hours.


Thank you for the response as this
question had previously earned me a
tumbleweed merit badge. – mccainz
May 12 '14 at 19:07

what version of java are you using? I


was using 1.8 and it wasn't working
but 1.7 works fine – AThom May 12
'14 at 20:06

I think I may be using 1.8 but I need to


confirm as I have multiple versions

loaded. – mccainz May 12 '14 at


20:10

Same issue using Java 1.8.0_05 –


Cedric Simon Nov 9 '14 at 14:43

I think more graceful solution would


be to ensure that both
By using our site,compilerSourceVM
you acknowledge that
andyou have read and understand our Cookie Policy, Privacy Policy, and our
1
Terms of Service.compilerTargetVM are set to 1.5 or
above in
jboss/server/default/deploy/jboss-
web.deployer/conf/web.xmlas in How
to change tomcat compiler.

Also JDK 1.5 or above should be


present and visible instead of default
JDK 1.4 which doesn't understand
String.replace method with string
params.

edited May 23 '17 at 12:09


Community ♦
1 1

answered Dec 15 '16 at 10:01


Vadzim
14.6k 4 77 118

By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our
Terms of Service.

Das könnte Ihnen auch gefallen