The log file is as shown...
Expand|Select|Wrap|Line Numbers
- [ERROR] [06 Apr 2009 09:45:56] [Trace] [WebContainer : 48] - App Number: 0
- [ERROR] [06 Apr 2009 09:45:56] [Trace] [WebContainer : 48] - Response for AE Completion No such RID Found
- [ERROR] [06 Apr 2009 09:46:02] [Trace] [WebContainer : 20] - infrastructure:ID_UNHANDLED: An un-handled server exception occurred. Please contact your administrator.
- at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
- at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
- at com.ibm.rmi.util.ProxyUtil$2.run(ProxyUtil.java(Compiled Code))
- at java.security.AccessController.doPrivileged1(Native Method)
- at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
- at com.ibm.rmi.util.ProxyUtil.invokeWithPrivilege(ProxyUtil.java(Compiled Code))
- at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java(Compiled Code))
- at $Proxy90.invoke(Unknown Source)
- nested exception is:
- infrastructure:RUN_ID_RUNTIME: A runtime exception occurred: javax.transaction.RollbackException.
- at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
- at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
- at com.ibm.rmi.util.ProxyUtil$2.run(ProxyUtil.java(Compiled Code))
- at java.security.AccessController.doPrivileged1(Native Method)
- at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
- at com.ibm.rmi.util.ProxyUtil.invokeWithPrivilege(ProxyUtil.java(Compiled Code))
- at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java(Compiled Code))
- at $Proxy90.invoke(Unknown Source)
- [ERROR] [06 Apr 2009 09:46:02] [Trace] [WebContainer : 49] - infrastructure:ID_UNHANDLED: An un-handled server exception occurred. Please contact your administrator.
- at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
- at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
- at com.ibm.rmi.util.ProxyUtil$2.run(ProxyUtil.java(Compiled Code))
- at java.security.AccessController.doPrivileged1(Native Method)
Expand|Select|Wrap|Line Numbers
- "[ERROR] [06 Apr 2009 09:46:02] [Trace] [WebContainer : 20] - infrastructure:ID_UNHANDLED: An un-handled server exception occurred. Please contact your administrator."
- upto the next occurence of the string "[ERROR]"
- i.e. it should include the following ...
- [ERROR] [06 Apr 2009 09:46:02] [Trace] [WebContainer : 20] - infrastructure:ID_UNHANDLED: An un-handled server exception occurred. Please contact your administrator.
- ....
- ...
- ...
- nested exception is:
- infrastructure:RUN_ID_RUNTIME: A runtime exception occurred:
- ...
- ...
- ...
- at $Proxy90.invoke(Unknown Source)
I could come up with the following code but it returned only the lines containing the strings mentioned.
Expand|Select|Wrap|Line Numbers
- while ($line = <LOGFILE>) {
- # chomp $line;
- if ($line =~ /^\[ERROR\](.*?)infrastructure:ID_UNHANDLED:.*$/) {
- push @message, $line;
- $match = 1;
- next;
- }
- if ($match && ($line =~ /^nested exception is:/)) {
- $line = <LOGFILE>;
- push @message, $line;
- $match = 0;
- next;
- }
- }