Menu

#6 GWT compilation error  Edit

1.0
open
nobody
None
2016-07-22
2013-09-04
Anonymous
No

Hello! I use GWT 2.5.1 and GXT 3.0.1.
I added next dependencies in my pom.xml on gwt client side:

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j-gwt</artifactId>
<version>1.0</version>
</dependency>

Next, i added <inherits name="org.apache.log4j.Log4j"/> in Client.gwt.xml
and added one logging in code for testing

import org.apache.log4j.Logger;

public class ClientEntryPoint extends Composite implements EntryPoint {

    private static final ClientGinInjector injector = GWT.create(ClientGinInjector.class);

    interface ClientEntryPointUiBinder extends UiBinder<Widget, ClientEntryPoint> {}

    private Logger logger = Logger.getLogger(ClientEntryPoint.class.getName());

    @Override public void onModuleLoad() {
        GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
                                            public void onUncaughtException(Throwable exc) {

                                                logger.error("error", exc);
                                            }
                                        });
        Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
            @Override public void execute() { initApplication(); }
        });
    }

}

But when i try to compile this app, i received next error message
I saw, that notifyAll() method is used in AsyncAppender.java, but gwt don't support this method. Maybe i do something wrong?

[INFO] Compiling module ru.acs.tes.directaccess.Client
[INFO] Validating units:
[INFO] [ERROR] Errors in 'org/apache/log4j/supersource/org/apache/log4j/AsyncAppender.java'
[INFO] [ERROR] Line 222: The method notifyAll() is undefined for the type List
[INFO] [ERROR] Line 244: The method notifyAll() is undefined for the type List
[INFO] [ERROR] Errors in 'org/apache/log4j/supersource/org/apache/log4j/EnhancedThrowableRenderer.java'
[INFO] [ERROR] Line 82: No source code is available for type java.lang.ClassNotFoundException; did you forget to inherit a required module?
[INFO] [ERROR] Line 84: No source code is available for type java.lang.Thread; did you forget to inherit a required module?
[INFO] [ERROR] Line 87: The method forName(String) is undefined for the type Class
[INFO] [ERROR] Line 89: The method getClassLoader() is undefined for the type Class<capture#2-of ?="" extends="" EnhancedThrowableRenderer="">
[INFO] [ERROR] Errors in 'jar:file:/C:/.m2/repository/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar!/org/apache/log4j/supersource/org/apache/log4j/config/PropertyGetter.java'
[INFO] [ERROR] Line 42: No source code is available for type java.beans.PropertyDescriptor; did you forget to inherit a required module?
[INFO] [ERROR] Line 55: No source code is available for type java.beans.IntrospectionException; did you forget to inherit a required module?
[INFO] [ERROR] Line 56: No source code is available for type java.beans.BeanInfo; did you forget to inherit a required module?
[INFO] [ERROR] Line 56: No source code is available for type java.beans.Introspector; did you forget to inherit a required module?
[INFO] [ERROR] Line 71: No source code is available for type java.lang.reflect.Method; did you forget to inherit a required module?
[INFO] [ERROR] Line 86: No source code is available for type java.lang.IllegalAccessException; did you forget to inherit a required module?
[INFO] [ERROR] Line 88: No source code is available for type java.lang.reflect.InvocationTargetException; did you forget to inherit a required module?
[INFO] [ERROR] Line 89: No source code is available for type java.lang.InterruptedException; did you forget to inherit a required module?
[INFO] [ERROR] Line 89: No source code is available for type java.io.InterruptedIOException; did you forget to inherit a required module?
[INFO] [ERROR] Line 90: No source code is available for type java.lang.Thread; did you forget to inherit a required module?
[INFO] [ERROR] Line 100: The method isAssignableFrom(Class) is undefined for the type Class<String>
[INFO] [ERROR] Line 100: The method isAssignableFrom(Class) is undefined for the type Class<Integer>
[INFO] [ERROR] Line 100: The method isAssignableFrom(Class) is undefined for the type Class<Long>
[INFO] [ERROR] Line 100: The method isAssignableFrom(Class) is undefined for the type Class<Boolean>
[INFO] [ERROR] Line 100: The method isAssignableFrom(Class) is undefined for the type Class<Priority>
[INFO] [ERROR] Errors in 'jar:file:/C:/.m2/repository/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar!/org/apache/log4j/supersource/org/apache/log4j/config/PropertyPrinter.java'
[INFO] [ERROR] Line 40: No source code is available for type java.util.Hashtable<K,V>; did you forget to inherit a required module?
[INFO] [ERROR] Line 44: No source code is available for type java.io.PrintWriter; did you forget to inherit a required module?
[INFO] [ERROR] Errors in 'jar:file:/C:/.m2/repository/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar!/org/apache/log4j/supersource/org/apache/log4j/helpers/OnlyOnceErrorHandler.java'
[INFO] [ERROR] Line 80: No source code is available for type java.io.InterruptedIOException; did you forget to inherit a required module?
[INFO] [ERROR] Line 80: No source code is available for type java.lang.InterruptedException; did you forget to inherit a required module?
[INFO] [ERROR] Line 81: No source code is available for type java.lang.Thread; did you forget to inherit a required module?
[INFO] [ERROR] Errors in 'org/apache/log4j/supersource/org/apache/log4j/helpers/RelativeTimeDateFormat.java'
[INFO] [ERROR] Line 34: No source code is available for type java.text.DateFormat; did you forget to inherit a required module?
[INFO] [ERROR] Line 51: No source code is available for type java.text.FieldPosition; did you forget to inherit a required module?
[INFO] [ERROR] Line 60: No source code is available for type java.text.ParsePosition; did you forget to inherit a required module?
[INFO] [ERROR] Errors in 'jar:file:/C:/.m2/repository/log4j/log4j-gwt/1.0/log4j-gwt-1.0.jar!/org/apache/log4j/supersource/org/apache/log4j/xml/SAXErrorHandler.java'
[INFO] [ERROR] Line 23: No source code is available for type org.xml.sax.ErrorHandler; did you forget to inherit a required module?
[INFO] [ERROR] Line 26: No source code is available for type org.xml.sax.SAXParseException; did you forget to inherit a required module?
[INFO] [ERROR] Errors in 'org/apache/log4j/supersource/org/apache/log4j/xml/UnrecognizedElementHandler.java'
[INFO] [ERROR] Line 42: No source code is available for type org.w3c.dom.Element; did you forget to inherit a required module?
[INFO] [ERROR] Line 42: No source code is available for type java.util.Properties; did you forget to inherit a required module?
[INFO] [ERROR] Aborting compile due to errors in some input files

Discussion

  • Anonymous

    Anonymous - 2015-06-03

    Hi there.

    I am having the exact same problem as you are.
    Have you been able to sort this out?

     
  • Anonymous

    Anonymous - 2016-07-22
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel