MIME type is incorrect after using the ClearCase synchronizer
If we look at the ClearCase element type properties in type manager for java_source we get the following:
When we migrate both files using the ClearCase synchronizer we get different MIME types for both files.
File properties for file Aligner.java
File properties for file Aligner9300.java
One file has MIME type application/unknown while the other has text/plain. Is there any reason why these two files should end up with different MIME types after being imported together at the same time? What are the implications if now some or my java files are set to application/unknown?
For background here are some of the settings used on the ClearCase synchronizer and project area:
We followed the instructions from this section of the 4.0.6 documentation: Setting line delimiter handling where you need to modify the process template of the project area. Here’s the before and after XML code.
Before:
<configuration-data id="com.ibm.team.scm.service.projectLineDelimiterHandling">
</configuration-data>
After:
<configuration-data id="com.ibm.team.scm.service.projectLineDelimiterHandling"><projectLineDelimiterHandling projectLineDelimiterHandlingValue="NONE"></projectLineDelimiterHandling>
</configuration-data>
Furthermore, from the ClearCase Synchronized Streams view, we changed some of the ClearCase Provider Properties of the stream from
1. LINE_DELIMITER = LF
2. LINE_DELIMITER_WORKSPACE = PLATFORM
to
1. LINE_DELIMITER = UNSPECIFIED
2. LINE_DELIMITER_WORKSPACE = UNSPECIFIED
The above settings are based on this section of the 4.0.6 documentation: Specifying line termination characters for text files
One answer
Comments
That's the mystery as both files were imported on the same run and ended up with different MIME type and encoding. For those file that have the incorrect MIME Type (i.e. application/unknown). We will try and reproduce. In the mean time, we are able to open those files and work with them in the Java perspective. We can also open them in all editors, do compares, etc.. The only issue we encounter is when we right click on a component, select "Show>Repository Files" and try to open one of the files with the incorrect MIME type. What we get is the following screenshot:
Probably best to get Rational Support involved (if you haven't already done so). Were you able to recreate this problem (perhaps creating a new CC element that is a copy of Algner.java, and importing that). One detail: is this a 2-way sync stream, or an import-only synch stream? I assume you have investigated whether Algner.java has any unusual characteristics when accessed from ClearCase?
Apologies for responding late as I never got alerted despite being subscribed to this post. Yes we do have a PMR but responses have been slow. We did do as you suggested by creating a new VOB that contains those CC elements we're having issues with. The import-only (not two way) was successful and the MIME type was set text/plain as expected. There are no unusual characteristics for that Aligner.java file compared to those that imported correctly.
I would think the best approach would be to use a shell script and the scm command line tool to locate and update files with the wrong MIME type. Since you cannot reproduce the problem, that will of course make it harder for Support to track down. Perhaps once you identify all the files with the wrong MIME type, you might notice some kind of pattern?