furrybaer

Jul 13, 2011 at 11:13 PM

I am new to Mac so please excuse my stupidity...I downloaded these files to my mac desktop and I thought I installed them per the documentation,but when I try to use "Terminal" to navigate to the folder and run odatagen against our services, all I get is "command not found".  Yet, if I do an "ls", it sees odatagen just fine...here is the command I am running...

 

odatagen /uri=http://ourserver:port/service.svc /out=/Users/myuser/Desktop/Odataproxies

I'm sure I am doing something wrong, but if somebody could help me that would be great.

thanks

Jul 14, 2011 at 2:03 PM

The reason is "odatagen" is not a command that is found in one of the command directories.

Use

echo $PATH
to see the directories where terminal searches for commands.

In order to run a program that is not in your PATH you must supply the path to the program.

/path/to/directory/.../odatagen /uri=http://ourserver:port/service.svc /out=/Users/myuser/Desktop/Odataproxies
or if Terminal's current directory contains odatagen then you can simply use.
./odatagen /uri=http://ourserver:port/service.svc /out=/Users/myuser/Desktop/Odataproxies

Jul 14, 2011 at 4:15 PM

Thank you very much.  I was able to run this command, and it looks like it generates Metadata, but it errors  out before creating the Proxy classes.  I have pasted the error below.  I'm not sure what to do with it.  Do you have any ideas?  Thanks again.

 

Mark

 

null-34159e274c14:MacOSX10.6.sdk baerm$ ./odatagen /metadata=/Users/baerm/Desktop/OdataProxies/CreativeAffairsMetaData.xml /out=/Users/baerm/Desktop/OdataProxies

2011-07-14 09:12:21.667 odatagen[13036:903] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSPathStore2 substringToIndex:]: Range or index out of bounds'*** Call stack at first throw:( 0   CoreFoundation                      0x99af96ca __raiseError + 410 1   libobjc.A.dylib                     0x93d205a9 objc_exception_throw + 56 2   CoreFoundation                      0x99af93f8 +[NSException raise:format:arguments:] + 136 3   CoreFoundation                      0x99af936a +[NSException raise:format:] + 58 4   Foundation                          0x94cabbb4 -[NSString substringToIndex:] + 133 5   odatagen                            0x00002f39 getFileName + 176 6   odatagen                            0x0000387a main + 659 7   odatagen                            0x00001d75 start + 53 8   ???                                 0x00000003 0x0 + 3)Trace/BPT trap

Jul 14, 2011 at 4:27 PM
Edited Jul 14, 2011 at 4:28 PM

Please see issue

http://odataobjc.codeplex.com/workitem/10949

Jul 14, 2011 at 6:12 PM

Thanks Simmons...I tried building the Odatagen project, then navigating to the build folder to run it from there.  I still got the same error message...Thanks for trying to help.  If you have any other ideas, that would be great.

 

thanks again.

 

mark

Jul 14, 2011 at 6:18 PM

Mark,

What is the absolute path of odatagen

Also what is the absolute path of objc_implementation.xsl (in the xcode proj)

Jul 14, 2011 at 6:27 PM
xsl file:
baerm/Desktop/OdataObjc/Framework/src/odatagen

compiled file:
baerm/Desktop/OdataObjc/Framework/bin/OdatagenBinary/MacOSX10.6.sdk

the file I compiled by building the project:
baerm/Library/Developer/Xcode/DerivedData/odatagen-weirdrandomletters/Build/Products/Debug

but under the "Build" folder, there are other folders, FileMaps, Intermediates, LatestTargetBuildLogs, PrecompiledHeaders...I am assuming that my build is in the Products/Debug folder...

Thanks

mark


From: [email removed]
To: [email removed]
Date: Thu, 14 Jul 2011 11:18:28 -0700
Subject: Re: furrybaer [odataobjc:265071]

From: simmons0105
Mark,
What is the absolute path of odatagen
Also what is the absolute path of objc_implementation.xsl (in the xcode proj)
Read the full discussion online.
To add a post to this discussion, reply to this email (odataobjc@discussions.codeplex.com)
To start a new discussion for this project, email odataobjc@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Jul 14, 2011 at 7:20 PM

Ok - you are compiling to a location that odatagen is not expecting.

the 'build' directory must in in the same directory as the objc_imlementation.xsl file (and all other *.xsl files)

   -please note that build has a lowercase 'b'

You should be able to copy the program from

baerm/Desktop/OdataObjc/Framework/bin/OdatagenBinary/MacOSX10.6.sdk/odatagen

to

baerm/Desktop/OdataObjc/Framework/src/odatagen/build/odatagen

 

Please note that 'odatagen' on then end of each path is the actual executable.

Once you do that - the program should run and give you some output.

Jul 15, 2011 at 3:49 PM

Thanks, Simmons...I copied the odatagen executable from the build folder over to the same folder as teh XSL file...Still got the same error.  I'll play with it some more today...Hopefully, I can get there soon.

 

Thanks again.

 

mark

Jul 15, 2011 at 4:09 PM
When you state below 'please not that build has a lowercase 'b'', what does that mean? Am I looking in the code somewhere for this? I'm not sure why that is important here.

thanks

mark


From: [email removed]
To: [email removed]
Date: Thu, 14 Jul 2011 12:20:08 -0700
Subject: Re: furrybaer [odataobjc:265071]

From: simmons0105
Ok - you are compiling to a location that odatagen is not expecting.
the 'build' directory must in in the same directory as the objc_imlementation.xsl file (and all other *.xsl files)
-please note that build has a lowercase 'b'
You should be able to copy the program from
baerm/Desktop/OdataObjc/Framework/bin/OdatagenBinary/MacOSX10.6.sdk/odatagen
to
baerm/Desktop/OdataObjc/Framework/src/odatagen/build/odatagen

Please note that 'odatagen' on then end of each path is the actual executable.
Once you do that - the program should run and give you some output.
Read the full discussion online.
To add a post to this discussion, reply to this email (odataobjc@discussions.codeplex.com)
To start a new discussion for this project, email odataobjc@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com
Jul 15, 2011 at 5:20 PM

Simmons, I found the "build" directory and ran odatagen from there...I was able to generate the Proxy files...Thanks again for your help.

 

mark

Jul 15, 2011 at 8:36 PM

Sorry, one more question.  I have the proxy, but when I try to build, I get about 11 error messages and they have to do with the Libraries I reference from Odata, but I'm not sure how to fix this...Do you have any ideas?

 

http://www.flickr.com/photos/markbaer/5941213110/in/photostream/

 

thanks

 

mark

Jul 15, 2011 at 9:01 PM

Not sure what the problem is ... I think I would need a lot more info to solve that.

I am actually compiling the code myself. The code outputs all the data to the console as it retrieves it. I have large data sets so I cannot afford this inefficiency so I have removed this from the code and I am compiling it with my program.