5 Replies Latest reply on Jan 21, 2015 5:40 PM by rjdamore

    Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception

    rjdamore

      Hi all,

       

      We have a problem compiling our project: we are getting a

       

      [ERROR] Errors in 'gen/org/jboss/errai/marshalling/client/api/MarshallerFactoryImpl.java'

      [INFO]       [ERROR] Line 181: Failed to resolve 'org.jboss.errai.marshalling.client.api.MarshallerFactoryImpl.Marshaller_for_java_lang_Throwable' via deferred binding


      We are using errai 3.1 and gwt 2.7


      gwt.xml file:


      <?xml version="1.0" encoding="UTF-8"?>

      <module>   

      <replace-with class="gov.lanl.queue.client.mvp.ClientFactoryImpl">

          <when-type-is class="gov.lanl.queue.client.mvp.ClientFactory"/>

      </replace-with>

        <inherits name='com.google.gwt.activity.Activity'/>

        <inherits name='com.google.gwt.place.Place'/>

        <inherits name="org.jboss.errai.common.ErraiCommon"/>

        <inherits name="org.jboss.errai.bus.ErraiBus" />

        <inherits name="org.jboss.errai.enterprise.CDI"/>

        <inherits name="org.jboss.errai.ioc.Container"/>

        <inherits name='org.jboss.errai.databinding.DataBinding'/>

        <inherits name="com.github.gwtbootstrap.Bootstrap" />

        <set-property name="bootstrap.responsiveDesign" value="true"/>

       

        <add-linker name="xsiframe"/>

        <set-configuration-property name="devModeRedirectEnabled" value="true"/> 

        <set-property name="compiler.useSourceMaps" value="true"/>

       

        <source path='client' />

        <source path='shared' />

      </module>

       

      I added the configuration-property and the property name at the end from another discussion on these forums regarding errai 3.0

       

      We are running mvn compile then mvn gwt:compile and want to then run mvn gwt:run 

       

      Is this the correct order of operations ?? and anything else we are missing for inherits? 

      Let me know if you need more info.

       

      thanks,

        • 1. Re: Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception
          ddadlani

          Hello Rico,

           

          I am unable to reproduce your problem. Are you using Errai 3.1.0.Final or 3.1.1.Final? Could you post your pom.xml as well?

           

          As for the devmode configuration properties, you only need that if you are using GWT 2.5 or 2.6. For 2.7 you do not need to specify the linker or devmode properties.

           

          Regards,
          Divya

          • 2. Re: Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception
            rjdamore

            We were trying to use 3.1 and 2.7

             

            the pom will reflect other versions of each as we were trying to get it to work.

             

            <?xml version="1.0" encoding="UTF-8"?>

            <project

              xmlns="http://maven.apache.org/POM/4.0.0"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

             

              <modelVersion>4.0.0</modelVersion>

              <groupId>gov.lanl.queue</groupId>

              <artifactId>Queue</artifactId>

              <packaging>war</packaging>

              <version>1.0-SNAPSHOT</version>

              <name>GWT Maven Archetype</name>

             

              <properties>

                <!-- Convenience property to set the GWT version -->

                <gwtVersion>2.6.1</gwtVersion>

                <erraiVersion>3.1.0.Final</erraiVersion>

              <errai.dev.context>${project.artifactId}</errai.dev.context>

              <javaee.version>3.0.2.Final</javaee.version>

                <!-- GWT needs at least java 1.6 -->

                <maven.compiler.source>1.7</maven.compiler.source>

                <maven.compiler.target>1.7</maven.compiler.target>

             

                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

              </properties>

             

              <dependencyManagement>

                <dependencies>

                  <dependency>

                    <groupId>com.google.gwt</groupId>

                    <artifactId>gwt</artifactId>

                    <version>${gwtVersion}</version>

                    <type>pom</type>

                    <scope>import</scope>

                  </dependency>

                  <dependency>

              <groupId>org.jboss.spec</groupId>

              <artifactId>jboss-javaee-6.0</artifactId>

              <version>3.0.2.Final</version>

               </dependency>

                <dependency>

              <groupId>org.jboss.errai</groupId>

              <artifactId>errai-cdi-jboss</artifactId>

              <version>3.0.2.Final</version>

              </dependency>

               

                </dependencies>

              </dependencyManagement>

             

              <dependencies>

                <dependency>

                  <groupId>com.google.gwt</groupId>

                  <artifactId>gwt-servlet</artifactId>

                  <scope>runtime</scope>

                  <version>${gwtVersion}</version>

                </dependency>

                <dependency>

                  <groupId>com.google.gwt</groupId>

                  <artifactId>gwt-user</artifactId>

                  <scope>provided</scope>

                  <version>${gwtVersion}</version>

                </dependency>

             

                <dependency>

                  <groupId>junit</groupId>

                  <artifactId>junit</artifactId>

                  <version>4.11</version>

                  <scope>test</scope>

                </dependency>

                  <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-bus</artifactId>

                <version>${erraiVersion}</version>

               </dependency>

               <dependency>

                <groupId>org.jboss.errai</groupId>

                <artifactId>errai-data-binding</artifactId>

                <version>${erraiVersion}</version>

               </dependency>

               <dependency>

              <groupId>org.jboss.errai</groupId>

              <artifactId>errai-ioc</artifactId>

              <version>${erraiVersion}</version>

               </dependency>

               <dependency>

              <groupId>org.jboss.errai</groupId>

              <artifactId>errai-cdi-client</artifactId>

              <version>${erraiVersion}</version>

               </dependency>

               <dependency>

              <groupId>org.jboss.errai</groupId>

              <artifactId>errai-javaee-all</artifactId>

              <version>3.0.2.Final</version>

               </dependency>

              

               <dependency>

                 <groupId>org.jboss.spec</groupId>

                 <artifactId>jboss-javaee-6.0</artifactId>

                 <version>${javaee.version}</version>

                 <type>pom</type>

                 <scope>provided</scope>

               </dependency>

               <dependency>

                 <groupId>org.jboss.errai</groupId>

                 <artifactId>errai-cdi-jboss</artifactId>

               </dependency>

              

             

              

              

              

             

              

              

              

               <dependency>

              <groupId>com.github.gwtbootstrap</groupId>

              <artifactId>gwt-bootstrap</artifactId>

              <version>2.3.2.0</version>

               </dependency>

               <dependency>

              <groupId>org.hibernate</groupId>

              <artifactId>hibernate-core</artifactId>

              <version>4.3.8.Final</version>

               </dependency>

               <dependency>

                <groupId>org.hibernate</groupId>

                <artifactId>hibernate-c3p0</artifactId>

                <version>4.3.8.Final</version>

               </dependency>

               <dependency>

              <groupId>org.hibernate</groupId>

              <artifactId>hibernate-ehcache</artifactId>

              <version>4.3.8.Final</version>

               </dependency>

               <dependency>

              <groupId>org.hibernate</groupId>

              <artifactId>hibernate-entitymanager</artifactId>

              <version>4.3.8.Final</version>

               </dependency>

              

              

              

              </dependencies>

             

             

             

              <build>

                <!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->

                <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>

             

                <plugins>

             

                  <!-- GWT Maven Plugin -->

                  <plugin>

                    <groupId>org.codehaus.mojo</groupId>

                    <artifactId>gwt-maven-plugin</artifactId>

                    <version>2.6.1</version>

                    <executions>

                      <execution>

                        <goals>

                          <goal>compile</goal>

                          <goal>test</goal>

                         <!--   <goal>generateAsync</goal>-->

                        </goals>

                      </execution>

                    </executions>

                    <!-- Plugin configuration. There are many available options, see

                      gwt-maven-plugin documentation at codehaus.org

                      -Derrai.dev.context=queue

                     

                      -->

                    <configuration>

                      <logLevel>INFO</logLevel>

                      <runTarget>Queue.html</runTarget>

                    <modules>

                        <module>gov.lanl.queue.Queue</module>

                        <module>gov.lanl.queue.client.mvp.MVP</module>

                      </modules>

                      <hostedWebapp>src/main/webapp</hostedWebapp>

                    </configuration>

                  </plugin>

                </plugins>

              </build>

             

            </project>

            • 3. Re: Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception
              rjdamore

              Here is a much shorter pom.xml file.  I just included errai-bus and the same problem with mvn gwt:compile happens.  This is after a clean and mvn compile of course.

               

              First the top of the error stack:

              [ERROR] Generator 'org.jboss.errai.marshalling.rebind.MarshallerGenerator' threw an exception while rebinding 'org.jboss.errai.marshalling.client.api.MarshallerFactoryImpl.Marshaller_for_java_lang_StackTraceElement'

              [INFO] org.jboss.errai.codegen.exception.GenerationException: Generation context for output target GWT was not created!


              Now the pom.xml file.

               

               

               

              <?xml version="1.0" encoding="UTF-8"?>

              <project

                xmlns="http://maven.apache.org/POM/4.0.0"

                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

               

                <modelVersion>4.0.0</modelVersion>

                <groupId>gov.lanl.queue</groupId>

                <artifactId>Queue</artifactId>

                <packaging>war</packaging>

                <version>1.0-SNAPSHOT</version>

                <name>GWT Maven Archetype</name>

               

                <properties>

                  <!-- Convenience property to set the GWT version -->

                  <gwtVersion>2.7.0</gwtVersion>

               

                  <!-- GWT needs at least java 1.6 -->

                  <maven.compiler.source>1.7</maven.compiler.source>

                  <maven.compiler.target>1.7</maven.compiler.target>

               

                  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

                </properties>

               

                <dependencyManagement>

                  <dependencies>

                    <dependency>

                      <groupId>com.google.gwt</groupId>

                      <artifactId>gwt</artifactId>

                      <version>${gwtVersion}</version>

                      <type>pom</type>

                      <scope>import</scope>

                    </dependency>

                  </dependencies>

                </dependencyManagement>

               

                <dependencies>

                  <dependency>

                    <groupId>com.google.gwt</groupId>

                    <artifactId>gwt-servlet</artifactId>

                    <scope>runtime</scope>

                  </dependency>

                  <dependency>

                    <groupId>com.google.gwt</groupId>

                    <artifactId>gwt-user</artifactId>

                    <scope>provided</scope>

                  </dependency>

                  <dependency>

                    <groupId>com.google.gwt</groupId>

                    <artifactId>gwt-dev</artifactId>

                    <scope>provided</scope>

                  </dependency>

                  <dependency>

                    <groupId>junit</groupId>

                    <artifactId>junit</artifactId>

                    <version>4.11</version>

                    <scope>test</scope>

                  </dependency>

                  <dependency>

                <groupId>com.github.gwtbootstrap</groupId>

                <artifactId>gwt-bootstrap</artifactId>

                <version>2.3.2.0</version>

                 </dependency>

                

                 <!-- Errai Dependencies -->

                 <dependency>

                   <groupId>org.jboss.errai</groupId>

                   <artifactId>errai-bus</artifactId>

                   <version>3.1.0.Final</version>

                 </dependency>

                </dependencies>

               

                <build>

                  <!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->

                  <outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>

               

                  <plugins>

               

                    <!-- GWT Maven Plugin -->

                    <plugin>

                      <groupId>org.codehaus.mojo</groupId>

                      <artifactId>gwt-maven-plugin</artifactId>

                      <version>2.7.0</version>

                      <executions>

                        <execution>

                          <goals>

                            <goal>compile</goal>

                            <goal>test</goal>

                            <goal>generateAsync</goal>

                          </goals>

                        </execution>

                      </executions>

                      <!-- Plugin configuration. There are many available options, see

                        gwt-maven-plugin documentation at codehaus.org -->

                      <configuration>

                      <logLevel>INFO</logLevel>

                        <runTarget>Queue.html</runTarget>

                        <modules>

                          <module>gov.lanl.queue.Queue</module>

                          <module>gov.lanl.queue.client.mvp.MVP</module>

                        </modules>

                        <hostedWebapp>src/main/webapp</hostedWebapp>

                      </configuration>

                    </plugin>

                  </plugins>

                </build>

              </project>

              • 4. Re: Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception
                ddadlani

                Hi Rico,

                 

                Looking at your gwt-maven-plugin configuration, you seem to have two different modules, but you don't mention different .gwt.xml files.
                Do you have a separate .gwt.xml file for each module? In each of the gwt.xml files, you would need to declare the source path for the specific module.

                 

                Divya

                • 5. Re: Question:  problem running gwt:compile from cmdline  MarshallerFactoryImpl exception
                  rjdamore

                  Hello again Divya,

                   

                  Last night I came to the same conclusion that you mention here.  We are now compiling ok.  I'm curious, since my child module doesn't have an entry point class the gwt compiler is stating that it is skipping it during compilation.  However when I examine the compiled source, the .class files for that module are indeed there. 

                   

                  Anyway we are compiling and moving on to the next problem which is deployment to the jboss server. 

                   

                  Thank you for you help!

                   

                  It isn't the easiest thing to navigate errai's configuration, on top of gwt's.