IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 9 replies
  • Latest Post - ‏2013-04-02T16:21:27Z by adbdkb
adbdkb
adbdkb
45 Posts

Pinned topic How do .settings directory and the files get created when importing EAR

‏2013-03-29T13:40:01Z |
When importing an existing EAR into a version of RAD, when does the .settings directory and its xml files get created. Are they based on version of RAD, instead of versions of JavaEE, Dynamic web module etc.? Is there a way to control these to match versions from EAR instead of RAD when importing an EAR file?

Thank you
Updated on 2013-04-02T16:21:27Z at 2013-04-02T16:21:27Z by adbdkb
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T10:16:14Z  
    Hello,
    The following article explains what is the information that is stored in the .settings folder.
    http://www-01.ibm.com/support/docview.wss?uid=swg21313092#Builders%20and%20.settings%20metadata%3A
    To my memory, when you import an EAR you can only choose the target run-time, otherwise there is no way to customize what is written in the .settings folder.
    Can you explain what is the practical scenario that caused this question? Maybe that will help giving a more specific answer.
    Thank you and regards, Lara
  • adbdkb
    adbdkb
    45 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T10:55:35Z  
    Hello,
    The following article explains what is the information that is stored in the .settings folder.
    http://www-01.ibm.com/support/docview.wss?uid=swg21313092#Builders%20and%20.settings%20metadata%3A
    To my memory, when you import an EAR you can only choose the target run-time, otherwise there is no way to customize what is written in the .settings folder.
    Can you explain what is the practical scenario that caused this question? Maybe that will help giving a more specific answer.
    Thank you and regards, Lara
    When I select the target runtime of Websphere 7, I get the error - The selected runtime does not support the version of the archive - even though that EAR has been deployed in our production websphere 7 environment.

    Also, what i observed is that the web.xml exists and is for version 2.5, but the facet.core xml in the .settings is getting created for servlet 3.0 etc. versions.

    Thank you
  • adbdkb
    adbdkb
    45 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T11:15:47Z  
    • adbdkb
    • ‏2013-04-02T10:55:35Z
    When I select the target runtime of Websphere 7, I get the error - The selected runtime does not support the version of the archive - even though that EAR has been deployed in our production websphere 7 environment.

    Also, what i observed is that the web.xml exists and is for version 2.5, but the facet.core xml in the .settings is getting created for servlet 3.0 etc. versions.

    Thank you
    Forgot to mention the practical scenario that you had asked for.

    We have an EAR file which is deployed in production and is running under websphere 7. This EAR also includes source.

    We need to go back to the version of code to the time of the EAR creation, so we tried to import it as an EAR in RAD. We use clearcase as source control, but can't ( or don't know how to ) create a view as of a given date / time. So, we want to use the EAR to get the source code state of that time

    Thanks
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T12:58:16Z  
    • adbdkb
    • ‏2013-04-02T11:15:47Z
    Forgot to mention the practical scenario that you had asked for.

    We have an EAR file which is deployed in production and is running under websphere 7. This EAR also includes source.

    We need to go back to the version of code to the time of the EAR creation, so we tried to import it as an EAR in RAD. We use clearcase as source control, but can't ( or don't know how to ) create a view as of a given date / time. So, we want to use the EAR to get the source code state of that time

    Thanks
    Although a label (or a UCM baseline) is the best way to combine specific versions of source files, it is possible to select a version of a file (or directory) by date/time.

    See the '-time' option clause as documented in 'config_spec' chapter of the command reference (http://publib.boulder.ibm.com/infocenter/cchelp/v8r0m0/topic/com.ibm.rational.clearcase.cc_ref.doc/topics/config_spec.htm)
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T14:52:17Z  
    • adbdkb
    • ‏2013-04-02T11:15:47Z
    Forgot to mention the practical scenario that you had asked for.

    We have an EAR file which is deployed in production and is running under websphere 7. This EAR also includes source.

    We need to go back to the version of code to the time of the EAR creation, so we tried to import it as an EAR in RAD. We use clearcase as source control, but can't ( or don't know how to ) create a view as of a given date / time. So, we want to use the EAR to get the source code state of that time

    Thanks
    Hello,
    What version of RAD are you using? Does you EAR have a deployment descriptor? If yes, what version is it, 5 or 6? Also, do all the modules of the EAR have deployment descriptor? If yes, could you verify they all correspond to the Java EE 5 version or lower?
  • adbdkb
    adbdkb
    45 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T15:47:24Z  
    Hello,
    What version of RAD are you using? Does you EAR have a deployment descriptor? If yes, what version is it, 5 or 6? Also, do all the modules of the EAR have deployment descriptor? If yes, could you verify they all correspond to the Java EE 5 version or lower?
    I am using RAD 8.0.4.2 ifix1 ( not sure on the ifix version part ). Yes the EAR does have the deployment descriptor ( application.xml ) - it is actually 1.4. This application was transitioned from Websphere 6.1 to websphere 7

    <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

    All the modules ( only one ) also have deployment descriptor ( web.xml ) and from what I can see, that is also JavaEE 5 or lower ( Unless my interpretation is wrong and there is some other place I should look ).

    Now, I don't know, why there is a mismatch for the version below, but the application seems to work in production environment
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    Thank you for your help
  • SystemAdmin
    SystemAdmin
    14225 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T16:04:09Z  
    • adbdkb
    • ‏2013-04-02T15:47:24Z
    I am using RAD 8.0.4.2 ifix1 ( not sure on the ifix version part ). Yes the EAR does have the deployment descriptor ( application.xml ) - it is actually 1.4. This application was transitioned from Websphere 6.1 to websphere 7

    <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

    All the modules ( only one ) also have deployment descriptor ( web.xml ) and from what I can see, that is also JavaEE 5 or lower ( Unless my interpretation is wrong and there is some other place I should look ).

    Now, I don't know, why there is a mismatch for the version below, but the application seems to work in production environment
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    Thank you for your help
    Is this the same problem reported in thread http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14972233? If yes, then I will try to contribute to your original question (How do .settings directory and the files get created when importing EAR) and work on the problem when importing the EAR in the other thread.

    In your scenario, the file in .settings that is more important is org.eclipse.wst.common.project.facet.core.xml. As mentioned in the link provided by Lara, this file defines the core j2ee facets, j2ee spec versions, and server runtime, and is created based, among other things, in the contents of the deployment descriptors of your projects and the selected target runtime.
  • adbdkb
    adbdkb
    45 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T16:17:03Z  
    Hello,
    What version of RAD are you using? Does you EAR have a deployment descriptor? If yes, what version is it, 5 or 6? Also, do all the modules of the EAR have deployment descriptor? If yes, could you verify they all correspond to the Java EE 5 version or lower?
    I am using RAD 8.0.4.2 ifix1 ( not sure on the ifix version part ). Yes the EAR does have the deployment descriptor ( application.xml ) - it is actually 1.4. This application was transitioned from Websphere 6.1 to websphere 7

    <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">

    All the modules ( only one ) also have deployment descriptor ( web.xml ) and from what I can see, that is also JavaEE 5 or lower ( Unless my interpretation is wrong and there is some other place I should look ).

    Now, I don't know, why there is a mismatch for the version below, but the application seems to work in production environment
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
    Thank you for your help
  • adbdkb
    adbdkb
    45 Posts

    Re: How do .settings directory and the files get created when importing EAR

    ‏2013-04-02T16:21:27Z  
    Is this the same problem reported in thread http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14972233? If yes, then I will try to contribute to your original question (How do .settings directory and the files get created when importing EAR) and work on the problem when importing the EAR in the other thread.

    In your scenario, the file in .settings that is more important is org.eclipse.wst.common.project.facet.core.xml. As mentioned in the link provided by Lara, this file defines the core j2ee facets, j2ee spec versions, and server runtime, and is created based, among other things, in the contents of the deployment descriptors of your projects and the selected target runtime.
    Yes, it is the same problem.

    The deployment descriptors don't seem to be indicating a later version of JavaEE, but when importing the EAR, the file you mentioned - org.eclipse.wst.common.project.facet.core.xml - seems to take the version levels from somewhere else, unless I am missing something