osx,grails,osx-yosemite , Error domain class not found


Error domain class not found

Question:

Tag: osx,grails,osx-yosemite

I am able to create app using ($ grails create-app MyDomain) but not able to move forward with $ grails generate-all MyDomain.

I made sure that I do have the domain generated with the proper name/spelling (by going physically into the local folder on my machine), all looks ok. The only log I get is the error message that says Error domain class not found ...that's all. I am relatively new to grails. I am following exactly as it instructs in Dzone Refcardz for Grails

There are two related questions on SO but they do not have answer for my question.

Domain class not found in grails-app/domain

Grails 3.x: Re-using JPA/Hibernate Domain classes: Domain class not found

The only other doubt I've is: I have two versions of jdk on my osx (yosemite). I have set to use one in my profile. But I am not sure. As per my reading on the web, having two JDKs this shouldn't cause the error with $ grails generate-all MyDomain.

Is there any other avenues I should be looking at to resolve this?


Answer:

I guess that's the typical 'no package provided while creating a domain class' problem. By default, if you omit the package name e.g. if you just create a domain class $ grails create-app MyDomain the MyDomain.groovy file is created under the app-name package i.e. MyApplication.MyDomain.

If that's the case then your $ grails generate-all MyDomain should actually be $ grails generate-all MyApplication.MyDomain.


Related:


Crash when processing `__Atom` class object in Objective C (using Objective C runtime )


objective-c,osx,objective-c-runtime
Hi I'm using this answer to get list of class to automatically build some structure. My code looks like that: NSMutableDictionary *result = [NSMutableDictionary dictionaryWithCapacity: 32]; Class* classes = NULL; int numClasses = objc_getClassList(NULL, 0); if (numClasses > 0 ) { classes = (Class*)malloc(sizeof(Class) * numClasses); numClasses = objc_getClassList(classes, numClasses);...

passing backbone collection to view


grails,backbone.js,handlebars
I'm just starting out with backbone / grails and i've been struggling to figure out how to get everything to work. I'm building a pricing configurator where a user selects a product type from radio group A and radio group B containing the quantity / pricing / discount data will...

Grails 3.0 Searchable plugin


maven,grails
I've tried to use the searchable plugin in grails 3.0, but I am not sure wheather it is compatible or not. I've added compile "org.grails.plugins:searchable" to the dependencies. The build completes but yields a NotSearializableException: > Configuring > 1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ': BUILD SUCCESSFUL...

Display django runserver output from Vagrant guest VM in host Mac notifications?


python,django,osx,notifications,vagrant
I can think of many ways to skin this cat, and Googling hasn't shown an elegant solution either. Does anyone have an easy / elegant way to forward the output from Django's runserver command in a terminal connected to a guest Vagrant VM to the host to display to Mac's...

JSON in Python: encoding issue on OS X, no issue on Windows


python,json,windows,osx,encoding
I have a file log.json that contains one line: {"k":"caf\u00e9"} I run the following code on Windows 7 SP1 x64 Ultimate: import json a = json.load(open('log.json', 'r')) f = open('test.txt', 'w') f.write(a['k']) I don't have any issue. When I run the same code on Max OS X 10.10 x64: Traceback...

Change NSTextField border and BG color while editing


osx,swift,cocoa,nstextfield
I have a NSTextField that uses no border and window background color while it is displayed but I want it to change to have the default border and white BG color when being edited. I know I can change these properties with: nameTextField.bezeled = true nameTextField.backgroundColor = NSColor.textBackgroundColor() What I...

django-admin startproject not working with python3 on OS X


python,django,osx,python-2.7,python-3.x
I have python3 installed with Django 1.8.2 on Mac OS. There is also python 2.7 installed by default with the OS. When trying to run startproject I get - $ django-admin startproject mysite Traceback (most recent call last): File "/usr/local/bin/django-admin", line 7, in <module> from django.core.management import execute_from_command_line ImportError: No...

ffmpeg: wmv files generated on Mac can't be played in Windows


windows,osx,ffmpeg,file-conversion,wmv
On Mac OS X 10.6.8, I converted a animated gif to a video file in wmv (a requested file format) by using ffmpeg -i File.gif -s 400x400 NewFile.wmv The video file played fine using VLC on Mac. The file can't be played on a Windows 7 machine using the Windows...

grails DataSource.groovy refer bean for decoding password


grails
Referring https://jira.grails.org/browse/GRAILS-3620, we need to specify a class with static methods to decode the encrypted password in DataSource config. For passwordEncryptionCodec property, is it possible to refer to a bean defined in resources.xml or any other grails bean definition files? For ex: having a decrypted Properties bean in resoures.xml or...

Grails: Carry forward params on g:actionSubmit is clicked


grails,gsp
How to carry forward the parameters when g:actionSubmit button is clicked? Here is my gsp code: <g:checkBox name="msgCheck" checked="" value="${userInstance.emailId}"></g:checkBox> ... <g:actionSubmit class="update" action="delete" value="Delete" params="${params}"></g:actionSubmit> Here is my controller code: def delete() { try { def user_list = params.msgCheck //deleting the user //successful. redirect(action: "list", params: params) } catch...

Grails JAX-RS Calling a class in src/groovy giving error - Message: No signature of method: is applicable for argument types


grails,groovy,jax-rs
While developing the rest api using jaxrs plugin I need to create some common class which I have created in "src/groovy". Below is the class class ValidateToken { String validate(String token){ println(token) return "test" } //... In resource file(jaxrs) this is what I am doing def instance=ValidateToken.validate("test") This throws error...

Capitalize all files in a directory using Bash


osx,bash,rename
I have a directory called "Theme_1" and I want to capitalize all the filenames starting with "theme". The first letter of every file name is lowercase and I want it to be upcase. I've tried this but all the letters in the filename are upcase, which is not what I...

Login with Facebook option trigger suggest to download an app


android,ios,facebook,osx,login
Yesterday I logged in to Airbnb with my Facebook account on my OSX. Shortly later I got a notification both on my iPhone and computer saying "Airbnb is available to install on your iPhone" My question is, does anyone here know how this was done? Is this a feature available...

Native Code: cannot use typeid with -fno-rtti


c++,osx,gcc,android-ndk,vtk
I'm trying to build native code on android because I want to use VTK for my android tablet. However, I am facing some issues when it comes to building one of the vtk examples. I know this problem has been covered here for an objective c issue but I guess...

ASP.NET vnext overriding status code set in controller. Is this a bug?


osx,asp.net-5,kestrel
I'm building a simple WebApi in asp.net vnext on a Mac. I've followed the example set in this tutorial but I'm having a problem where the response codes I set in my controller methods are being overridden Take this method in my CrudController: [HttpPost] public void Post([FromBody]CrudObject crudObject) { var...

Change the “about this” window on mac app


java,osx,deployment
On Macs, there's a default menu at the top for basic application handling functions: I've made an application using Java for my Grade 10 final project, (and I'm quite convinced that it's better than Microsoft Paint) and I decided to package it. Using Eclipse, I exported it as a Mac...

How to uninstall all python versions and use the default system version of OS X 10.10?


python,osx
I'm looking for a way to cleanly uninstall all versions of python on OS X 10.10 except the default version that followed with the Mac. How do I proceed? Currently I've some weird behaviour. When typing which -a python I get the following output: /Users/harisfawad/anaconda/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/local/bin/python /usr/bin/python Why doesn't...

How do you work with views in MainMenu.xib?


objective-c,xcode,osx,cocoa
I'm coming over from iOS development and I can't figure out this basic thing: if I open MainMenu.xib in Interface Builder and I drag a button onto the main window's view, what class should I connect that button's action to -- the App Delegate? If I want to add a...

pcap_dispatch() always returns 0 on Mac OSX for wifi interface


osx,pcap,libpcap,arp
I have few devices connected to wifi router, but pcap_dispatch() always returns 0 for wifi interface while live capturing on Mac OS X. The same code captures response in case of wired interface. Please clarify if I have missed any flag here.

How to display Apple San Francisco's numbers mono-spaced rather than proportionally?


osx,fonts,apple
I've recently installed El Capitan on OSX, which comes with the new San Franciso font as system font. The apple presentation here https://developer.apple.com/videos/wwdc/2015/?id=804 (Bit of an overview here: http://codemotionapps.com/san-francisco-display-vs-text-compact-vs-normal-a-brief-review/) states that, by default, numbers are displayed proportionally. They do allow to switch to displaying them mono-spaced (at least in their...

How to declare javascript asset in the view to be rendered within the footer using Grails Asset Pipeline


grails,grails-plugin
Since there is no deferred option for: <asset:javascript src="custom_view_script.js"/> What else can be used, outside of resource plugin, to place view specific script right before the closing body tag and without declaring it globally in layout? I do know about: <asset:deferredScripts/> but that only handles on page script and not...

How to get NSTableView to use a custom cell view mixed with preset cell views?


osx,swift,cocoa,nstableview,nstableviewcell
I have a NSTableView configured in Interface Builder which uses several default cell views. However the first column's cell view needs to be created from a custom class. How do I implement NSTableViewDataSource method tableView.viewForTableColumn() so that it creates the default cell views for the remaining columns? Here's my method...

Stuck with creating an event and formatting dates (Swift - EventKit - OS X)


ios,osx,swift,eventkit,ekevent
I have been stuck on trying to hardcode a new event. My difficulty lies especially with the dates and formatting let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = "MM'/dd'/YYYY" var dateString = "07/16/2015" var startDate = dateFormatter.dateFromString(dateString) var endDate = dateFormatter.dateFromString(dateString) var newEvent : EKEvent = EKEvent(eventStore: store) var error : NSError?...

Read plist inside ~/Library/Preferences/


objective-c,xcode,osx
I'm trying to access in ~/Library/Preferences/ but my code doesn't work. NSString *resPath = @"~/Library/Preferences/"; NSError *error = nil; NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:resPath error:&error]; if (!error) { for (NSString * filename in filenames) { NSLog(@"%@", filename); } } Maybe I should ask for some permission.. Any idea?...

How to get CPU utilization in % in terminal (mac)


osx,terminal,cpu
Ive seen the same question asked on linux and windows but not mac (terminal). Can anyone tell me how to get the current processor utilization in %, so an example output would be 40%. Thanks

best way to create a mat from a CIImage?


c++,xcode,osx,opencv,opencv3.0
I am using CIDetector to detect faces, then using OpenCV on the lower half of each face to detect the size of any smiles. I am using the below code to create the cv::mat which OpenCV can perform the detection on, as you can see the image goes through the...

Initializing a xib view as a subview of another NSView


objective-c,osx,cocoa,xib,nib
I'm trying to learn OSX development, and I've created a view in a .xib file, and I'm trying to initialize and then add this view as a subview. I've googled how to do this, and all of the solutions are for iOS and use a call such as MyViewClass* myViewObject...

Mac OSX - Allow for user input in shell script via GUI or Prompt


osx,bash,shell
first time post so please let me know how I could improve.. I created a shell script which requires a person to input their name and then generates a report. The script works as needed when chmod'd into an executable script and run from terminal. But, I would like to...

What's the shortcut to interrupt the kernel in Canopy?


osx,kernel,interrupt,shortcut,canopy
I'm on OSX, using canopy. Does anybody know what the shortcut for interrupting the kernel is? Thanks.

CGDisplayCopyAllDisplayModes leaves out one valid mode


osx,swift,core-graphics
When programmatically working with display modes in OS X (documentation), I've found that the CGDisplayCopyAllDisplayModes leaves out the rightmost option that is presented in System Preferences. A simple utility that prints the size of the current display mode and all available display mode sizes outputs this current size: 1920x1200 available...

Intercepting login calls with Spring-Security-Rest plugin in Grails


rest,grails,spring-security
I am using the spring security rest plugin for Grails to provide a login mechanism for an AngularJS app. Login works fine, but I can't figure out how to intercept login calls, in order to store additional statistics on (invalid/valid) login attempts. As I am quite new to Spring Security...

How to programatically make a key shortcut?


osx,bash,task-switching
I'm not even sure if bash is the most proper way to achieve this but, I need to, programmatically, switch between opened applications on OS X. I'm thinking about doing a bash program to execute "cmd+tab". I'm unable to find this on a regular search, so, perhaps someone can point...

fatal error: limits.h: No such file or directory


xcode,osx,gcc
On OSX, I can't compile simple programs from the command-line when I use an externally-provided compiler (e.g. gcc-4.8). System headers like limits.h cannot be found. Example error messages: fatal error: limits.h: No such file or directory Or: fatal error: stdio.h: No such file or directory and so on. What's wrong?...

grails 3.0.1 scaffolded view does not show domain relationship


grails,scaffolding
I am following the example in the book "Grails a Quick-Start Guide" using Grails 3.0.1 with following domains package com.tekdays class TekEvent { static constraints = { name() city() description maxSize:5000 organizer() venue() startDate() endDate() } String city String name TekUser organizer String venue Date startDate Date endDate String description...

Error when using angular with Grails


angularjs,grails
Here is my index.gsp <!DOCTYPE html> <html ng-app="myApp"> <head> <title>my app</title> </head> <body> <input type="text" data-ng-model="test"/> {{test}} </body> <script src="/js/angular.min.js"></script> </html> When I build an app, There is an error like this, Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=myApp&p1=Error%3A%…20at%20d%20(http%3A%2F%2Flocalhost%3A8000%2Fjs%2Fangular.min.js%3A17%3A381)...

Call to implicitly-deleted copy constructor in LLVM(Porting code from windows to mac)


c++,osx,c++11,compiler-errors,llvm
We are in the process of porting some c++ code from windows to mac and are having issues compiling it with LLVM 6.1 using c++11. We are encountering errors all over the place of "Call to implicitly-deleted copy contructor" Some of these errors are popping up in our code. for...

What is the best way to make sure I am not using any unavailable API's on OSX?


objective-c,xcode,osx,cocoa
I am writing an OSX app in Xcode 6 but want my application to have support for OSX 10.7 and up. Unfortunately Xcode 6 only includes SDK for 10.10 and 10.9. What is the best way to make sure I am not using any unavailable API's that would crash on...

OSX tmux configuration session open file in vim automatically


osx,session,vim,configuration-files,tmux
So I have tmux and vim running in iterm2 on OSX. I have a tmux.conf file that sources a session in ~/.tmux/ called 'left'. I have successfully loaded this session with three panes. Two panes in a left column and a single pane on the right. I have also managed...

Eclipse CDT - No Console Output on OSX


c++,eclipse,osx,terminal,64bit
New to the C++ world and wanted to fiddle around using Eclipse's IDE for C/C++ called CDT. I am on OSX 10.10.2 using eclipse-cpp-luna-SR2-macosx-cocoa-x86_64. Sadly this simple example is not printing anything in the eclipse terminal. #include <iostream> using namespace std; int main() { cout << "Hello World" << endl;...

Groovy - timestamp from minutes


oracle,grails,groovy,timestamp
I have an array or times/values coming back to be in an array like: [0, 60] Which are times in minutes, 0 = 12:00 a.m, 60 = 1:00 a.m. I am wanting to store these in an oracle database as timestamps. How do I convert minutes into timestamps in groovy?...

Grails logging auto inject


grails,logback
I use grails 3.0.2 and logback. How can I use this logger in my code, can I somehow autoinject it, like log.debug() in grails 2.x which was using org.apache.commons.logging.Log?

Set CALayer Gradient Background


objective-c,xcode,osx,cocoa,cocoa-touch
I am trying to add a gradient to a CALayer I have created. I can set the background colour of the CALayer with the following: self.colorLayer = [CALayer layer]; [self.colorLayer setBackgroundColor:color.CGColor]; [self.colorView setWantsLayer:YES]; [self.colorView setLayer:self.colorLayer]; I've looked around with no success (surprisingly I thought this would have been answered many...

Log Grails Pre 3.0 startup time


grails
In Grails 2.x.x is it somehow possible to log the startup time? We are currently trying to optimize the application startup and having the startup time logged would help tremendously.

Restrict input on NSTextField


osx,swift,cocoa,nstextfield
I want to restrict character input on NSTextField, i.e. so that disallowed characters aren't even appearing. Most of what I found about this topic were solutions that only validate after text input finished or using NSFormatter which still allows the character to appear. So far I came up with this...

Render a controller into a String


grails,grails-2.0
I can render a template or a view into a String, but how can I render a controller into a String ? I would like to perform this kind of operation: def myAction = { ... def html = renderToString(controller: 'myController', action: 'myAction', params: [what:'ever']) render modify(html) ... } ...

Run Boot2Docker from bash


osx,bash,docker,boot2docker
I have installed Boot2Docker on my Mac. By clicking on the app icon, a terminal window opens with some bash script running to prepare the docker vm and then you're good to go. My problem is, I want to write a bash script to run the Boot2Docker vm and then...

Use Unix Executable File to Run Shell Script and MPKG File


osx,shell,unix
I have 2 shell scripts and 2 mpkg installer, I am trying to use an unix excitable file to run them all. here is the script I have, but it always has error message "No such file or directory" ? #!/bin/sh # Find the absolute script current path path=$( cd...

unable to resolve class org.apache.commons.net.ftp in grails


grails,apache-commons
I am developing a module in which some file need to be uploaded on a ftp server for that I have added the "commons-net-3.3.jar" in my grails app & while using it import org.apache.commons.net.ftp.FTP import org.apache.commons.net.ftp.FTPClient import org.apache.commons.net.ftp.FTPClientConfig import org.apache.commons.net.ftp.FTPFile import org.apache.commons.net.ftp.FTPReply It is throwing the error unable to resolve...

iOS : pod update (unable to find the utility “xcode-select”)


ios,xcode,osx,xcode6,cocoapods
xI am a new iOS developer. Recently when I ran "pod update" sth just went wrong see the detail in the following: (unable to find the utility "xcode-select") bash-3.2$ pod install Analyzing dependencies sh: line 1: 4936 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find xcode-select 2> /dev/null xcrun: error: unable...

How can I fix “Error: Formulae found in multiple taps”?


php,osx,homebrew,phpredis
I want to install php54-redis. Yu:nginx Yu$ brew install josegonzalez/php/php54-redis ==> Installing php54-redis from josegonzalez/homebrew-php Error: Formulae found in multiple taps: homebrew/php/php54 josegonzalez/php/php54 Please use the fully-qualified name e.g. homebrew/php/php54 to refer the formula. What am I doing wrong and how is thise done properly?...