Menu

Fail to load test code because java2html jar is missing. de.java2html.javasource.JavaSourceParser

Help
Gal
2013-09-02
2018-04-22
  • Gal

    Gal - 2013-09-02

    Hi,

    I have this msgs when running from eclipse :

    Sep 02, 2013 10:13:26 AM jsystem.framework.JSystemProperties initLogger
    INFO: Logger was init

    Test: XXX

    (1)Steps in test: bgpTests.bgpSanity1 :
    Sep 02, 2013 10:13:27 AM jsystem.framework.report.RunnerListenersManager addTestInfo
    WARNING: Fail to load test code because java2html jar is missing. de.java2html.javasource.JavaSourceParser
    Sep 02, 2013 10:13:27 AM junit.framework.SystemTestCaseImpl jsystemTestPreExecution
    INFO: Running test: bgpSanity1


    I've been flowing some old threads about this issue here in this forum,
    And I understood that java2html.jar should be updated manually (license issues), but couldn't figure out which version to use, the link that was suggested is broken : http://trac.jsystemtest.org/browser/jsystemFramework/trunk/thirdparty/lib .

    In other thread I saw that V4.1 solve the problem while V4.2 was not, but I couldn't put my had on the correct jar file. (http://www.java2html.com/download.html)

    Can someone please point me to the location of the correct j2h.jar version , and if adding it to the class path should do the work?

    Thanks,
    Gal.

     
  • Itai Agmon

    Itai Agmon - 2013-09-08

    Hi Gal.

    Until I would add it to JSystem new site, you can just download it from here.

    Just add it to the thirdparty/commonLib folder and restart the runner. That should do the trick.

     
  • Gal

    Gal - 2013-09-22

    Thanks,
    Gal.

     
  • Gal

    Gal - 2013-11-10

    Itay Hi,
    It works for me when running through eclipse , runner GUI , and runScenarion.
    But when I'm running maven plugin (through jenkins), it won't see the java2html.
    what do I need to do for "running with maven plugin" will use java2html ?
    Gal.

     
  • Itai Agmon

    Itai Agmon - 2013-11-11

    Since the plugin is not using the runner nor the runner dependencies, try to add the java2html.jar to the project's lib folder.
    I haven't tried it but I think it should work.

     
    • Gal

      Gal - 2013-11-14

      I'm afraid it doesn't work.

      It's in tests-project/lib/ and in the project build path,
      That's why running from eclipse ( right click -> run as-> junit test) , works fine with the java2html.

      Shouldn't maven "build path" (or equivalent) be updated?

      Do you run tests through jenkins -> maven install , and see the html report with the "test code" link working ?

      Gal.

       
  • Zahi (Zack) Zilberman

    Hi Gal,

    If I remember correctly, You can add the jar to the class path of the environment, it may get the work done :)

     
  • Itai Agmon

    Itai Agmon - 2013-12-03

    I think that you would have to add the html2java dependency to the POM file as an artifact. Unfortunately, I think that the exact version that JSystem needs doe's not exist in the central Maven repository.
    One way to overcome this problem, is to refer to it from the file system. The POM should look something like:

    <dependency>
      <groupId>java2html</groupId>
      <artifactId>java2html</artifactId>
      <version>1.0.0</version>
      <scope>system</scope>
      <systemPath>${basedir}/lib/java2html.jar</systemPath>
    </dependency>
    
     
    • Gal

      Gal - 2013-12-10

      Working fine now.
      Thanks,
      Gal.

       
  • Nir Ben Yair

    Nir Ben Yair - 2018-04-22

    You should also exclude it from clean.
    E.g. -

    <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                    <executions>
                        <execution>
                            <id>auto-clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                            <configuration>
                                <filesets>
                                    <fileset>
                                        <directory>lib</directory>
                                        <includes>
                                            <include>**/*.*</include>
                                        </includes>
                                        <excludes>
                                            <exclude>java2html.jar</exclude>
                                        </excludes>
                                    </fileset>
                                </filesets>
                                <failOnError>false</failOnError>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
    
     

    Last edit: Nir Ben Yair 2018-04-22

Log in to post a comment.