GreenPepper Seeds of GreenPepper
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Fixture Factory classpath a.k.a. custom SystemUnderDevelopment  XML
Forum Index -> Support Go to Page: 1, 2 Next 
Author Message
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Hello

Our project need two custom FixtureFactory.
I have already one "historical" FixtureFactory up and running.

I used the "Confluence's Space Registration" page to "Add a new system under test".

I copy-pasted the "System under test Classpaths" section, and changed the "Fixtures Classpaths" section as required.

I then configured a US to run with the NEW SUT, modifying the "Execute For" combo selection of the US's page.

When I run execute, I get the following:
<trace>java.lang.Exception: Error: org/apache/log4j/Logger Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger [...]</trace>
whereas log4j's JAR is declared in the "System under test Classpath".

Moreover, this jar file is present on the file system, and is correctly found when using the original SUT.

I am quite stuck here, because nothing gets written into the webapp log.
How do you suggest I proceed ?
How may I modify log4j.properties to display the classpath used to execute the US (if possible in a separate FileAppender, best would be connected-user specific, because this Tomcat Server is used by 10+ people)?

PS:
Would it be possible to have classpath entries of the SUT sorted by alphabetical order. At this time, they are not even refetched in the same order than you input them.
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

Can you show me the SUT classpath entries ?
Can you show me the Runner classpath entries associated to the SUT ?

I will add an issue for sorting the classpath entries...

Cheers,
Francois D.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

The GPCore Java v. 2.5 Runner classpath entries are:

D:/GreenPepper/tomcat/webapps/confluence/WEB-INF/lib/greenpepper-core-2.5.jar
D:/GreenPepper/tomcat/webapps/confluence/WEB-INF/lib/greenpepper-extensions-java-2.5.jar
D:/GreenPepper/tomcat/webapps/confluence/WEB-INF/lib/xmlrpc-2.0.1.jar
D:/GreenPepper/tomcat/webapps/confluence/WEB-INF/lib/commons-codec-1.3.jar

It has been configured by ahuon (who meanwhile left the project) as defined in that post:
http://www.greenpeppersoftware.com/site/posts/list/712.page


Our NEW SUT classpath (copied from up and running original SUT that is still working) is:

D:/Repository/novalibs/spring-2.5.6/spring-aop.jar
D:/Repository/novalibs/junit/dbunit-2.4.6.jar
D:/Repository/novalibs/swt/org.eclipse.core.commands_3.5.0.I20090525-2000.jar
D:/Repository/novalibs/swt/org.eclipse.jface.databinding_1.3.0.I20090525-2000.jar
D:/Repository/novalibs/aspectj-1.6.2/aspectjrt.jar
D:/Repository/novalibs/hibernate/hibernate-annotations-3.4.0.GA.jar
D:/Repository/novalibs/spring-2.5.6/spring-jdbc.jar
D:/Repository/nova/jars/nova-service-api-main.jar
D:/Repository/novalibs/cglib/cglib-2.2.jar
D:/Repository/nova/jars/nova-admin-module-main.jar
D:/Repository/novalibs/cglib/asm-all-3.2.jar
D:/Repository/novalibs/commons-lang-2.4/commons-lang-2.4.jar
D:/Repository/novalibs/jdbc/oracle-ojdbc14.jar
D:/Repository/nova/jars/nova-service-main.jar
D:/Repository/nova/jars/nova-dao-main.jar
D:/Repository/novalibs/swt/org.eclipse.core.databinding_1.2.0.I20090604-2000.jar
D:/Repository/novalibs/swt/org.eclipse.core.databinding.property_1.2.0.I20090526-2000.jar
D:/Repository/novalibs/antlr-2.7.6/antlr-2.7.6.jar
D:/Repository/novalibs/swt/org.eclipse.core.databinding.observable_1.2.0.I20090604-2000.jar
D:/Repository/novalibs/spring-2.5.6/spring-context.jar
D:/Repository/novalibs/hibernate/hibernate-entitymanager-3.4.0.GA.jar
D:/Repository/novalibs/commons-logging-1.1.1/commons-logging.jar
D:/Repository/novalibs/slf4j/slf4j-api-1.5.8.jar
D:/Repository/nova/jars/nova-service-facade-main.jar
D:/Repository/novalibs/jdbc/hsqldb.jar
D:/Repository/nova/jars/nova-test-integration-main.jar
D:/Repository/novalibs/swt/org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar
D:/Repository/nova/jars/nova-beans-main.jar
D:/Repository/novalibs/hibernate/ejb3-persistence.jar
D:/Repository/novalibs/jdbc/mysql-connector-java-5.1.7-bin.jar
D:/Repository/novalibs/spring-2.5.6/aopalliance.jar
D:/Repository/novalibs/swt/org.eclipse.ui_3.5.0.I20090604-2000.jar
D:/Repository/novalibs/junit/easymock-2.5.2.jar
D:/Repository/novalibs/swt/com.ibm.icu_4.0.1.v20090415.jar
D:/Repository/novalibs/swt/org.eclipse.core.databinding.beans_1.2.0.I20090525-2000.jar
D:/Repository/novalibs/jdbc/postgresql-8.3-604.jdbc4.jar
D:/Repository/novalibs/javassist-3.9.0.GA/javassist-3.9.0.GA.jar
D:/Repository/novalibs/jdbc/h2-1.2.122.jar
D:/Repository/novalibs/hibernate/hibernate-commons-annotations-3.1.0.GA.jar
D:/Repository/novalibs/commons-codec-1.4/commons-codec-1.4.jar
D:/Repository/novalibs/swt/org.eclipse.ui.workbench_3.5.0.I20090603-2000.jar
D:/Repository/nova/jars/nova-importexport-main.jar
D:/Repository/novalibs/apache-log4j-1.2.15/log4j-1.2.15.jar
D:/Repository/novalibs/aspectj-1.6.2/aspectjweaver.jar
D:/Repository/novalibs/hibernate/jta-1.1.jar
D:/Repository/novalibs/junit/junit-4.3.1.jar
D:/Repository/novalibs/xml/dom4j-1.6.1.jar
D:/Repository/novalibs/spring-2.5.6/spring-orm.jar
D:/Repository/novalibs/spring-2.5.6/spring-beans.jar
D:/Repository/novalibs/xml/xstream-1.3.1.jar
D:/Repository/novalibs/opencsv-2.1/opencsv-2.1.jar
D:/Repository/nova/jars/nova-libutils-main.jar
D:/Repository/novalibs/swt/org.eclipse.jface_3.5.0.I20090525-2000.jar
D:/Repository/novalibs/slf4j/slf4j-log4j12.jar
D:/Repository/novalibs/commons-collections-3.2.1/commons-collections-3.2.1.jar
D:/Repository/novalibs/jdbc/postgresql-8.3-604.jdbc3.jar
D:/Repository/novalibs/commons-pool-1.5.2/commons-pool-1.5.2.jar
D:/Repository/novalibs/spring-2.5.6/spring-tx.jar
D:/Repository/nova/jars/nova-libihm-main.jar
D:/Repository/novalibs/swt/org.eclipse.equinox.common_3.5.0.v20090520-1800.jar
D:/Repository/novalibs/hibernate/hibernate-core-3.3.0.SP1.jar
D:/Repository/nova/jars/nova-ihm-main.jar
D:/Repository/novalibs/spring-2.5.6/spring-core.jar
D:/Repository/nova/jars/talend-wrapper-main.jar

The sole thing I changed is the Fixture classpath:

D:/Repository/nova/jars/greenpepper-api-main.jar
D:/Repository/novaconfig

The "main" class is correctly found is the "new" JAR. ClassNotFoundException occurs at the static Logger field's initialization:

private final static Logger LOG = Logger.getLogger(ApiSystemUnderDevelopment.class);


Regards


fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

For the Runner classpath, it will be preferable to not put the jar into the WEB-INF/lib of Confluence - this can cause conflict with the plugin itself. So i will suggest to move the greenpepper-core-2.5.jar, greenpepper-extensions-java-2.5.jar, xmlrpc-2.0.1.jar and commons-codec-1.3.jar into another directory (like D:/Repository/greenpepper/jars)

For the ClassNotFoundException, i just can't figure it out. Does the first SUT is actually triggering Log4J - have you see output in the log file ? Can you verify that the log4j-1.2.15.jar is not corrupted ?

You have commons-logging.jar in the classpath along with Slf4j... I will suggest to replace this jar with the slf4j-jcl-1.5.10.jar.

Another thing to check : the SUT runner, is it actually pointing to the good Runner (or pointing to the default Java runner which does not include all this stuff)

Cheers,
Francois D.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

I am not sure I will be able to change the runner configuration, as I have no spare system to experiment on.

The log4j jar file is not corrupted as it is a binary copy of the one we use in our working copy (automatic deployment by build tool).
Our application use log4j directly, but the dependancies on commons-logging is required by third-party libs.

On DEV Workstation, we use Eclipse Greenpepper plugin and got correct logging under Eclipse's console (via ConsoleAppender).

On the "Greenpepper server" (tomcat + confluence + GP), I did not ever see application logs.
The "D:\GreenPepper\tomcat\logs\atlassian-confluence.log" file gets only filled by trace corresponding to user interactive input, when editing US content.

How may I configure "D:\GreenPepper\tomcat\webapps\confluence\WEB-INF\classes\log4j.properties" to activate trace for US execution ?

Regards
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

The log4j.properties from D:\GreenPepper\tomcat\webapps\confluence\WEB-INF\classes\ is only for Confluence logs...

If i am correct, base on the information you gave me, your log4j.properties should be put in D:/Repository/novaconfig since it is part of the Fixture classpath.

On the Confluence side, if you want to have trace about GreenPepper (not trace from the SUT) you can add this at the end of the file :
Code:
 log4j.category.com.greenpepper=TRACE
 

With this trace, you should see the output of the execution of the Runner. Maybe it will show more information about this exception... but i'm not sure...

Can you confirm that your new SUT configuration is using the proper Runner ?

Cheers,
Francois D.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Did not had the time to work on it today. I will try to setup a new Runner next week.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Hi

I finally managed to setup a second greenpepper instance on a separate machine (mine), mostly consuming time looking for our confluence license key.

I used "greenpepper-trial-2.5-setup.exe", and an one-month eval license for greenpepper.

I logged as admin to the greenpepper plugin configuration page and did the following:

1/ I created two separate Runner with classpath set to the 4 JAR files you told me, each in a separate directory.

Note:
The GP Core Runner still point to "greenpepper-confluence-plugin-2.5-complete.jar" in "tomcat/webapps/confluence/WEB-INF/lib".

2/ I created two SUT and associated with the corresponding Runner.
I set the fixture classpath to our project's jar.

When I greenpepperize and execute a US, I got a similar error to this: http://www.greenpeppersoftware.com/site/posts/list/713.page

So I reduce the SUT classpath to logging libs only and dig the trace out of the log file.

2010-03-01 18:44:36,574 DEBUG [http-8070-1] [greenpepper.util.cmdline.CommandLineExecutor] launchProcess Launching cmd: java -mx252m -cp F:/GreenPepper-nova-config/runner/enova-gui/commons-codec-1.3.jar
;F:/GreenPepper-nova-config/runner/enova-gui/xmlrpc-2.0.1.jar
;F:/GreenPepper-nova-config/runner/enova-gui/greenpepper-extensions-java-2.5.jar
;F:/GreenPepper-nova-config/runner/enova-gui/greenpepper-core-2.5.jar;D:/projets/trunk/e-nova/ant-build/repository/jars/greenpepper-fixture-main.jar;D:/projets/trunk/e-nova/ant-build/repository/greenpepper/novalibs/apache-log4j-1.2.15/log4j-1.2.15.jar
;D:/projets/trunk/e-nova/ant-build/repository/greenpepper/novalibs/slf4j/slf4j-log4j12.jar
;D:/projets/trunk/e-nova/ant-build/repository/greenpepper/novalibs/commons-logging-1.1.1/commons-logging.jar
;D:/projets/trunk/e-nova/ant-build/repository/greenpepper/novalibs/slf4j/slf4j-api-1.5.8.jar; com.greenpepper.runner.Main (US%2001)%20En%20tant%20qu%27utilisateur%20je%20veux%20pouvoir%20choisir%20un%20format%20ePub?implemented=false F:\GreenPepper-Trial\tomcat\temp\GreenPepperTest6712258137004807575.tst -l en -r com.greenpepper.runner.repository.AtlassianRepository;http://vmnov01:8080/confluence/rpc/xmlrpc?handler=greenpepper1&includeStyle=false#eNova;greenpepper;jaunes -f com.pj.enova.fixture.helper.NovaSystemUnderDevelopment --xml --help
2010-03-01 18:44:36,793 DEBUG [http-8070-1] [com.greenpepper.server.GreenPepperServerServiceImpl] runSpecification Runned Specification: (US 01) En tant qu'utilisateur je veux pouvoir choisir un format ePub ON System: Nova SUT

I tried to add "--help" at the end of the command line but got nothing more in log.

What am I doing wrong ?
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

Is the jar containing the class com.pj.enova.fixture.helper.NovaSystemUnderDevelopment is present in the Fixture classpaths ?

Cheers,
Francois D.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Yes.
It's "greenpepper-fixture-main.jar", located just after the Runner CP items in the cmdline
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

Can you rename the page title to not include a ' ?

Cheers,
Francois D.
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

I did a test on a WinXP with a title containing a ' and everything is ok...

Is your class NovaSystemUnderDevelopment have an empty constructor and extends com.greenpepper.systemunderdevelopment.DefaultSystemUnderDevelopment ?

Cheers,
Francois D.
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Yes, I just override
- onStartDoc to add imports
- onEndDoc to perform global teardown

<code>
import com.greenpepper.document.Document;
import com.greenpepper.systemunderdevelopment.DefaultSystemUnderDevelopment;
[...]

public class NovaSystemUnderDevelopment extends DefaultSystemUnderDevelopment {

@Override
public void onStartDocument(Document document) {
AppContext.getFacadeContext(true);
super.addImport("com.pj.enova.ihm.controller");
super.addImport("com.pj.enova.fixture.technical");
}

@Override
public void onEndDocument(Document document) {
AppContext.getFacadeContext(true);
DAOFactory.getSnvPdpLienPositionDAO().deleteAll();
[...]
}
}
</code>
efe4pj


Joined: 17/02/2010 09:59:31
Messages: 45
Offline

Hi

I noticed something strange: whereas I run greenpepper on localhost, the url of the xmlrpc call refers to our server, here vmnov01.

I did not input the test US by hand, actually I imported back the autosave ZIP file generated on our server.

How do I reconfigure the US to point on localhost ?


Regards
fdenommee

[Avatar]
Joined: 25/01/2008 10:23:16
Messages: 587
Offline

Hi,

You will need to change the base url of Confluence (browse to the Administration screens of Confluence, under General Configuration). Change the base url to reflect the location of the server.

After that, you will need to synchronize all the repositories : under the GreenPepper configuration screens, under the Project Management tab, select each registered Space, click the Edit link and then Update link (this will sync the base url you just changed to the GreenPepper repository)

Cheers,
Francois D.
 
Forum Index -> Support Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.6 © JForum Team