1 Reply Latest reply on Feb 19, 2013 9:22 PM by Christian Sadilek

    @NonPortable utility class fails compilation

    Thomas Frühbeck Newbie

      Hi,

      I have a utility class marked @NonPortable used by my common entities only on server side.

      The use of this utility class is fully capsulated by static Builders.

      Nevertheless the class is compiled by GWT compiler and causes failure of the build.

       

      What can I do to make GWT compiler ignore this class?

       

      @NonPortable

      public class KeySerializer

      {

         public static String toString(Object object)

         {

            ByteArrayOutputStream bos = new ByteArrayOutputStream();

            ObjectOutput out = null;

            try

            {

      ...

      }

       

      [INFO]   Errors in 'file:/raid/home/thomas/aerogear-workspace/sakila/src/main/java/at/tfr/sakila/client/common/KeySerializer.java'
      [INFO]      Line 75: No source code is available for type java.io.ByteArrayOutputStream; did you forget to inherit a required module?
      [INFO]      Line 76: No source code is available for type java.io.ObjectOutput; did you forget to inherit a required module?
      [INFO]      Line 81: No source code is available for type java.io.ObjectOutputStream; did you forget to inherit a required module?
      [INFO]      Line 99: No source code is available for type java.io.ByteArrayInputStream; did you forget to inherit a required module?
      [INFO]      Line 100: No source code is available for type java.io.ObjectInput; did you forget to inherit a required module?
      [INFO]      Line 106: No source code is available for type java.io.ObjectInputStream; did you forget to inherit a required module?
      [INFO]Removing invalidated units
      [INFO]   Compilation unit 'file:/raid/home/thomas/aerogear-workspace/sakila/src/main/java/at/tfr/sakila/client/common/KeySerializerMarshaller.java' is removed due to invalid reference(s):
      [INFO]      at.tfr.sakila.client.common.KeySerializer

       

      ...

       

      [INFO] [unresolved] public synchronized void writeTo(java.io.OutputStream) throws java.io.IOException

      [INFO]

      [INFO]

      [INFO]

      [INFO]          org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding

      [INFO]       [ERROR] at KeySerializer.java(75): ByteArrayOutputStream bos = new ByteArrayOutputStream();

       

      Thanks,

      Thomas