1

I have a component named MyComponent with the following folder structure in RTC:

/MyProject
/MyProject/TestFile.txt
/MyProject/Folder1
/MyProject/Folder1/loadrules.txt
/MyProject/Folder1/TestFile2.txt

And this is what I have in my loadrules.txt file::

versionableName=/MyProject/TestFile.txt

I've specified the loadrules.txt file in my build definition for this component as the component load rule, but when the build runs, I'm getting the following exception when it tries to fetch the files:

com.ibm.team.repository.common.TeamRepositoryException: Unexpected line "versionableName=/MyProject/TestFile.txt" encountered in build load rules for component "MyComponent"
    at com.ibm.team.filesystem.client.internal.load.LoadRule.getRules(LoadRule.java:176)
    at com.ibm.team.filesystem.client.internal.load.LoadRule.addLoadRules(LoadRule.java:101)
    at com.ibm.team.build.internal.scm.ComponentLoadRules.getLoadRules(ComponentLoadRules.java:134)
    at com.ibm.team.build.internal.engine.JazzScmPreBuildParticipant.preBuild(JazzScmPreBuildParticipant.java:235)
    at com.ibm.team.build.internal.engine.BuildLoop.invokePreBuildParticipants(BuildLoop.java:844)
    at com.ibm.team.build.internal.engine.BuildLoop$2.run(BuildLoop.java:650)
    at java.lang.Thread.run(Thread.java:662)

Any idea what I'm doing wrong? I've tried following the example here but I can't figure why it's not working for me. Regardless of what I put in the loadrules.txt file (nothing/empty string, random garbage text, etc.), I still get this exception for the first line of the file.

This is in RTC 3.0

holic87
  • 791
  • 2
  • 17
  • 29
  • Is this an encoding issue? Did you create the load rule with an scm command (before editing it if needed)? https://jazz.net/help-dev/clm/topic/com.ibm.team.scm.doc/topics/create_loadrules.html?resultof=%22load%20rules%22 – VonC Aug 24 '12 at 21:17
  • @VonC It could be encoding... I just created a text file and added it to the component. Does the load rule file need to be created through the command line tool first? – holic87 Aug 24 '12 at 21:20
  • I mention that as a test to do in order to see if the problem persists when created through scm. – VonC Aug 24 '12 at 21:21
  • @VonC Yep, looks like it was an encoding issue. I just used Notepad++ to recreate the text file and it's working as expected now. If you want to submit your comment as an answer, I'll mark it as accepted. – holic87 Aug 24 '12 at 21:48
  • Good to know. I will still monitor https://jazz.net/forum/questions/86076/what-is-this-exception-for-component-load-rules-file-during-a-build, just in case another explanation is offered ;) – VonC Aug 24 '12 at 21:52

1 Answers1

0

This kind of error is likely to be an encoding issue.

One way to test that is to create the loadrules.txt through the scm command-line interface, as detailed in "Reference > Source control command line reference > scm > create"

 scm create loadrules [options]

The OP holic87 confirms:

I just used Notepad++ to recreate the text file and it's working as expected now.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250