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.
Monday, December 28, 2009
Disabling Firefox Preview in Aptana
Eclipse uses xulrunner to embed mozilla firefox within SWT applications. Unfortunately, xulrunner does not work with 64 bit cocoa (cocoa-x64). I'm trying to do Palm Pre development, so I don't need to preview my html in firefox. In fact, previewing in Safari is probably better anyway since, like the pre browser, it is webkit-based.
To disable Firefox preview, and stop errors like this:
If you want to use xulrunner with eclipse out of the box, you must use eclipse carbon 32-bit. If you want to be a little more adventurous, an aptana bug report claims that xulrunner is a universal binary and runs on carbon and cocoa 32-bit. I haven't tried to verify this.
To disable Firefox preview, and stop errors like this:
(Build 1.2.7.024747) [ERROR] Unable to create Firefox browser controland this:
No more handles (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-xulrunner-cocoa-3624 in java.library.path
no swt-xulrunner-cocoa in java.library.path
Can't load library: /var/folders/Az/Az+0r2ubHtm3wMGMatRuQE+++TI/-Tmp-/swtlib-64/libswt-xulrunner-cocoa-3624.jnilib
Can't load library: /var/folders/Az/Az+0r2ubHtm3wMGMatRuQE+++TI/-Tmp-/swtlib-64/libswt-xulrunner-cocoa.jnilib
)
(Build 1.2.7.024747) [ERROR] (Build 1.2.7.024747) [ERROR] Unable to create Firefox browser controlGo to the
No more handles [Could not detect registered XULRunner to use]
Window->Preferences->Aptana->Editors->HTML->Preview preference page and uncheck Firefox.If you want to use xulrunner with eclipse out of the box, you must use eclipse carbon 32-bit. If you want to be a little more adventurous, an aptana bug report claims that xulrunner is a universal binary and runs on carbon and cocoa 32-bit. I haven't tried to verify this.
Monday, October 5, 2009
XCode Beach Ball Lock Up While Running Unit Tests
I downloaded the iphone unit test calculator example project, iPhoneUnitTests. I followed the included directions, and my XCode locked up with a beach ball. I'm running OS X 10.6 and XCode 3.2. According to this article, there is a problem with XCode's regex parsing of the test completion dates for GMT-5:00. Since I'm in Central Daylight time, I am affected. The simple solution is to switch your time zone to Pacific.
Thursday, April 9, 2009
VmWare Fusion Shared folders in CentOS Guest
I'm working on a personal project that requires RHEL, so I'm using CentOS as a free substitute. Using the default options for RHEL5 on fusion didn't work. Nothing was showing up in /mnt/hgfs, which is where shared host folders should show up. Within the steps of this tutorial, I found the trick. I needed to disable SELinux, which means I needed to manually install CentOS rather than using fusion's easy install option.
Subscribe to:
Posts (Atom)