You may get in trouble with these tools related to the followin situations:
1. We have some abstract types and substitution groups for various things such as gbeans. I'm not sure how you can supply the complete set of schemas needed to the tool so it can recognize all the possible valid elements. In geronimo, we have a really bad workaround to this where we ignore validation errors (which show up as NPEs or assertion errors) when the validator encounters a concrete type/ substitution element it doesn't recognize.
2. We may be using the same bad workaround to allow you to include a persistence.xml document in your plan and have treated as an alternate gbean definition. I might have fixed this to explicitly allow this element in our plans in the appropriate places, I don't recall.
Also, the geronimo deployer does a lot of xml fixup, namespace substitution, etc to allow you to deploy with plans that are not valid as written. This is how we try to provide support for deployment of older plan schemas. You may want to consider using some of that code in any validation or editor code.
On May 23, 2007, at 5:05 AM, Shiva Kumar H R wrote:
Thanks for the comments Kanchana.
I did a quick search for "tools to validate XML against multiple schema" and I found this interesting: http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#validate
After including XMLBeans' bin directory under 'Path', I tried these:
1) Used 'dayTrader-plan.xml' available from WAS-CE v188.8.131.52 samples and ran
validate <AG-install-dir>\schema\geronimo-application-1.1.xsd e:\dayTrader-plan.xml
and it said,
2) Introduced an error in "dayTrader-plan.xml" (removed <dep:artifactId> element) and ran the above validate command. As expected it threw below errors:
e:\dayTrader-plan.xml NOT valid.
e:\dayTrader-plan.xml:6:7: error: cvc-complex-type.2.4a: Expected element 'artifactId@http://geronimo.apache.org/xml/ns/deployment-1.1 ' instead of 'version@http://geronimo.apache.org/xml/ns/deployment-1.1' here in element moduleId@ http://geronimo.apache.org/xml/ns/deployment-1.1
Is this what you were looking for?
On 5/22/07, Kanchana Welagedara < email@example.com> wrote:
Went through the proposal posted.Also believe Creating or updating of
Geronimo Deployment Plans has always been a tedious and erroneous task
since in geronimo, user has to work on so much of manual editing in
deployment plans.So it's obvious new users find problems and issues when
it comes to correctly creating Geronimo deployment plans.Also user has
no way to verify the deployment plan before the deployment process
starts.Deployment errors are tracked at the level of deployment.How
about a adding a deployment plan validator(setting the xsd in the xml
file and using the schema location) feature in this proposal for the
people who used to create deployment plans manually and can reuse it for
future developments.Because it will take time to come out this proposal
as a product.
On Tue, 2007-05-22 at 10:29 +0530, Shiva Kumar H R wrote:
> As recommended by Hernan, I have moved the proposal wiki page
> (mentioned at the beginning of mail chain) to another space. Please
> use this new link for accessing it:
> - Shiva
> On 5/22/07, Shiva Kumar H R < firstname.lastname@example.org > wrote:
> Great. Thanks for your valuable comments Mark.
> As you suggest a "tool/wizard for auto creating Geronimo
> Deployment Plan by scanning the corresponding Java-EE
> plan/annotation" would fit best within "Admin Console", may be
> as an extension to the Deploy New tool.
> In addition, as you point out, it could also be useful to
> enable Developers to specify Geronimo specific deployment
> information through Annotations (may be as JSR-175 annotations
> instead of XDoclet based Annotations). One our Committers
> 'Sachin Patel' had started one such discussion
> http://email@example.com/msg39760.html . Your feedback here has helped clarify that discussion also.
> Thanks again Mark. User feedbacks have always been Gold Mines.
> Please keep pouring your suggestions and feedback in future.
> If I understand correctly David Jencks, Aaron Mulder, David
> Blevins, Tim McConnell and Others are the experts in Geronimo
> Deployment Plans and Annotations. It would be valuable if they
> too can post their view on this.
> On 5/21/07, Mark Aufdencamp <firstname.lastname@example.org > wrote:
> It's definitely needed! I'm the Architecture/Project
> Manager type with twenty years in the business. I've
> been engaged in re-learning the JEE stack over the
> last six months with Geronimo. I've been befuddled a
> half dozen times in the learning curve by the
> configuration files. This list has helped to resolve
> all of them:)
> I've been using MyEclipse learning materials which are
> all JBoss based. I've been able to use XDoclet to
> generate my ejb-jar.xml. This has been very helpful,
> but I have had to hand translate the open-ejb.jar
> components. This also applies to the geronimo-web.xml
> file. It would have been very helpful to have these
> generated by the XDoclet annotations like the
> available JBoss tags. I would also mention at this
> point that the lack of a global JNDI service created
> an additional learning knock about the container
> specific configuraion files:). Yes, they have to be
> defined n the container config in order to be
> accessed. That's the developer perspective in me.
> Now for the Architect/PM side. I very much believe in
> the seperation of duties, and auditability of
> application/server/network administration. I don't
> believe that I can get my server administrators to
> create a hand crafted deployment plan that would have
> any chance at mashing up with generic code coming from
> my web developer or ejb/database developer! A
> template system that incorporated creation of the
> container specific configuration based on the web.xml
> and ejb-jar.xml would be a valuable tool within the
> server administration tool set. I would expect a tool
> like this to be available within the management
> console in direct proximity to the deploy application
> tool! Setting deployment specific environment values
> falls within this scope as well. In my early J2EE
> experiences with Websphere 3.5, this was I believe a
> component of the server jar deployment wizard.
> My two cents.
> Mark Aufdencamp
> -------- Original Message --------
> Subject: How important is simplifying
> Creation/Updation of Geronimo
> Deployment Plans?
> From: "Shiva Kumar H R" < email@example.com>
> Date: Mon, May 21, 2007 8:38 am
> To: firstname.lastname@example.org
> Creating or updating of Geronimo Deployment
> Plans has always been a tedious and erroneous
> task. As evident from the user mailing list,
> first time users (and sometimes even advanced
> users) have always had some issue or the other
> when it comes to correctly creating Geronimo
> deployment plans.
> I have always wished that Geronimo Development
> Tools (like Geronimo Eclipse Plug-in) provide
> some facility for auto creating or updating
> the Geronimo deployment plans. I have created
> a wiki page summarizing my proposal:
> If this is something of use for you as a
> user/developer, it would be valuable if you
> can take a moment and provide your
> feedback/comment as a reply to this mail. Your
> feedback/comment would help determine the
> needs of User community and would better
> convince the dev-community into taking this
> Also if you have any new proposals please post
> it on the above wiki page.
> - Shiva