ModelUtils.getOpenEngSBModelEntries Fails

7 views
Skip to first unread message

Christoph Prybila

unread,
Jul 31, 2012, 5:49:00 AM7/31/12
to openen...@googlegroups.com
Hello,

My XLink Tests failed today without changes since my last successfull built.
When calling getOpenEngSBModelEntries from ModelUtils, with a correct Model, I get

Testcase: testGenerateValidXLinkUrl(org.openengsb.core.common.xlink.XLinkUtilsTest):    Caused an ERROR
org.openengsb.core.common.xlink.ExampleObjectOrientedModel.getOpenEngSBModelEntries()Ljava/util/List;
java.lang.AbstractMethodError: org.openengsb.core.common.xlink.ExampleObjectOrientedModel.getOpenEngSBModelEntries()Ljava/util/List;
    at org.openengsb.core.common.util.ModelUtils.getOpenEngSBModelEntries(ModelUtils.java:51)
    at org.openengsb.core.common.xlink.XLinkUtils.serializeModelObjectToJSON(XLinkUtils.java:181)
    at org.openengsb.core.common.xlink.XLinkUtilsTest.testGenerateValidXLinkUrl(XLinkUtilsTest.java:119)

Next I tried to built the Weaver service and the Weaver tests failed with a similar Exception, I attached the surefire reports.

kr Chris
TEST-org.openengsb.core.weaver.test.model.ManipulationUtilsTest.xml
org.openengsb.core.weaver.test.model.ManipulationUtilsTest.txt

Christoph Gritschenberger

unread,
Jul 31, 2012, 6:00:07 AM7/31/12
to openen...@googlegroups.com
Hi,

is your Model correctly annotated (@Model, @Provide...)?
Are you providing the java-agent argument to your unit-tests?

kind regards,
christoph

Christoph Prybila

unread,
Jul 31, 2012, 6:10:56 AM7/31/12
to openen...@googlegroups.com
The Model is annotated with @Model but not with @Provide since the loading of the Class is mocked in the Junit Test.
I ran the built from the command-line. As far as I know, there is no additional config nessecary when I built the whole thing outside of my IDE.
The same Tests worked two days ago, no merge from upstream has been done since then.

kr Chris

Christoph Gritschenberger

unread,
Jul 31, 2012, 6:17:44 AM7/31/12
to openen...@googlegroups.com
Well we got jenkins working again, so we have new deployed snapshots.
Actually you shouldn't need ModelUtils anymore.
You should be able to cast all Model-classes to OpenEngSBModel and then
call the corresponding method directly.
If you cannot cast it, you're missing the java-agent VM-arg. Look at the
pom of the ekb-component in the section where surefire is configured to
see how it's done.

kind regards,
christoph

Christoph Prybila

unread,
Jul 31, 2012, 6:39:52 AM7/31/12
to openen...@googlegroups.com
But the Weaver built fails too.
Does that mean I have to merge from master?

kr Chris

Christoph Gritschenberger

unread,
Jul 31, 2012, 7:13:26 AM7/31/12
to openen...@googlegroups.com
What do you mean by "the weaver fails".
Do the unit-tests fail? in your IDE or with maven?

kind regards,
christoph

Christoph Prybila

unread,
Jul 31, 2012, 8:35:42 AM7/31/12
to openen...@googlegroups.com
The following maven statement executes successfully
\openengsb-framework\components\weaver\service\ mvn clean install

But the next maven statement fails with the errors attached in my first message.
\openengsb-framework\components\weaver\test\ mvn clean install

My question was, if I have to merge again from master before I implement the Jenkins Modelhandling changes.

kr Chris

Christoph Gritschenberger

unread,
Jul 31, 2012, 8:37:07 AM7/31/12
to openen...@googlegroups.com
Hmm...
That actually should work. What's the error-message again?

kind regards,
christoph

Felix Mayerhuber

unread,
Jul 31, 2012, 8:49:17 AM7/31/12
to openen...@googlegroups.com
Hi,

The ModelUtils in the current master just do the casting and method
calling for you, so it is ok to use them.

Your error is very strange. Everything works for me just fine. What
exactly have you done between the last time the tests run through and now?

Kind regards,
Felix
Reply all
Reply to author
Forward
0 new messages