8 Replies Latest reply: Feb 23, 2014 12:42 PM by xybrek RSS

    Impact of dynamic marshalling

    Michel Werren Novice

      Hello

       

      We get a warning about the dynamic marshalling, unfortunately i found no informations about that in the documentation. What are the risks and limitations about that? I suppose, this warning appears because we use generics in our dto's, is this correct?

       

      Regards

      Michel

        • 1. Re: Impact of dynamic marshalling
          Michel Werren Novice

          Hello together

           

          I have tried to figure out whats the reason for this log entries when the application is intial loaded:

           

          13:51:32,903 WARN  [ErraiMarshalling] (http--0_0_0_0_0_0_0_0-8080-2) could not locate marshaller class.

          13:51:32,904 WARN  [ErraiMarshalling] (http--0_0_0_0_0_0_0_0-8080-2) using dynamic marshallers. dynamic marshallers are designed for development mode testing, and ideally should not be used in production. *

           

          I removed any @Portable, @Remote and @Service defintions, to be sure, no one of my classes produce this warning. The log on trace level for the org.jboss.errai package shows, thats no of my classes was loaded.

           

          Errai 2.1.1.Final / JBoss AS 7.1.1.Final

           

          Does anyone know whats the reason for this?

           

          Thanks for help in advance.

           

          Regards Michel

          • 2. Re: Impact of dynamic marshalling
            Michel Werren Novice

            Hello together

             

            After a little time and assistance of "grep" ... i found the reasons. The resulting problem is, thats the class "ServerMarshallingFactoryImpl" was not in the classpath. And this is because we have a maven configuration with a parent pom, thats define all others as modules.

             

            Unfortunately generate errai the .errai folder which contains this "ServerMarshallingFactoryImpl" class in root path of parent maven project instead the one in that the gwt compiler is defined. Because that, this class will not be in .war file.

             

            But i don't found a configuration for the gwt compiler to solve this path problem.

             

            Does anyone know a solution for this?

             

            Regards

            Michel

            • 3. Re: Impact of dynamic marshalling
              Michel Werren Novice

              Hello

               

              After a bit more soure analyse i found there two system properties: "errai.devel.debugCacheDir" and "errai.marshalling.server.classOutput". These can be used as extraJvmArgs for the Maven GWT Plugin. The following configuration works for me in a multi module maven project:

               

              <extraJvmArgs>-Xmx512m -Derrai.devel.debugCacheDir=${project.basedir}/.errai -Derrai.marshalling.server.classOutput=${project.build.outputDirectory}</extraJvmArgs>

               

               

              Maybe this helps anyone else.

               

              Regards

              Michel

              • 4. Re: Impact of dynamic marshalling
                Jonas Zuberbuehler Newbie

                Thanks a lot for your research! It happened to us that the org/jboss/errai/marshalling/server/impl/ package was located inside another package in the target directory. With the -Derrai.marshalling.server.classOutput setting we could fix that.

                 

                Can you tell us what for you needed the debugCacheDir setting?

                 

                Regards

                --jonas

                • 5. Re: Impact of dynamic marshalling
                  Michel Werren Novice

                  Hello Jonas

                   

                  The first thing what i have figured out was, that's the .errai folder was created at the wrong place. In my configuration it was created in the root folder of the parent modul of that, which declare the gwt maven plugin.

                  I tried then to just copy this .errai folder to the root folder of the module with the gwt maven plugin and it works.

                   

                  I saw the the following lines in the "org.jboss.errai.common.metadata.RebindUtils" class:

                   

                    public static File getErraiCacheDir() {

                      String cacheDir = System.getProperty("errai.devel.debugCacheDir");

                      if (cacheDir == null) cacheDir = new File(".errai/").getAbsolutePath();

                      final File fileCacheDir = new File(cacheDir);

                      //noinspection ResultOfMethodCallIgnored

                      fileCacheDir.mkdirs();

                      return fileCacheDir;

                    }

                   

                  which seems, that this method made the .errai folder and takes respect of the system property "errai.devel.debugCacheDir". Or i am wrong?

                   

                  Regards

                  Michel

                  • 6. Re: Impact of dynamic marshalling
                    Michel Werren Novice

                    I retested it and the "errai.devel.debugCacheDir" is not really a need, because the maven gwt plugin takes both times the same path to locate the .errai folder.

                    • 7. Re: Impact of dynamic marshalling
                      Jonas Zuberbuehler Newbie

                      Thanks for sharing your insights!

                      • 8. Re: Impact of dynamic marshalling
                        xybrek Newbie

                        I tried your suggestion, but it doesn't work for me. Was wondering how were you able to fix this in your maven based gwt-errai app?