Warning found starting up gwt-log

244 views
Skip to first unread message

grigory

unread,
Mar 29, 2011, 12:07:40 PM3/29/11
to gwt-log
The following warning appears in the log:

[WARN] Failed to deobfuscate stack trace for permutation HostedMode.
Verify that the corresponding symbolMap is available.

Found this in the source code for RemoteLoggerServiceImpl, suspect
that some server-side configuration is missing or incorrect. I did
compile my gwt code with 'Pretty' option. Using gwt-log 3.1.0, gwt 2.2
and gae 1.4.2.

Fred Sauer

unread,
Mar 29, 2011, 2:06:51 PM3/29/11
to gwt...@googlegroups.com, grigory
http://code.google.com/p/gwt-log/wiki/GettingStarted


--
You received this message because you are subscribed to the Google Groups "gwt-log" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-log+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-log?hl=en.




--
Fred Sauer
Developer Advocate
G
ooglInc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@google.com


bodrin

unread,
May 8, 2011, 2:21:21 PM5/8/11
to gwt-log
Hi, there. I have a similar problem:

WARN [http-8080-3] gwt-log - Failed to deobfuscate stack trace for
permutation 75D4B22C83B9C867E8962FE434B5A4E7. Verify that the
correspondi
ng symbolMap is available.
...
at Unknown.Xnb(Unknown Source)
at Unknown.Unb(Unknown Source)
at Unknown.qjb(Unknown Source)
at Unknown.yjb(Unknown Source)
at Unknown.Znb(Unknown Source)
at Unknown.Dnb(Unknown Source)
at Unknown.anonymous(Unknown Source)
at Unknown.anonymous(Unknown Source)
...

I'm using GWT 2.3.0 with gwt-log-3.1.2. I'm compiling with -deploy ...
but it does not help.

Do you have any suggestion?

Thanks,
bodrin

Fred Sauer

unread,
May 9, 2011, 12:18:05 AM5/9/11
to gwt...@googlegroups.com
Have you checked your web.xml settings as described in http://code.google.com/p/gwt-log/wiki/GettingStarted ?

levier

unread,
May 11, 2011, 12:51:38 PM5/11/11
to gwt-log
Hi Fred,

Running gwt log with symbolMaps now for quite a while, but still can't
get it to work.

The deployed app is on a websphere:
in ...Node01Cell\APP.ear\module.war\WEB-INF\deploy\module\symbolMaps
I do see the D599FD89AA3EAD583144861E01CE8F0F.symbolMap file with a
lot of stuff in that file. So it's compiled and deployed OK.


Yet, I still get to see stuff like this on the client
java.lang.ClassCastException
at Unknown.fillInStackTrace(Unknown source:0)
at Unknown.ClassCastException_0(Unknown source:0)
at Unknown.dynamicCast(Unknown source:0)
at Unknown.onSubmitValues_2(Unknown source:0)
at Unknown.dispatch_21(Unknown source:0)
at Unknown.$doFire(Unknown source:0)
at Unknown.$fireEvent_1(Unknown source:0)

and the gwt-log remote logger gives me this:
Failed to deobfuscate stack trace for permutation
D599FD89AA3EAD583144861E01CE8F0F. Verify that the corresponding
symbolMap is available.

My web.xml param is set to this:
<param-value>WEB-INF/deploy/module/symbolMaps/</param-value>

Standard String logs are sent OK from client to server.
What am I missing? How can I be sure that the deobfuscation process
looks at the right directory? Does the -STYLE of gwtc matter?

Thanks for any hints

Fred Sauer

unread,
May 13, 2011, 12:47:38 AM5/13/11
to gwt...@googlegroups.com




note the comments below: 

<servlet>
 
<servlet-name>gwt-log-remote-logger-servlet</servlet-name>
 
<servlet-class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-class>
 
<!-- symbolMaps param provides for stack trace deobfuscation -->
 
<init-param>
   
<param-name>symbolMaps</param-name>
   
<!-- This value assumes a GWT compile with '-deploy war/WEB-INF/deploy/' -->
   
<param-value>WEB-INF/deploy/yourmodulename/symbolMaps/</param-value>
 
</init-param>
</servlet>

<servlet-mapping>
 
<servlet-name>gwt-log-remote-logger-servlet</servlet-name>
 
<url-pattern>/your-module-name/gwt-log</url-pattern>
</servlet-mapping>


--
You received this message because you are subscribed to the Google Groups "gwt-log" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-log+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-log?hl=en.

levier

unread,
May 16, 2011, 2:12:50 AM5/16/11
to gwt-log
- The web.xml looks fine per the guide.
- the *.symbolmaps files are deployed under that directory
- the remote gwt logger works ok for normal String output

I guess I'll fetch the gwt log source code and do a debug session on a
compiled and deployed app on a webserver to get to the bottom of
this :/


On May 13, 6:47 am, Fred Sauer <fre...@google.com> wrote:
> Tryhttp://code.google.com/p/gwt-log/wiki/GettingStarted

Fred Sauer

unread,
May 17, 2011, 12:08:46 AM5/17/11
to gwt...@googlegroups.com
If you step throw the StackTraceDeobfuscator class, you should be able to figure out what is going on fairly quickly

confile

unread,
Feb 20, 2014, 8:40:54 PM2/20/14
to gwt...@googlegroups.com
I have the same problem with GWT 2.6

Fred Sauer

unread,
Mar 7, 2014, 9:56:32 PM3/7/14
to gwt...@googlegroups.com
There are new options, which you can try out using the jar attached to https://code.google.com/p/gwt-log/issues/detail?id=73#c5

You can now specify symbolMapsFileSystem, symbolMapsResourcePath or symbolMapsResourceUrl prefixed initialization parameters, depending on your setup.

To unsubscribe from this group and stop receiving emails from it, send an email to gwt-log+u...@googlegroups.com.

To post to this group, send email to gwt...@googlegroups.com.
Message has been deleted

confile

unread,
Mar 23, 2014, 5:45:50 PM3/23/14
to gwt...@googlegroups.com
Hi Fred,

I tried all the new options from here https://code.google.com/p/gwt-log/issues/detail?id=73#c5 and it turns out that none of them was working for me. 


I modifed the init method of com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl here is the init that works: 


@Override
public final void init(ServletConfig config) throws ServletException {
  super.init(config);

  String cwd = "<unknown>";
  try {
    cwd = new File(".").getCanonicalPath();
  } catch (IOException ignore) {
  }

  deobfuscatorList = new ArrayList<StackTraceDeobfuscator>();
  for (@SuppressWarnings("unchecked")
  Enumeration<String> e = config.getInitParameterNames(); e.hasMoreElements();) {
    String name = e.nextElement();
    if (name.startsWith(PARAMETER_SYMBOL_MAPS)) {
      String path = config.getInitParameter(name);
      File symbolMapsDirectory = new File(path);
      
      // bugfix
      
      if (symbolMapsDirectory.isDirectory()) {
        deobfuscatorList.add(new StackTraceDeobfuscator(path));
      } else {
        URL symbolMapsUrl;
        
        try {
       symbolMapsUrl = config.getServletContext().getResource(path);
       if (symbolMapsUrl.getProtocol().equalsIgnoreCase("file")) {
       symbolMapsDirectory = new File(symbolMapsUrl.getFile());
       } 
       else {
       String realPath = getServletContext().getRealPath(path);
       symbolMapsDirectory = new File(realPath);
            }
        } 
        catch (MalformedURLException e1) {
          Log.warn("Servlet configuration parameter '" + name + "' specifies directory '" + path
            + "' which does not exist or is not relative to your server's current working directory '" + cwd + "'");
        }
        
        if (symbolMapsDirectory.isDirectory()) {
       deobfuscatorList.add(new StackTraceDeobfuscator(symbolMapsDirectory.getAbsolutePath()));
        } else {
          Log.warn("Servlet configuration parameter '" + name + "' specifies directory '" + path
            + "' which does not exist or is not relative to your server's current working directory '" + cwd + "'");
        }
        
        
      }

      
    }
  }
  if (deobfuscatorList.isEmpty()) {
    Log.warn("In order to enable stack trace deobfuscation, please specify the '"
        + PARAMETER_SYMBOL_MAPS + "' <init-param> for the " + RemoteLoggerServlet.class.getName()
        + " servlet in your web.xml");
  }

  accessControlAllowOriginHeader = config.getInitParameter(ACCESS_CONTROL_ALLOW_ORIGIN);
  
  Log.info("Initialized MyRemoteLoggerServlet");
}



Now I find that remote logging only works with error and fatal messages. When I set

<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" /> 

I do not get any trace, debug, info, warn messages reported to the server. They appear in the console but only error and fatal written to server logs.

Is there any option I miss?


Thanks for help Fred.

Fred Sauer

unread,
Apr 6, 2014, 3:38:21 PM4/6/14
to gwt...@googlegroups.com
Check your server logging documentation to determine how to configure its logging level, e.g. see java.util.logging or log4j documentation, depending on what you're using.


For more options, visit https://groups.google.com/d/optout.



--
Fred Sauer
fre...@gmail.com
Reply all
Reply to author
Forward
0 new messages