Saturday, November 13, 2010
Consolidated VMware VMDKs
I just consolidated a 25GB VMware virtual machine into 10GB by consolidating unused snapshot virtual disks. This vmware faq explains how to do it extremely well.
Tuesday, May 18, 2010
Edited value not of required format!
I'm using the xcode predicate editor to create a core data fetched property, and Apple's developer tools have proved inherently unusable yet again.
For a little back-story, I have some reference data, and my user can mark certain pieces of the reference data as favorites. I cannot store my favorites data in the same NSPersistentStore as my reference data. If I did, I couldn't updated my reference data file without migrating my favorites data out. Thus, I'm splitting my favorites data and reference data into separate NSPersistentStores. According to Apple's CoreData Programming Guide Cross-Store Relationships section I cannot have a relationship that spans two persistent stores. I need to use a fetched property.
Now you're caught up. When you create a fetched property, you have to create a predicate to use to find the entity the fetched property represents. This seems straightforward enough, but I kept getting this cryptic message "Edited value not of required format!" After some googling, I found the answer.
Basically, the editor defaults to expecting a constant value rather than a variable value. To switch to a variable, right-click in the empty space between the text field and the plus/minus buttons. Of course, a drop-down menu would be much better, but I never accused apple of having good tools.
For a little back-story, I have some reference data, and my user can mark certain pieces of the reference data as favorites. I cannot store my favorites data in the same NSPersistentStore as my reference data. If I did, I couldn't updated my reference data file without migrating my favorites data out. Thus, I'm splitting my favorites data and reference data into separate NSPersistentStores. According to Apple's CoreData Programming Guide Cross-Store Relationships section I cannot have a relationship that spans two persistent stores. I need to use a fetched property.
Now you're caught up. When you create a fetched property, you have to create a predicate to use to find the entity the fetched property represents. This seems straightforward enough, but I kept getting this cryptic message "Edited value not of required format!" After some googling, I found the answer.
Basically, the editor defaults to expecting a constant value rather than a variable value. To switch to a variable, right-click in the empty space between the text field and the plus/minus buttons. Of course, a drop-down menu would be much better, but I never accused apple of having good tools.
Monday, April 26, 2010
Bootstrapping Buckminster & Subclipse with P2 Director
On my current project at work, we are changing from using PDE-Build to create our Eclipse RCP product to using Buckminster. I found a very valuable tutorial to get me started, but I kept getting exceptions like these:
The solution is to install subclipse, but doing so within Buckminster is painful because you can only specify a single repository location from the command line. Subclipse has a lot of dependencies that already exist in a default eclipse install, but are missing from buckminster-headless, so I needed to specify multiple repositories.
p2 director to the rescue!
In the tutorial, there is a section on bootstrapping buckminster with p2 director. The tutorial loads just the buckminster command-line application from p2 and then uses the buckminster command-line application to load more features into itself. This is convenient when all features and dependencies exist within a single repository, but as I said above, this is not my situation.
Assuming you are using bash and have p2 director installed, here is the command:
ERROR: Could not instantiate provider org.tigris.subversion.subclipse.core.svnnature for project com.foo.
org.eclipse.team.core.TeamException: Could not instantiate provider org.tigris.subversion.subclipse.core.svnnature for project com.asolutions.soaf.validation.ws.documentation.test.
at org.eclipse.team.core.RepositoryProvider.mapNewProvider(RepositoryProvider.java:165)
at org.eclipse.team.core.RepositoryProvider.mapExistingProvider(RepositoryProvider.java:235)
at org.eclipse.team.core.RepositoryProvider.getProvider(RepositoryProvider.java:507)
at org.eclipse.team.internal.core.TeamHookDispatcher.getProvider(TeamHookDispatcher.java:97)
at org.eclipse.team.internal.core.TeamHookDispatcher.getRuleFactory(TeamHookDispatcher.java:105)
at org.eclipse.core.internal.resources.Rules.factoryFor(Rules.java:92)
at org.eclipse.core.internal.resources.Rules.modifyRule(Rules.java:144)
at org.eclipse.core.internal.resources.Project.touch(Project.java:1191)
at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:115)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:4842)
at org.eclipse.pde.internal.core.PluginModelManager$UpdateClasspathsJob.run(PluginModelManager.java:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
The solution is to install subclipse, but doing so within Buckminster is painful because you can only specify a single repository location from the command line. Subclipse has a lot of dependencies that already exist in a default eclipse install, but are missing from buckminster-headless, so I needed to specify multiple repositories.
p2 director to the rescue!
In the tutorial, there is a section on bootstrapping buckminster with p2 director. The tutorial loads just the buckminster command-line application from p2 and then uses the buckminster command-line application to load more features into itself. This is convenient when all features and dependencies exist within a single repository, but as I said above, this is not my situation.
Assuming you are using bash and have p2 director installed, here is the command:
director/director\
-r http://download.eclipse.org/tools/buckminster/headless-3.6,http://download.eclipse.org/releases/helios/,http://subclipse.tigris.org/update_1.6.x\
-d `pwd`/buckminster-headless-3.6/\
-p Buckminster\
-i org.eclipse.buckminster.cmdline.product\
-i org.eclipse.buckminster.core.headless.feature.feature.group\
-i org.eclipse.buckminster.pde.headless.feature.feature.group\
-i org.tigris.subversion.subclipse.feature.group\
-i org.tigris.subversion.clientadapter.svnkit.feature.feature.group
Thursday, February 4, 2010
5 Questions Response
In response to Ben Lee's Five Questions:
- What are you currently hacking on?
- What are you currently getting better at?
- What do you do when your computer is asleep?
- Describe that ‘big fish’ project that’s been stewing in your brain.
- What are you gonna post about this coming week?
- JAXB, JAX-RS, Google App Engine for a real-time rating app I'm building with Mike Gaffney.
- C/Objective-C. At work, I'm building a locator iPhone app for a fortune 500 company, and I'm running into all kinds of low-level issues that Java abstracts away from me. I can't help but feel like a badass when I see registers in my debugger.
- Hurling, play with my wife and son.
- In conjunction with #1, I'm building a real-time rating web service in preparation for a hackfest for my local mobile development group.
- Probably nothing. I usually just use this blog as a public place to store answers to annoying technical problems. Entries should probably be cross-posted on stackoverflow as questions/answers.
Subscribe to:
Posts (Atom)