Replies: 9 - Pages: 1 - Last Post: Nov 3, 2010 5:08 PM Last Post By: KenJackson Threads: [ Previous | Next ]
Posts: 5
Registered: May 20, 2009 12:52:50 PM Type manager "_xml2" failed create_version operation
Posted: May 21, 2010 08:19:14 AM Is there a solution to this?
I routinely check files in and out of our ClearCase dynamic UCM view using commands like this from a cygwin bash shell:cleartool checkin -c "Comment" file.cpp
But I can't checkin VDSP project files, which are XML. (Checking them out is no problem.) For example:cleartool checkin -c "Comment" Project.dpj cleartool: Error: Type manager "_xml2" failed create_version operation.cleartool: Error: Unable to check in "Project.dpj".
I already tried copying and modifying ~/cc-magic/cc.magic and setting MAGIC_PATH to it as recommended in a workaround. No joy. Now what? Any ideas? cleartool -versionClearCase version 7.1.0.00 (Tue Nov 11 00:18:47 EST 2008) (7.1.D081110)@(#) MVFS version 7.1.0.0 (Mon Oct 27 13:15:03 2008)cleartool 7.1.0.0 (Tue Oct 28 02:02:49 2008)db_server 7.1.0.0 (Tue Oct 28 02:45:38 2008) VOB database schema version: 54
Posts: 3
Registered: Dec 17, 2009 12:48:59 AM Re: Type manager "_xml2" failed create_version operation
Posted: May 28, 2010 01:19:40 AM in response to: KenJackson's post Hi,
Please visit below link for the solution,
http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21127954
Regards,
Saravanakumar
Posts: 5
Registered: May 20, 2009 12:52:50 PM Re: Type manager "_xml2" failed create_version operation
Posted: May 28, 2010 01:54:59 PM in response to: learcase's post Hi Saravanakumar,
Thank you for the reply. However that link did not give significantly more information than I gleaned from the one I referenced.
Although it did imply I could solve this by using the cleartool chtype command to change the type of existing project files. But we have lots and lots of XML project files in various VOBs that I might have need to modify at some point. And I'm not an administrator.
Should I request that all our project files be changed to some other type other than _xml2 ? Maybe text_file ? That would not be a trivial effort and there would be some risk. I don't think they would go for it.
This clearly seems like a ClearCase bug.
Am I really the only person on earth using the cygwin environment with ClearCase? Or do others not run into this problem?
Posts: 463
Registered: Apr 08, 2008 11:40:52 PM Re: Type manager "_xml2" failed create_version operation
Posted: May 28, 2010 07:39:49 PM in response to: KenJackson's post The MAGIC_PATH part of the story is somewhat irrelevant (although it should be resolved in the overall scheme of things). Its job is to help ClearCase what type to assign automatically when the element is created. It doesn't actually impact on the create version operation.
If they type was wrong you have to use chtype to change it to the correct type. It seems you have a type using xml2 in this case already. Perhaps xml2 might fail it is not well formed xml? I'm not sure.
You said you do it through the cygwin shell. Do you get the same behavior from the standard windows command line?
Its pretty rare that xml2 will fail to create versions as it stores as binary. Are there any other messages in the logs?
It is a Delphi Project File? Is it a recent version of Delphi? Whilst I would have thought xml2 should handle it, you might also want to be aware of the UTF type managers. It may have some bearing:
http://www.ibm.com/developerworks/rational/library/09/clearcase-unicode-typemanager/index.html
http://www-01.ibm.com/support/docview.wss?uid=swg21389024
Posts: 5
Registered: May 20, 2009 12:52:50 PM Re: Type manager "_xml2" failed create_version operation
Posted: Jun 19, 2010 02:26:36 PM in response to: KenJackson's post Finally! A work-around that's good enough.
I actually use an elaborate bash shell script named ctci which calls cleartool checkin after parameter checking and expanding. I was able to make it call the Windows CMD shell to do the actual cleartool call. This works.
# ... WF="$(cygpath -w "$FILE")" cd "${PWD/\/\/view/V:}" PATH="/cygdrive/c/Program Files/IBM/RationalSDLC/ClearCase/bin:$PATH" export PATH cmd /C cleartool checkin $OPTIONS -c "$COMMENT" "$WF"The script sets the directory to my dynamic view at //view/kjackson... before I get to that point. But CMD refuses to understand UNC directories, so I have to change to the equivalent V: path.
I keep a symbolic link to cleartool.exe in a directory in my bash PATH, but Windows has no notion of symbolic links, so of course CMD doesn't support it. That's why I have to specifically add a path before making the call.
I still consider this a work-around instead of a solution. Something still doesn't work. Apparently it is limited to Cygwin bash shells (or maybe to mintty), but I can check in every other file with no problems. Why does only _xml2 fail? Anybody that understands what is failing is still eagerly invited to respond.
The wonderful people that have made Linux-like Cygwin environment work as well as it does have done an excellent job of working around Windows assumptions, bugs and peculiarities. So it's not clear if Cygwin is failing or if it is simply not working around all Windows (or ClearCase) peculiarities.
Every time I have to use the pathetic CMD, I renew the awe and appreciation I have for GNU bash. It boggles the mind how so many computer users get along without it.
Posts: 401
Registered: Mar 15, 2005 04:40:07 AM Re: Type manager "_xml2" failed create_version operation
Posted: Jun 19, 2010 03:26:03 PM in response to: KenJackson's post Ken Jackson:
> Why does only _xml2 fail?
> Anybody that understands what is failing is still eagerly invited to respond.
It seems like the _xml2 type manager on Windows has a dependency on the Windows path syntax, and this clashes with you use under cygwin.
If it is that, you might want to try my ClearCase::Wrapper::MGi...
It uses ClearCase::Argv and does a lot of conversions before passing commands to the Windows cleartool (in ipc mode), and after getting the results.
I mean that the path your type manager would see would have been converted.
It is a work in progress, and thus not complete, but that's what I am using all the time.
You are not forced to use the extensions.
The documentation as displayed from CPAN suffered an unfortunate effect from a file renaming. The doc seems to be hidden in v 0.21...
Marc
Posts: 417
Registered: Sep 28, 2005 02:20:11 PM Re: Type manager "_xml2" failed create_version operation
Posted: Jun 23, 2010 11:58:36 AM in response to: KenJackson's post Ken,
Unfortunately, the official support policy on "alternate shells" on windows boils down to "we don't support them." Cygwin and MKS both do things a LOT differently than the "standard" shell. And those mechanical differences can cause unexpected behaviors...
If you (or anyone else) want the support policy to change, your best/only bet is to enter an RFE in the RFE community.
Sorry.
=================================================================
Brian Cowan
Advisory Software Engineer
ClearCase Customer Advocacy Group (CAG)
Rational Software
IBM Software Group
550 King St
Littleton, MA 01460
Phone: 1.978.899.9471
Web: http://www.ibm.com/software/rational/support/
Posts: 4
Registered: Sep 10, 2010 04:02:29 AM Re: Type manager "_xml2" failed create_version operation
Posted: Sep 10, 2010 04:16:48 AM in response to: brcowan's post Hi. I'm also facing this kind of problem, but using the standard CMD Windows command line tool.
I have an ANT script that calls several java methods. Those methods are internally creating Runtime Processes , for invoking the cleartool.exe using the CMD /C syntax.
If I lunch my ant script from a windows shell, everything works fine.
My scripts can set an activity , checkout an xml file, make some updates, and checkin the xml file.
However, the problem shows up when using the ant script within a HUDSON Continuous Integration System project.
When running my ant script within Hudson, I end with the famous :
cleartool: Error: Type manager "_xml2" failed create_version operation,
when trying to checkin a xml file.
The only difference when running ant directly from the shell , and running ant from Hudson, is that Hudson also uses a CMD instance to invoke ANT.
So not sure if a CMD command is being called inside another CMD command, and this is causing the problem.
The question is , how to solve it ??
I also don't want to start using chtype , as I don't think this is the right way to solve the issue.
Thanks in advance.
Miguel Cubells
Posts: 4
Registered: Sep 10, 2010 04:02:29 AM Re: Type manager "_xml2" failed create_version operation
Posted: Sep 14, 2010 10:15:10 PM in response to: MaikelNait's post I have solved the issue.
When a new CMD shell is spawn within Hudson to invoke ant / cleartool , the PATH variable is not available by default. Seems clearcase needs the PATH env. variable in order to work properly ( at least for checkin xml files!! ).
So I checked the option -This build is parametized- in Hudson config screen , and created a parameter called PATH with the %PATH% Windows env. var content.
And then everything runs fine.
No more Type manager "_xml2" failed create_version operation
Weird.
Posts: 5
Registered: May 20, 2009 12:52:50 PM Re: Type manager "_xml2" failed create_version operation
Posted: Nov 03, 2010 05:08:18 PM in response to: MaikelNait's post MaikelNait, you're a genius!
My workaround I have posted above works, but apparently the reason it works is not because I'm using the (lousy) CMD shell, but because I added the clearcase path to the PATH variable, just like you did.
When I add the path, it works even with Bash. CMD is not needed!
Solved.
Use the search field to find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that you're viewing.
Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing.MoreLess
No comments:
Post a Comment