[Design of POJO Server] - ServiceDeployer.deploy not seeing deployment errors
by scott.stark@jboss.org
The http://jira.jboss.com/jira/browse/JBAS-4684 issue is due to the ServiceDeployer.deploy method not seeing the deployment error. This is due to the AbstractController.incrementState uninstalling context with errors:
| ...
| finally
| {
| lockWrite();
| if (error != null)
| {
| log.error("Error installing to " + toState.getStateString() + ": " + context.toShortString(), error);
| uninstallContext(context, ControllerState.NOT_INSTALLED, trace);
| errorContexts.put(context.getName(), context);
| context.setError(error);
| return false;
| }
| }
|
AbstractControllerContext.uninstall(ControllerState fromState, ControllerState toState) clears the error state, and the ServiceContext problem is nulled out when the CreateDestroyLifecycleAction.uninstallAction calls getServiceContext:
| public ServiceContext getServiceContext()
| {
| try
| {
| serviceContext.proxy = getServiceProxy();
| }
| catch (Exception ignored)
| {
| }
| serviceContext.setProblem(getError());
| if (getState() == ControllerState.ERROR)
| serviceContext.state = ServiceContext.FAILED;
| return serviceContext;
| }
|
The context after the ServiceDeployer.deploy calls start(context), the context is in a DESTROYED state, but has no problem set:
| ObjectName: jboss.web.deployment:war=/custom-context
| State: DESTROYED
|
Because of this, the MainDeployer.checkComplete call has no information about the failed deployment. If I just fail to null out the ServiceContext.problem then the deployment failure propagates as expected.
However, it seem like we should not be able to transition out of the ERROR state to DESTROYED?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083243#4083243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083243
18 years, 6 months
[Design of JBoss Portal] - Maven Migration Status
by wesleyhales
So I have a working Maven build (minus this problem) with the common module. I have also created the JbossPortal and JbossModules pom ready for all kinds of inheritance fun ;)
The problem I am currently having is that it looks like maven does not allow us to set System Properties for use in the JVM from within a pom.xml file. i.e.
when we set:
| <pathelement location="${build.resources}"/>
|
(in the old ant build.xml)
and use it in ImplodeTestCase as:
| File foo_sarDir = new File(System.getProperty("build.resources") + "/test/implode/foo.sar");
| assertTrue(foo_sarDir.exists());
|
...the system property returns null and the test fails using maven. I also tried setting it via the maven-ant plugin to no avail.
You can read any system property in the pom.xml (see this properties guide) but you cannot write to them via the pom.
This is discussed on the maven mail list here.
The suggested way is to pass a system property in with "mvn install -Dmyprop=whatever" on the command line.
I have 2 possible solutions for this problem, but wanted to get input:
1.) Create a .bat & .sh file to add the parameter (but we still have to dynamically detect the file path to the resources or maybe we could use a relative path)
2.) or use code like this:
| File f = new File("");
| String path = f.getAbsolutePath();
| File foo_sarDir = new File(path + "/target/test-classes/implode/foo.sar");
|
this also occurs in LocaleFormatTestCase and URLNavigatorTestCase
Let me know your thoughts,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083231#4083231
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083231
18 years, 6 months
[Design the new POJO MicroContainer] - docbook build error
by scott.stark@jboss.org
After I introduced some chapter tags to fix the broken formatting of the book, I started seeing this error:
| [INFO] [jdocbook:generate]
| [INFO] building formatting result [/home/svn/JBossMC/jbossmc/docs/gettingstarted/en-US/target/docbook/pdf/gettingstarted.pdf]
| Sep 11, 2007 3:51:33 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
| SEVERE: Couldn't find hyphenation pattern en
| Sep 11, 2007 3:51:34 PM org.apache.fop.layoutmgr.inline.LineLayoutManager$LineBreakingAlgorithm updateData2
| WARNING: Line 1 of a paragraph overflows the available area. (fo:block, location: -1/-1)
| Error at fo:static-content on line 1601 of jar:file:/home/svn/repository.jboss.com/maven2/net/sf/docbook/docbook/1.7...:
| org.apache.fop.fo.ValidationException: Error(-1/-1): fo:page-sequence is not a valid child element of fo:flow.
| [INFO] ------------------------------------------------------------------------
| [ERROR] BUILD ERROR
| [INFO] ------------------------------------------------------------------------
| [INFO] XSLT problem
|
| Embedded error: error performing translation [; SystemID: jar:file:/home/svn/repository.jboss.com/maven2/net/sf/docbook/docbook/1.7...; Line#: 1601; Column#: -1] : org.apache.fop.fo.ValidationException: Error(-1/-1): fo:page-sequence is not a valid child element of fo:flow.
| [INFO] ------------------------------------------------------------------------
| [INFO] For more information, run Maven with the -e switch
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time: 8 seconds
| [INFO] Finished at: Tue Sep 11 15:51:34 PDT 2007
| [INFO] Final Memory: 26M/302M
| [INFO] ------------------------------------------------------------------------
| [starksm@succubus gettingstarted]$
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083209#4083209
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083209
18 years, 6 months