-
1. Re: Impact of dynamic marshalling
werrenmi Nov 8, 2012 8:45 AM (in response to werrenmi)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
werrenmi Nov 8, 2012 2:59 PM (in response to werrenmi)1 of 1 people found this helpfulHello 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
werrenmi Nov 8, 2012 5:51 PM (in response to werrenmi)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 Nov 9, 2012 9:39 AM (in response to werrenmi)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
werrenmi Nov 9, 2012 10:54 AM (in response to jonas.zuberbuehler)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
werrenmi Nov 9, 2012 11:54 AM (in response to werrenmi)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 Nov 14, 2012 2:35 AM (in response to werrenmi)Thanks for sharing your insights!
-
8. Re: Impact of dynamic marshalling
xybrek Feb 23, 2014 12:42 PM (in response to werrenmi)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?