Thursday, September 2, 2010

gwt-test-utills test case

Hi,

I using eclipse 3.4.2 with gwt 2.0.4 ,to test my gwt i have decided to test using gwt-test-utils so i have edited pom.xml accordingly also i added all jar which needed. but when i test it gives this error , i am using junit 4.

java.lang.NoClassDefFoundError: AbstractGWTEasyMockTest
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
etc ...


Jar file which i added in class path are following:
cglib-nodep-2.1_3.jar
antlr-runtime-3.0.1.jar
easymock-2.3.jar
easymockclassextension-2.3.jar
javassist-3.8.GA.jar
stringtemplate-3.1-b1.jar


So error is on GWTTestReflectionUtils, and AbstractGwtTest. So is it i am missing any of jar file, are my procedure which i am following is wrong please let me known if i am wrong ,any solution much appreciated.


my pom.xml is
<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>com.octo.gwt.test17.demo</groupId>
    <artifactId>demo1</artifactId>
    <packaging>war</packaging>
    <version>0.1-SNAPSHOT</version>
    <name>GWT 1.7 Tests Utils Demo Application 1</name>

    <properties>
        <gwt.version>1.7.0</gwt.version>
        <gwt.test.utils.version>0.2</gwt.test.utils.version>
    </properties>

    <dependencies>
   
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
            <version>${gwt.version}</version>
        </dependency>
        <dependency>
            <groupId>com.octo.gwt.test17</groupId>
            <artifactId>gwt-test-utils</artifactId>
            <version>${gwt.test.utils.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>gwt-test-utils-repo</id>
            <url>http://gwt-test-utils.googlecode.com/svn/maven/</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>1.1</version>
                <configuration>
                    <hostedWebapp>target/hostedWebapp</hostedWebapp>
                    <logLevel>INFO</logLevel>
                    <module>com.octo.gwt.test17.demo.demo1.MyApp</module>
                    <runTarget>com.octo.gwt.test17.demo.demo1.MyApp/MyApp.html</runTarget>
                    <style>OBF</style>
                    <extraJvmArgs>-Xmx512m</extraJvmArgs>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generateAsync</id>
                        <goals>
                            <goal>generateAsync</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <jvm>${env.JAVA6_HOME}/bin/java</jvm>
                    <argLine>-javaagent:target/bootstrap.jar</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.octo.gwt.test17</groupId>
                                    <artifactId>gwt-test-utils-bootstrap</artifactId>
                                    <version>${gwt.test.utils.version}</version>
                                    <overWrite>true</overWrite>
                                    <destFileName>bootstrap.jar</destFileName>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.5</version>
            </plugin>
        </plugins>
    </build>
</project>



--
your's truely

suresh babu.g

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment