gigi sheh

Greenhorn
+ Follow
since Oct 15, 2012
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gigi sheh

the tld seems locatable fine. I have this line in the log

DEBUG [org.apache.catalina.startup.TldConfig] Scanning TLD at resource path '/WEB-INF/tlds/myTags.tld'
3 years ago
JSP
we use JBoss 5.0.1. Not insert logging but I mean to set the logging level of the classes in the custom tag invoking stack at DEBUG so more information will be outputted
3 years ago
JSP
still not working. The logging statement is not printed either



can someone please point me to the stack that invokes the custom tag so I can set some logging/debugging there? I feel I am fumbling in the dark
3 years ago
JSP
intellij. I will try logging too.
3 years ago
JSP
I have set breakpt within doStartTag, it is not called at call
3 years ago
JSP
Thank you for the replies. The tag is completely gone from the HTML. It is a legacy project that is assigned to me for a bug. Not sure why Tag interface is used rather than SimpleTag. I guess I can switch to SimpleTag. But what can I do in general to troubleshoot/debug such issues? I don't know what direction to look into. If I knew more about the internal mechanism of how custom tags are called/activated, then I could have set those classes at DEBUG logging level or set breakpoints within them
3 years ago
JSP
Hello,

I am totally clueless and desperate at this moment. As someone usually working at the backend service, I am working on a project that uses a custom tag in a JSP file. Here is the tag descriptor



Here is the Tag handler


And here is the JSP fragment that uses the custom tag


Everything seems working fine except that the custom tag handler does not get called at call. I set breakpoint and it never stops there. The JSP page is displayed fine, only not showing the custom tag content :(
and there is no logged error/warning from the log. The tld is found fine. Can someone please give me some hint/helps on how to troubleshoot this? Like what classes called/validated the tag handler so I can logging those classes at DEBUG level to see what goes wrong. Any helps would be deeply appreciate it. It is so frustrating

Thanks a lot
3 years ago
JSP
Hello,

We have a webservices application that uses Java 1.6.0_43, Spring 3.2.3, CXF 2.6.9 and deployed to Jboss 5.0.1 GA in a LINUX x86_64 centos box. It essentially uses apache httpclient (4.2.2) to call internal services and returns the results back to customers. The application has been running fine for a year or so until early this month when all of sudden, it loaded about 300K classes in a very short time during our regression tests and saturated the CPU usage ever since. Hence the application is no longer responding.

I have been trying to troubleshoot the problem for a while. Tried visualvm, dynatrace. thread dumps. heap dumps... None of them is very effective in capturing what are the classes that are loaded so many times and what path triggered that. Can someone please kindly share some hints/thoughts? Any helps would be deeply appreciated

Gigi

3 years ago
Hello,

we have a web application that always takes the input of time in its UTC format as

2012-12-06T05:00:00.000Z


and here is the code that parse the date into a java util Date object

private static final Pattern PATTERN = Pattern.compile(
"(\\d{4})(?:-(\\d{2}))?(?:-(\\d{2}))?(?:[Tt](?:(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(?:\\.(\\d{3}))?)?([Zz])?(?:([+-])(\\d{2}):(\\d{2}))?");


Matcher m = PATTERN.matcher(dateString);
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
int hoff = 0, moff = 0, doff = -1;
if (m.group(9) != null) {
doff = m.group(9).equals("-") ? 1 : -1;
hoff = doff * (m.group(10) != null ? Integer.parseInt(m.group(10)) : 0);
moff = doff * (m.group(11) != null ? Integer.parseInt(m.group(11)) : 0);
}
c.set(Calendar.YEAR, Integer.parseInt(m.group(1)));
c.set(Calendar.MONTH, m.group(2) != null ? Integer.parseInt(m.group(2))-1 : 0);
c.set(Calendar.DATE, m.group(3) != null ? Integer.parseInt(m.group(3)) : 1);
c.set(Calendar.HOUR_OF_DAY, m.group(4) != null ? Integer.parseInt(m.group(4)) + hoff: 0);
c.set(Calendar.MINUTE, m.group(5) != null ? Integer.parseInt(m.group(5)) + moff: 0);
c.set(Calendar.SECOND, m.group(6) != null ? Integer.parseInt(m.group(6)) : 0);
c.set(Calendar.MILLISECOND, m.group(7) != null ? Integer.parseInt(m.group(7)) : 0);
return c.getTime();


Recently an odd thing was observed that as the application first starts, the returned date will be just correctly printed as
Thur Dec 06 00:00:00 EST 2012

since we are in EST timezone. Then after a while, after some execution, even without restart the application, the same date would be printed as
Thur Dec 06 05:00:00 UTC 2012

I have been digging down in the application and I don't see any changes that would reset the default timezone of our application. How could that happen? It has been a week since we started working on this and we are still clueless :-(

Also, is there anyway to make sure the application keeps using the system timezone as that would not be changing?


thanks a lot for any help/hints
5 years ago
Hello,

we have a webservices application that always takes the input of time in its UTC format as

2012-12-06T05:00:00.000Z


and here is the code that parse the date into a java util Date object

private static final Pattern PATTERN = Pattern.compile(
"(\\d{4})(?:-(\\d{2}))?(?:-(\\d{2}))?(?:[Tt](?:(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(?:\\.(\\d{3}))?)?([Zz])?(?:([+-])(\\d{2}):(\\d{2}))?");


Matcher m = PATTERN.matcher(dateString);
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
int hoff = 0, moff = 0, doff = -1;
if (m.group(9) != null) {
doff = m.group(9).equals("-") ? 1 : -1;
hoff = doff * (m.group(10) != null ? Integer.parseInt(m.group(10)) : 0);
moff = doff * (m.group(11) != null ? Integer.parseInt(m.group(11)) : 0);
}
c.set(Calendar.YEAR, Integer.parseInt(m.group(1)));
c.set(Calendar.MONTH, m.group(2) != null ? Integer.parseInt(m.group(2))-1 : 0);
c.set(Calendar.DATE, m.group(3) != null ? Integer.parseInt(m.group(3)) : 1);
c.set(Calendar.HOUR_OF_DAY, m.group(4) != null ? Integer.parseInt(m.group(4)) + hoff: 0);
c.set(Calendar.MINUTE, m.group(5) != null ? Integer.parseInt(m.group(5)) + moff: 0);
c.set(Calendar.SECOND, m.group(6) != null ? Integer.parseInt(m.group(6)) : 0);
c.set(Calendar.MILLISECOND, m.group(7) != null ? Integer.parseInt(m.group(7)) : 0);
return c.getTime();


Recently an odd thing was observed that as the application first starts, the returned date will be just correctly printed as
Thur Dec 06 00:00:00 EST 2012

since we are in EST timezone. Then after a while, after some execution, even without restart the application, the same date would be printed as
Thur Dec 06 05:00:00 UTC 2012

I have been digging down in the application and I don't see any changes that would reset the default timezone of our application. How could that happen? It has been a week since we started working on this and we are still clueless :-(

Also, is there anyway to make sure the application keeps using the system timezone as that would not be changing?


thanks a lot for any help/hints
5 years ago