I am trying to include test to my company proyect, and I am begining for the web ones because Is relevant now. I am getting this error:
Invalid bean definition with name ‘cuba_web_MBeanExporter’ defined in class path resource [com/haulmont/cuba/web-spring.xml]: Could not resolve placeholder ‘cuba.webContextName’ in value “${cuba.webContextName}.cuba:type=ConfigStorage”; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘cuba.webContextName’ in value “${cuba.webContextName}.cuba:type=ConfigStorage”
It’s looks like a bad configuration on my web-app.properties but I am newb on this company so am I not sure. I have cuba.webContextName = rm-test, but I dont understand what means “${cuba.webContextName}.cuba:type=ConfigStorage” .
I little orientation at least will ne nice, thanks. Greetings.
I can’t edit or I don know how to so, I am writing a new post. I solve part of problem, the thing was i was missing the right route for my web-app.properties on the container. How ever i still stuck on the tests. Now when I try to create a new entiti with factoring according to the documentation I am unable to do it, first I get:
Returning null from public abstract java.lang.Long com.haulmont.cuba.core.sys.NumberIdSequence.createLongId(java.lang.String,java.lang.String)
The question is that I have a lot of properties on this proyect, and the person who was maintening this proyect is not loger here. So can I debug this some how to see wich ones are the properties that are falling, cuze otherwise I can’t take it of. I can use debug so I can se what’s on factory, and is getting the correct entity and is set to NEW, but i see this con metadata.config :
public class webTestContainer extends TestContainer {
public webTestContainer() {
appComponents = Arrays.asList(
"com.haulmont.cuba",
"it.nexbit.cuba.security.forgotpassword",
"org.strangeway.responsive",
"com.haulmont.addon.helium",
"com.haulmont.addon.restapi",
"com.haulmont.charts",
"com.haulmont.addon.globalevents",
"com.haulmont.addon.dashboard");
appPropertiesFiles = Arrays.asList(
// List the files defined in your web.xml
// in appPropertiesConfig context parameter of the web module
"es/properly/pg/web-app.properties",
// Add this file which is located in CUBA and defines some properties
// specifically for test environment. You can replace it with your own
// or add another one in the end.
"com/haulmont/cuba/web/testsupport/test-web-app.properties"
);
}
public static class Common extends webTestContainer {
// A common singleton instance of the test container which is initialized once for all tests
public static final webTestContainer.Common INSTANCE = new webTestContainer.Common();
private static volatile boolean initialized;
private Common() {
}
@Override
public void before() throws Throwable {
if (!initialized) {
super.before();
initialized = true;
}
setupContext();
}
@Override
public void after() {
cleanupContext();
// never stops - do not call super
}
}
}
In my web-app.properties, I have this ones that my be wrong?: