Ragavendran Baskaran

Greenhorn
+ Follow
since Dec 12, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Ragavendran Baskaran

Bear/Peter, Thanks for your time. To rule out the possibility of conflicting jar's i have created a tiny web application and deployed it.

I have 2 test pages in it

test.jsp below (When this page is accessed it fails with the same error what i posted earlier)


test1.jsp below (If this page is accessed it works fine)

I also tried enabling the verbose logging, i have enclosed the output.

[Loaded org.apache.taglibs.standard.tag.common.core.ChooseTag from jar:file:/C:/jboss_eap/jboss-eap-5.1/jboss-as/server/web/deploy/jbossweb.sar/jstl.jar!/]

Note: I tested by creating a war file which contains 2 JSP files, web.xml and no jar files in it.
5 years ago
Removing standard.jar didn't made any difference to my application. I was still able to access the JSP's which uses JSTL.

Is there anything else which can affect this ?
5 years ago
Thanks Bear for responding.

I cross checked my ear file and there is no servlet-api or jsp-api jars in it, however i found that standard.jar was packaged in it. I removed it and retested the application. But no luck.

Is there anything else i can check ?
5 years ago
Hi All,

My web application is getting migrated to Jboss 5.1 from weblogic 8.1.

There are many JSP pages where we have some HTML tags directly under choose tag(see the sample JSP below) and it used to get evaluated with weblogic 8.1. However if the same app is deployed in jboss and accessed i'm getting the below error

[java] 14:33:02,187 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
[java] org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c in /test8.jsp</h3><p>14: Illegal text inside "c:choose" tag: "<b>A
ler...".</p><p>14: Illegal text inside "c:choose" tag: "</b>...".</p>
[java] at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
[java] at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
[java] at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:74)
[java] at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1795)
[java] at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1741)

JBoss version used - 5.1



When i moved the HTML tags outside the choose tag then it is working.



Is there any mandate not to keep html tags inside choose tag. Please help.

5 years ago
I'm still struck with this issue. Can some one point me out what is missing here ?
5 years ago
Santhosh,

What version of jboss you are using ? Adding the below entries in server/{profile}/conf/jboss-log4j.xml should be good enough.



Is this file BFS.log getting created or is it not at all getting created ?
5 years ago
I have recently came across the similar problems what you mentioned and I hope this should help.

As per your log4j properties file, you have added your application specific appenders to root logger, Remove your application specific appenders entry against the root logger and give a try.
There is one more property on log4j category named "additivity" which will help you in controlling whether to log an event in to specified appender only or with all appenders in the higher in the hierarchy. you can refer to log4j manual for more information.

Also for your other question on precedence for your log4j property file against jboss-log4j.xml(location - *.war/WEB-INF), It is decided whether you have added this entry in your jboss-web.xml or not.

If this is added, then Jboss will use the log4j property packaged along with the application.
5 years ago
Version used here is JBoss EAP 5.1.
5 years ago
I have configured log4j.properties in my application(EAR) as explained in the following article --> http://planet.jboss.org/post/how_do_i_use_my_own_log4j_properties_or_xml_file_in_jboss

i.e., I have packaged jboss-app.xml to isolate the class loading as below.



After doing this, JBoss is able to locate my custom log4j property file however it fails in my start up servlet where i'm trying to locate the JBoss MBean server for registering my custom application specific mbeans. I hope the findMBeanServer method will try to locate the mbean server in the current class loader, as we have isolated the class loader is it creating the problem ?
The below piece of code used to work before adding jboss-app.xml.

Code snippet in my startup servlet is given below:



Can some one help me how to solve this ?

Note:- My goal is to setup my jboss instance with my custom log4j property file without affecting my startup servlet.
5 years ago
Dropped the below JSP file in to jmx-console.war of jboss



I'm able to see the below output:

Locate method : org.jboss.mx.server.MBeanServerImpl@121dcac[ defaultDomain='jboss' ]
Locate Jboss method : org.jboss.mx.server.MBeanServerImpl@121dcac[ defaultDomain='jboss' ]
findMBeanServer method : [org.jboss.mx.server.MBeanServerImpl@121dcac[ defaultDomain='jboss' ], org.jboss.mx.server.MBeanServerImpl@dc5c8b[ defaultDomain='null' ]]

However if i drop the same JSP in to my application WAR and access it. I'm getting this exception as stated in my above posts.

I'm running out of clues. Any help will be highly appreciated.
5 years ago
Also tried this option, but not able to get reference to the mbean server.


Output:
servers.size() = 0

5 years ago
Hi, I'm trying to get reference to Jboss MBean server using the code snippet below. I'm invoking this in a JSP file which is present in a WAR file and deployed in default profile of Jboss.

If i try with the below,
.....
MBeanServer server = MBeanServerLocator.locateJBoss();
.....

I'm getting this error.

[java] java.lang.IllegalStateException: No 'jboss' MBeanServer found!
[java] at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:110)
[java] at org.apache.jsp.demo_jsp._jspService(demo_jsp.java:67)
[java] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[java] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
[java] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
[java] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)

If i use the below:
...
MBeanServer server = MBeanServerLocator.locate();
...

then getting this error.

[java] java.util.NoSuchElementException
[java] at java.util.AbstractList$Itr.next(AbstractList.java:350)
[java] at org.jboss.mx.util.MBeanServerLocator.locate(MBeanServerLocator.java:67)
[java] at org.jboss.mx.util.MBeanServerLocator.locate(MBeanServerLocator.java:80)
[java] at org.apache.jsp.demo1_jsp._jspService(demo1_jsp.java:67)
[java] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
[java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[java] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)


Can you please explain the reason for this error or what is the correct way to obtain reference of Jboss mbean server in application code running on the same VM.
5 years ago
Try closing the FileOutputStream object.
5 years ago
Hi,

From the weblogic documentation i came to know that it is possible to encrypt the database password and store it in domain config.xml(i.e., PasswordEncrypted XML attribute).
However it is mentioned that encryption needs to be carried out by a weblogic encryption utility weblogic.security.Encrypt class.

Is there any possibility or feature where in i can use my custom encryption algorithm to encrypt the password of JDBCConnectionPool and have weblogic to make call back to my encryption module at runtime to decrypt the password while creating DB connections ?

Weblogic version : 8.1

Regards,
Ragavendran.
6 years ago