Mbean receiving from Jminix console null params rather than the value submitted

154 views
Skip to first unread message

Enrique Rochina

unread,
Mar 11, 2016, 9:12:35 AM3/11/16
to jminix-users
Hi all,

We have a weird problem in our application that has Jminix console embedded. When an specific user tries to execute an operation of an MBean, the parameters received at the MBean level are all null, regardless of the value we've put. Iin normal conditions, if nothing is entered, the MBean receives empty String, if the param is null.

This is happening for only few users, all the others are working fine, so I am wondering if it's related to some cookies or some data in their profile, or how to nail where the error is.

If it's any helpful, in the browser going into the path that gives the jminix console with the full tree it does not load in the browsers where the above fails.

Any thoughts? Thanks!

Enrique

Philipp

unread,
Mar 11, 2016, 9:38:28 AM3/11/16
to jminix...@googlegroups.com
One issue we had: when someone reads the input stream with the parameters before jminix.

The 2nd one reading the stream gets nothing. (So if jminix reads as 2nd one, it gets no parameters) see also java doc of servlet api.
Cheers, p

Please excuse any typos, this mail was written on a mobile device.
--

---
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "jminix-users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jminix-users...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Enrique Rochina

unread,
Mar 12, 2016, 2:05:00 PM3/12/16
to jminix...@googlegroups.com
Hi Philip,

Thanks for the tip, I would look into that, not sure how can this affect only certain browsers or certain workstations!

My lead now is that the second part of my problem

If it's any helpful, in the browser going into the path that gives the jminix console with the full tree it does not load in the browsers where the above fails.

as I have discovered by inspecting with Chrome devtools that the following url (that is called by Jminix UI's side) ends with a 500 error (no logs on server side thought).


Thanks,
Enrique

Enrique Rochina

unread,
Mar 14, 2016, 12:19:23 PM3/14/16
to jminix-users

The url above is called by JS on Jminix's frontend. If called by ourselves manually, we get a simple html page containing

Servers
Server 0

I have succeed to spot when the url aboves fails with 500 error, there is a NoClassDefFoundError that is not logged anywhere

java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JsonConfig
at net.sf.json.JSONSerializer.toJSON(JSONSerializer.java:84)
at org.jminix.console.resource.AbstractTemplateResource.toRepresentation(AbstractTemplateResource.java:256)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:521)
at org.restlet.resource.ServerResource.get(ServerResource.java:707)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:589)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:649)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:348)
at org.restlet.resource.ServerResource.handle(ServerResource.java:952)
at org.restlet.resource.Finder.handle(Finder.java:246)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
at org.restlet.Application.handle(Application.java:381)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
at org.restlet.Component.handle(Component.java:392)
at org.restlet.Server.handle(Server.java:516)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:72)
at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)
at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1089)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)



I am wondering if we haven't the right dependencies for jminix-1.2.0. We manage dependencies with Maven, and right now the dependencies are

[INFO] |  |  |  \- org.jminix:jminix:jar:1.2.0:compile
[INFO] |  |  |     +- org.restlet.jee:org.restlet.ext.velocity:jar:2.1.4:compile
[INFO] |  |  |     +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] |  |  |     \- org.jasypt:jasypt:jar:1.9.0:compile

which is quite different with what we used to have before with 1.1.0 version

[INFO] |  |  |  \- org.jminix:jminix:jar:1.1.0:compile
[INFO] |  |  |     +- org.restlet:org.restlet:jar:1.1.5:compile
[INFO] |  |  |     +- org.restlet:org.restlet.ext.velocity:jar:1.1.5:compile
[INFO] |  |  |     +- com.noelios.restlet:com.noelios.restlet:jar:1.1.5:compile
[INFO] |  |  |     +- com.noelios.restlet:com.noelios.restlet.ext.servlet:jar:1.1.5:compile
[INFO] |  |  |     +- net.sf.json-lib:json-lib:jar:jdk15:2.2.3:compile
[INFO] |  |  |     |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] |  |  |     \- org.jasypt:jasypt:jar:1.9.0:compile

Enrique Rochina

unread,
Mar 15, 2016, 1:47:15 PM3/15/16
to jminix-users
Hi all,

We've found the reason of the NoClassDefFoundError that was causing the JMX tree not to be loaded. The library ezmorph-1.0.6.jar was not being included in the webapp. It looks like the dependency management was buggy as json-lib was not bringing ezmorph. Below the maven dependency tree:

[INFO] |  |  |  \- org.jminix:jminix:jar:1.2.0:compile
[INFO] |  |  |     +- org.restlet.jee:org.restlet.ext.velocity:jar:2.1.4:compile
[INFO] |  |  |     +- net.sf.json-lib:json-lib:jar:jdk15:2.4:compile
[INFO] |  |  |     \- org.jasypt:jasypt:jar:1.9.0:compile

The null value problem is not solved yet though.

Cheers,
Enrique



On Friday, 11 March 2016 14:12:35 UTC, Enrique Rochina wrote:

Enrique Rochina

unread,
Mar 16, 2016, 8:05:46 AM3/16/16
to jminix-users
Hello,

We have found out that the issue is not browser related. In fact, the browsers that were working correctly they were calling an url to a separate webapp that is deployed in the same tomcat. This webapp contains only jminix and its basic dependencies

aopalliance-1.0.jar
commons-beanutils-1.7.0.jar
commons-collections-3.2.1.jar
commons-lang-2.3.jar
com.noelios.restlet-1.1.5.jar
com.noelios.restlet.ext.servlet-1.1.5.jar
ezmorph-1.0.6.jar
jasypt-1.9.0.jar
jcl-over-slf4j-1.7.2.jar
jminix-1.1.0.jar
json-lib-2.2.3-jdk15.jar
log4j-1.2.15.jar
org.restlet-1.1.5.jar
org.restlet.ext.velocity-1.1.5.jar
slf4j-api-1.7.2.jar
slf4j-log4j12-1.7.2.jar
spring-aop-3.2.3.RELEASE.jar
spring-beans-3.2.3.RELEASE.jar
spring-context-3.2.3.RELEASE.jar
spring-core-3.2.3.RELEASE.jar
spring-expression-3.2.3.RELEASE.jar
spring-web-3.2.3.RELEASE.jar
velocity-1.7.jar


I have to guess now that is an issue of librairies, maybe we have some incompatibility between the libs of our application and the ones needed by Jminix wheter is 1.1.0 or 1.2.0. I have to admit that our list of dependencies included in the war file is massive, as we integrate so many technical frameworks. I don't think you are interested of the full list. Let me know if you do.

Kind regards,
Enrique

On Friday, 11 March 2016 14:12:35 UTC, Enrique Rochina wrote:

Anil Kumar

unread,
Nov 4, 2019, 7:00:56 AM11/4/19
to jminix-users
Hi All,

I am trying to use Jminix in our project. When I try to update the property value from the Mean or try to retrieve any of the property through Mbean, value is going as null. We are not able to retrieve the exact value entered in the text box.

lbovet

unread,
Nov 5, 2019, 4:01:58 AM11/5/19
to jminix-users
Such behavior has been observed by other users. There seems to be some incompatibility of the restlet library with some servlet containers. There is a work-around mentioned in https://github.com/lbovet/jminix/issues/11#issue-172624750

If this solves the problem, please make a PR.

Anil Kumar

unread,
Nov 6, 2019, 2:49:28 AM11/6/19
to jminix-users
Thanks For your reply.

I tried all the steps from that issue link and still facing same issue only. Is any one have list of JARs which is working fine on Mbean property update.
Reply all
Reply to author
Forward
0 new messages