You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Lin Sun (JIRA)" <ji...@apache.org> on 2006/12/06 20:51:23 UTC

[jira] Created: (GERONIMODEVTOOLS-119) import simple hello.war results xml-fragment tag in geronimo-web.xml

import simple hello.war results xml-fragment tag in geronimo-web.xml
--------------------------------------------------------------------

                 Key: GERONIMODEVTOOLS-119
                 URL: http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119
             Project: Geronimo-Devtools
          Issue Type: Bug
          Components: eclipse-plugin
    Affects Versions: 1.2.0
         Environment: patched created with latest trunk 480183
            Reporter: Lin Sun


Tried to import a simple hello war file however after import the geronimo-web.xml file contains xml-fragment tag which prevents the hello project from being deployed to server. tried to print out the following var plan in ImportDeploymentPlanOperation.java

plan = runtime.fixGeronimoWebSchema(planFile);
System.out.println("plan 1: " + plan.toString());

Here's the printout:
plan 1: <xml-fragment xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>samples</sys:groupId>
      <sys:artifactId>cviewer</sys:artifactId>
      <sys:version>1.1</sys:version>
      <sys:type>war</sys:type>
    </sys:moduleId>
    <sys:dependencies/>
    <sys:hidden-classes/>
    <sys:non-overridable-classes/>
  </sys:environment>
  <web:context-root>/cviewer</web:context-root>
</xml-fragment>

Note this is not a valid plan.

I updated the following method in org.apache.geronimo.st.v11.core.GeronimoRuntime and it is working now (for war file).

public XmlObject fixGeronimoWebSchema(IFile plan) throws XmlException {
        XmlObject xmlplan = getXmlObject(plan);
        if (plan != null) {
            SchemaConversionUtils.fixGeronimoSchema(xmlplan, GerWebAppDocument.type.getDocumentElementName(),
                    GerWebAppType.type);
            save(xmlplan, plan);
            return xmlplan;
        }
        return null;
//return SchemaConversionUtils.fixGeronimoSchema(getXmlObject(plan), GerWebAppDocument.type.getDocumentElementName(), GerWebAppType.type);
}

Also added the save method back from 1.0 to org.apache.geronimo.st.v11.core.GeronimoRuntime:

private void save(XmlObject object, IFile file) {
try {
object.save(file.getLocation().toFile());
file.refreshLocal(IFile.DEPTH_ONE, null);
} catch (IOException e) {
e.printStackTrace();
} catch (CoreException e) {
e.printStackTrace();
}
} 

Patch has been tested on importing war projects and worked well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (GERONIMODEVTOOLS-119) import simple hello.war results xml-fragment tag in geronimo-web.xml

Posted by "Sachin Patel (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sachin Patel reassigned GERONIMODEVTOOLS-119:
---------------------------------------------

    Assignee: Sachin Patel

> import simple hello.war results xml-fragment tag in geronimo-web.xml
> --------------------------------------------------------------------
>
>                 Key: GERONIMODEVTOOLS-119
>                 URL: http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119
>             Project: Geronimo-Devtools
>          Issue Type: Bug
>          Components: eclipse-plugin
>    Affects Versions: 1.2.0
>         Environment: patched created with latest trunk 480183
>            Reporter: Lin Sun
>         Assigned To: Sachin Patel
>         Attachments: devtools119.patch
>
>
> Tried to import a simple hello war file however after import the geronimo-web.xml file contains xml-fragment tag which prevents the hello project from being deployed to server. tried to print out the following var plan in ImportDeploymentPlanOperation.java
> plan = runtime.fixGeronimoWebSchema(planFile);
> System.out.println("plan 1: " + plan.toString());
> Here's the printout:
> plan 1: <xml-fragment xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>samples</sys:groupId>
>       <sys:artifactId>cviewer</sys:artifactId>
>       <sys:version>1.1</sys:version>
>       <sys:type>war</sys:type>
>     </sys:moduleId>
>     <sys:dependencies/>
>     <sys:hidden-classes/>
>     <sys:non-overridable-classes/>
>   </sys:environment>
>   <web:context-root>/cviewer</web:context-root>
> </xml-fragment>
> Note this is not a valid plan.
> I updated the following method in org.apache.geronimo.st.v11.core.GeronimoRuntime and it is working now (for war file).
> public XmlObject fixGeronimoWebSchema(IFile plan) throws XmlException {
>         XmlObject xmlplan = getXmlObject(plan);
>         if (plan != null) {
>             SchemaConversionUtils.fixGeronimoSchema(xmlplan, GerWebAppDocument.type.getDocumentElementName(),
>                     GerWebAppType.type);
>             save(xmlplan, plan);
>             return xmlplan;
>         }
>         return null;
> //return SchemaConversionUtils.fixGeronimoSchema(getXmlObject(plan), GerWebAppDocument.type.getDocumentElementName(), GerWebAppType.type);
> }
> Also added the save method back from 1.0 to org.apache.geronimo.st.v11.core.GeronimoRuntime:
> private void save(XmlObject object, IFile file) {
> try {
> object.save(file.getLocation().toFile());
> file.refreshLocal(IFile.DEPTH_ONE, null);
> } catch (IOException e) {
> e.printStackTrace();
> } catch (CoreException e) {
> e.printStackTrace();
> }
> } 
> Patch has been tested on importing war projects and worked well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (GERONIMODEVTOOLS-119) import simple hello.war results xml-fragment tag in geronimo-web.xml

Posted by "Lin Sun (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119?page=all ]

Lin Sun updated GERONIMODEVTOOLS-119:
-------------------------------------

    Attachment: devtools119.patch

> import simple hello.war results xml-fragment tag in geronimo-web.xml
> --------------------------------------------------------------------
>
>                 Key: GERONIMODEVTOOLS-119
>                 URL: http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119
>             Project: Geronimo-Devtools
>          Issue Type: Bug
>          Components: eclipse-plugin
>    Affects Versions: 1.2.0
>         Environment: patched created with latest trunk 480183
>            Reporter: Lin Sun
>         Attachments: devtools119.patch
>
>
> Tried to import a simple hello war file however after import the geronimo-web.xml file contains xml-fragment tag which prevents the hello project from being deployed to server. tried to print out the following var plan in ImportDeploymentPlanOperation.java
> plan = runtime.fixGeronimoWebSchema(planFile);
> System.out.println("plan 1: " + plan.toString());
> Here's the printout:
> plan 1: <xml-fragment xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>samples</sys:groupId>
>       <sys:artifactId>cviewer</sys:artifactId>
>       <sys:version>1.1</sys:version>
>       <sys:type>war</sys:type>
>     </sys:moduleId>
>     <sys:dependencies/>
>     <sys:hidden-classes/>
>     <sys:non-overridable-classes/>
>   </sys:environment>
>   <web:context-root>/cviewer</web:context-root>
> </xml-fragment>
> Note this is not a valid plan.
> I updated the following method in org.apache.geronimo.st.v11.core.GeronimoRuntime and it is working now (for war file).
> public XmlObject fixGeronimoWebSchema(IFile plan) throws XmlException {
>         XmlObject xmlplan = getXmlObject(plan);
>         if (plan != null) {
>             SchemaConversionUtils.fixGeronimoSchema(xmlplan, GerWebAppDocument.type.getDocumentElementName(),
>                     GerWebAppType.type);
>             save(xmlplan, plan);
>             return xmlplan;
>         }
>         return null;
> //return SchemaConversionUtils.fixGeronimoSchema(getXmlObject(plan), GerWebAppDocument.type.getDocumentElementName(), GerWebAppType.type);
> }
> Also added the save method back from 1.0 to org.apache.geronimo.st.v11.core.GeronimoRuntime:
> private void save(XmlObject object, IFile file) {
> try {
> object.save(file.getLocation().toFile());
> file.refreshLocal(IFile.DEPTH_ONE, null);
> } catch (IOException e) {
> e.printStackTrace();
> } catch (CoreException e) {
> e.printStackTrace();
> }
> } 
> Patch has been tested on importing war projects and worked well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (GERONIMODEVTOOLS-119) import simple hello.war results xml-fragment tag in geronimo-web.xml

Posted by "Sachin Patel (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sachin Patel closed GERONIMODEVTOOLS-119.
-----------------------------------------

    Resolution: Fixed

Patch applied thanks!

> import simple hello.war results xml-fragment tag in geronimo-web.xml
> --------------------------------------------------------------------
>
>                 Key: GERONIMODEVTOOLS-119
>                 URL: http://issues.apache.org/jira/browse/GERONIMODEVTOOLS-119
>             Project: Geronimo-Devtools
>          Issue Type: Bug
>          Components: eclipse-plugin
>    Affects Versions: 1.2.0
>         Environment: patched created with latest trunk 480183
>            Reporter: Lin Sun
>         Assigned To: Sachin Patel
>         Attachments: devtools119.patch
>
>
> Tried to import a simple hello war file however after import the geronimo-web.xml file contains xml-fragment tag which prevents the hello project from being deployed to server. tried to print out the following var plan in ImportDeploymentPlanOperation.java
> plan = runtime.fixGeronimoWebSchema(planFile);
> System.out.println("plan 1: " + plan.toString());
> Here's the printout:
> plan 1: <xml-fragment xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>samples</sys:groupId>
>       <sys:artifactId>cviewer</sys:artifactId>
>       <sys:version>1.1</sys:version>
>       <sys:type>war</sys:type>
>     </sys:moduleId>
>     <sys:dependencies/>
>     <sys:hidden-classes/>
>     <sys:non-overridable-classes/>
>   </sys:environment>
>   <web:context-root>/cviewer</web:context-root>
> </xml-fragment>
> Note this is not a valid plan.
> I updated the following method in org.apache.geronimo.st.v11.core.GeronimoRuntime and it is working now (for war file).
> public XmlObject fixGeronimoWebSchema(IFile plan) throws XmlException {
>         XmlObject xmlplan = getXmlObject(plan);
>         if (plan != null) {
>             SchemaConversionUtils.fixGeronimoSchema(xmlplan, GerWebAppDocument.type.getDocumentElementName(),
>                     GerWebAppType.type);
>             save(xmlplan, plan);
>             return xmlplan;
>         }
>         return null;
> //return SchemaConversionUtils.fixGeronimoSchema(getXmlObject(plan), GerWebAppDocument.type.getDocumentElementName(), GerWebAppType.type);
> }
> Also added the save method back from 1.0 to org.apache.geronimo.st.v11.core.GeronimoRuntime:
> private void save(XmlObject object, IFile file) {
> try {
> object.save(file.getLocation().toFile());
> file.refreshLocal(IFile.DEPTH_ONE, null);
> } catch (IOException e) {
> e.printStackTrace();
> } catch (CoreException e) {
> e.printStackTrace();
> }
> } 
> Patch has been tested on importing war projects and worked well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira