You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Chi Runhua (JIRA)" <ji...@apache.org> on 2010/05/14 03:57:43 UTC

[jira] Commented: (GERONIMO-4861) Deployment Plan XML Parsing - Not add generated namespace names to closing tags

    [ https://issues.apache.org/jira/browse/GERONIMO-4861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867356#action_12867356 ] 

Chi Runhua commented on GERONIMO-4861:
--------------------------------------

Aa defect of JAXB marshaller as https://issues.apache.org/jira/browse/GERONIMO-4668

> Deployment Plan XML Parsing - Not add generated namespace names to closing tags
> -------------------------------------------------------------------------------
>
>                 Key: GERONIMO-4861
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4861
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: OpenEJB
>    Affects Versions: 2.2
>            Reporter: Quintin Beukes
>            Priority: Minor
>             Fix For: 2.2.1
>
>
> When creating a deployment plan and using more than one namespace, but not implicitly specifying the namespaces in all elements, the namespace names are added to the temporary XML file. Though it doesn't add them correctly. I included my original openejb-jar.xml, the error I get through deploy.sh, and the generated XML file (which I reformatted to make it more readable). 
> You will notice the problem are in the last 2 closing tags of the ns7 (ie. security-2.0) namespace. The ns7 namespace prefix wasn't added to them, and this generates the validator error.
> {code:xml|title=original-openejb-jar.xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
>          xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
>          xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
>          xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>kms</dep:groupId>
>       <dep:artifactId>KMSPlatform-ejb</dep:artifactId>
>       <dep:version>1.0</dep:version>
>       <dep:type>jar</dep:type>
>     </dep:moduleId>
>     <dep:dependencies>
>       <dep:dependency>
>         <dep:groupId>console.dbpool</dep:groupId>
>         <dep:artifactId>jdbc_kmsPool</dep:artifactId>
>         <dep:version>1.0</dep:version>
>         <dep:type>rar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>console.realm</dep:groupId>
>         <dep:artifactId>KMSRealm</dep:artifactId>
>         <dep:version>1.0</dep:version>
>         <dep:type>car</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>org.springframework</dep:groupId>
>         <dep:artifactId>spring-core</dep:artifactId>
>         <dep:version>2.5.6</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>org.springframework</dep:groupId>
>         <dep:artifactId>spring-beans</dep:artifactId>
>         <dep:version>2.5.6</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>org.springframework</dep:groupId>
>         <dep:artifactId>spring-context</dep:artifactId>
>         <dep:version>2.5.6</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>org.slf4j</dep:groupId>
>         <dep:artifactId>slf4j-api</dep:artifactId>
>         <dep:version>1.5.5</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <!-- hibernate follows -->
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>core</dep:artifactId>
>         <dep:version>3.3</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>annotations</dep:artifactId>
>         <dep:version>3.4</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>antlr</dep:artifactId>
>         <dep:version>2.7.6</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>commons-annotations</dep:artifactId>
>         <dep:version>3.4</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>commons-collections</dep:artifactId>
>         <dep:version>3.1</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>dom4j</dep:artifactId>
>         <dep:version>1.6.1</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>entitymanager</dep:artifactId>
>         <dep:version>3.4</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>javassist</dep:artifactId>
>         <dep:version>3.9.0.GA</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>jpa</dep:artifactId>
>         <dep:version>3.0</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>jta</dep:artifactId>
>         <dep:version>1.1</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>       <dep:dependency>
>         <dep:groupId>hibernate</dep:groupId>
>         <dep:artifactId>GeronimoTransactionManager</dep:artifactId>
>         <dep:version>1.0</dep:version>
>         <dep:type>jar</dep:type>
>       </dep:dependency>
>     </dep:dependencies>
>   </dep:environment>
>   <security>
>     <role-mappings>
>       <role role-name="Admin">
>         <principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
>                   name="Admin"/>
>       </role>
>       <role role-name="Standard User">
>         <principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"
>                   name="Standard User"/>
>       </role>
>     </role-mappings>
>   </security>
> </openejb-jar>
> {code}
> {code:title=Deployment Error}
> 2009-09-10 11:43:04,602 ERROR [DeployTool] Error: 
> org.apache.geronimo.common.DeploymentException: Unable to deploy KMSPlatform-ejb.jar: Error parsing geronimo-openejb.xml with xmlbeans.  
> For debug purposes, XML content written to: /opt/kms/server/geronimo-2.2-20090908/var/temp/openejb-jar-1373120338936693638.xml
>         error: </role-mappings> does not close tag <ns7:role-mappings>.
>         </role-mappings> does not close tag <ns7:role-mappings>.
>         at org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:45)
>         at org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:149)
>         at org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:125)
>         at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:168)
>         at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
>         at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>         at org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:31)
> {code}
> {code:xml|title=reformatted /opt/kms/server/geronimo-2.2-20090908/var/temp/openejb-jar-1373120338936693638.xml}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <ns6:ejb-jar xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" 
>     xmlns:ns2="http://geronimo.apache.org/xml/ns/j2ee/application-1.2" 
>     xmlns:ns3="http://geronimo.apache.org/xml/ns/openejb-clustering-wadi-1.2" 
>     xmlns:ns4="http://geronimo.apache.org/xml/ns/naming-1.2" 
>     xmlns:ns5="http://openejb.apache.org/xml/ns/openejb-jar-2.2" 
>     xmlns:ns6="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0" 
>     xmlns:ns7="http://geronimo.apache.org/xml/ns/security-2.0" 
>     xmlns:ns8="http://java.sun.com/xml/ns/persistence" 
>     xmlns:ns9="http://openejb.apache.org/xml/ns/pkgen-2.1">
>   <environment>
>     <moduleId>
>       <groupId>kms</groupId>
>       <artifactId>KMSPlatform-ejb</artifactId>
>       <version>1.0</version>
>       <type>jar</type>
>     </moduleId>
>     <dependencies>
>       <dependency>
>         <groupId>console.dbpool</groupId>
>         <artifactId>jdbc_kmsPool</artifactId>
>         <version>1.0</version>
>         <type>rar</type>
>       </dependency>
>       <dependency>
>         <groupId>console.realm</groupId>
>         <artifactId>KMSRealm</artifactId>
>         <version>1.0</version>
>         <type>car</type>
>       </dependency>
>       <dependency>
>         <groupId>org.springframework</groupId>
>         <artifactId>spring-core</artifactId>
>         <version>2.5.6</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>org.springframework</groupId>
>         <artifactId>spring-beans</artifactId>
>         <version>2.5.6</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>org.springframework</groupId>
>         <artifactId>spring-context</artifactId>
>         <version>2.5.6</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>org.slf4j</groupId>
>         <artifactId>slf4j-api</artifactId>
>         <version>1.5.5</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>core</artifactId>
>         <version>3.3</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>annotations</artifactId>
>         <version>3.4</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>antlr</artifactId>
>         <version>2.7.6</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>commons-annotations</artifactId>
>         <version>3.4</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>commons-collections</artifactId>
>         <version>3.1</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>dom4j</artifactId>
>         <version>1.6.1</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>entitymanager</artifactId>
>         <version>3.4</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>javassist</artifactId>
>         <version>3.9.0.GA</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>jpa</artifactId>
>         <version>3.0</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>jta</artifactId>
>         <version>1.1</version>
>         <type>jar</type>
>       </dependency>
>       <dependency>
>         <groupId>hibernate</groupId>
>         <artifactId>GeronimoTransactionManager</artifactId>
>         <version>1.0</version>
>         <type>jar</type>
>       </dependency>
>     </dependencies>
>   </environment>
>   <ns7:security>
>     <ns7:role-mappings xmlns="http://geronimo.apache.org/xml/ns/security-2.0" 
>     xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" 
>     xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2" 
>     xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0">
>       <sec:role xmlns:ns14="http://geronimo.apache.org/xml/ns/security-2.0" xmlns="" role-name="Admin">
>         <ns14:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="Admin"/>
>       </sec:role>
>       <sec:role xmlns:ns14="http://geronimo.apache.org/xml/ns/security-2.0" xmlns="" role-name="Standard User">
>         <ns14:principal class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal" name="Standard User"/>
>       </sec:role>
>     </role-mappings>
>   </security>
> </ns6:ejb-jar>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.