grails app layout horking on bootstrap-responsive.css - grails

I have a simple Grails application. I did not author the front end, only the business logic layer.
I checked out all the source from SVN and the app starts, but I cannot load the main url. It errors out with the messages below. I have tried refreshing dependencies, but to no avail.
I have spelunked every file I could think of to try to fix this. What gets my attention is the FORWARD slash in front of the css, while the other delimiters in the path are backslashes.
Does anyone have any idea where this is going wrong and how to fix it? Maybe the front end developer needs to check something in?
Error 2013-07-31 13:50:24,036 [http-bio-8080-exec-4] ERROR [/MyClientAppName].[grails-errorhandler] - Servlet.service() for servlet grails-errorhandler threw exception
Message: Error applying layout : main
Line | Method
->> 1110 | runWorker in \grails-app\views\layouts\main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 603 | run in ''
^ 722 | run . . . in ''
Caused by GroovyPagesException: Error processing GroovyPageView: Error executing tag <r:layoutResources>: Module [bootstrap] depends on resource [/css\bootstrap\bootstrap-responsive.css] but the file cannot be found
->> 464 | runWorker in \grails-app\views\layouts\main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Error executing tag <r:layoutResources>: Module [bootstrap] depends on resource [/css\bootstrap\bootstrap-responsive.css] but the file cannot be found
->> 8 | doCall in C:/workspaces/GGTS1/MyClientAppName/grails-app/views/layouts/main.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by IllegalArgumentException: Module [bootstrap] depends on resource [/css\bootstrap\bootstrap-responsive.css] but the file cannot be found
->

Related

How to call an iOS method of an argument of a method in a Frida Trace handler?

I am currently trying to log packets between some game client and server.
And I have this question.
I do this:
onEnter(log, args, state) {
console.log(ObjC.Object(args[0]).$super.$ownMethods.join('\n'))
console.log(ObjC.Object(args[0]).
$super.setHost(ObjC.classes.NSString.stringWithUTF8String_(
Memory.allocUtf8String('192.168.1.69'))))
}
And get this output:
- Close
- IsConnected
- IsConnecting
- portSSL
- setPortSSL:
- Open
- getCurrentPort
- server_name
- setServer_name:
- OnConnected
- getPassphraseForP12
- Open:
- addSSLProperties
- Close:ssl:
- findNewMessage
- onAllDataSended
- setLastStreamError:
- setLastStreamErrorTime:
- lastStreamError
- lastConnectionTime
- lastStreamErrorTime
- onNewMessage:
- SendMessageString:
- clearAllOutData
- setLastConnectionTime:
- stream:handleEvent:
- setHost:
- setPort:
- .cxx_destruct
- setDelegate:
- delegate
- host
- port
{'type': 'error', 'description': 'TypeError: not a function', 'stack': 'TypeError: not a function\n at onEnter (<input>:24)\n at call (native)\n at invokeNativeHandler (agent.ts:308)\n at onEnter (agent.ts:273)', 'fileName': '<input>', 'lineNumber': 24, 'columnNumber': 1}
As you can see, there is method called setHost, but I can't call it. Why? How do I call it?
The problem solved by calling ObjC.Object(args[0])['setHost:'](...) - the colon.
Noticed it when looked through method names from frida-trace output.

Using browsersync with docker (laradock)

I'm running into a problem with running browsersync via Gulp inside a docker container. I'm using Laradock.
I tried to extrapolate from this answer: Browsersync within a Docker container, but I'm only able to get the UI to show on port 3001.
It's unclear to me what I should have for proxy. I've tried many combinations such as:
function browserSync(done) {
browsersync.init({
proxy: 'workspace:22', notify:false, open:false
});
done();
}
// -----------------
function browserSync(done) {
browsersync.init({
proxy: 'workspace:3000', notify:false, open:false
});
done();
}
// ---------------
function browserSync(done) {
browsersync.init({
proxy: 'localhost', notify:false, open:false
});
done();
}
I've added 3000 and 3001 to docker-compose.yml under my workspace service
### Workspace Utilities ##################################
workspace:
build:
context: ./workspace
args:
- LARADOCK_PHP_VERSION=${PHP_VERSION}
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SSH2=${WORKSPACE_INSTALL_SSH2}
- INSTALL_GMP=${WORKSPACE_INSTALL_GMP}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_XSL=${WORKSPACE_INSTALL_XSL}
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
- INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP}
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
- INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP}
- INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
- INSTALL_NPM_ANGULAR_CLI=${WORKSPACE_INSTALL_NPM_ANGULAR_CLI}
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
- INSTALL_WP_CLI=${WORKSPACE_INSTALL_WP_CLI}
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
- INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER}
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
- INSTALL_PRESTISSIMO=${WORKSPACE_INSTALL_PRESTISSIMO}
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
- INSTALL_MC=${WORKSPACE_INSTALL_MC}
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
- INSTALL_TERRAFORM=${WORKSPACE_INSTALL_TERRAFORM}
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
- INSTALL_PHALCON=${WORKSPACE_INSTALL_PHALCON}
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
- DRUSH_VERSION=${WORKSPACE_DRUSH_VERSION}
- TZ=${WORKSPACE_TIMEZONE}
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
ports:
- "${WORKSPACE_SSH_PORT}:22"
- "3000:3000"
- "3001:3001"
tty: true
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2375
networks:
- frontend
- backend
links:
- docker-in-docke
I'm running apache on port 80, so my app can be seen at http://localhost
I'm able to access the UI at localhost:3001, but can't access localhost:3000.

Grails oracle database cannot add new

I'm working on grails 2.4.5.
I connect my project to oracle 11g.
In datasource, I add:
dataSource {
pooled = true
dialect = org.hibernate.dialect.Oracle10gDialect
driverClassName = 'oracle.jdbc.OracleDriver'
username = 'grails' // YOUR USERNAME AND PASS
password = 'grails'
url = 'jdbc:oracle:thin:localhost:1521:orcl'
dbCreate = 'update'
}
Then it connects and when I create new domain, new table in db creates.
However when I add new:
new Book(name:'The Strain').save(flush:true)
Then errors appear:
2015-07-29 17:10:30,036 [Thread-10] ERROR plugins.AbstractGrailsPluginManager - Plugin [controllers:2.4.5] could not reload changes to file [C:\Users\Thuc Tran\IdeaProjects\EmailTutorial\grails-app\controllers\emailtutorial\PlaceController.groovy]: Cannot invoke method getPropertyValue() on null object
Message: Cannot invoke method getPropertyValue() on null object
Line | Method
->> 120 | configureScaffoldingController in ScaffoldingGrailsPlugin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
^ 105 | doCall in ScaffoldingGrailsPlugin$_closure3
Any solutions will be appreciated. Thanks.
I solved this problem. I post the solution for those who need it.
On oracle, create sequence, eg: BOOK_SEQ on my case. Make sure that on oracle, when you add new record, id will be auto increment.
Then on the domain class, static mapping quote, add:
static mapping = {
id generator:'sequence', params:[sequence:'BOOKS_SEQ']
}
So that's all.
If answer not clear, I feel free to answer.
Thanks.

Dependency injection not working in grails job using mail plugin

I have created a service NotifierService to send emails using grails mail plugin.
class NotifierService {
MailService mailService
def sendWarningEmail(String name, String email, Date blockingDate) {
try {
mailService.sendMail {
to email
from "noreply-myApp#domain.com"
subject "Status message: Warning"
body (view:"/email/warningEmail", model:[
name:name,
blockingDate:blockingDate
])
}
} catch (Exception e) {
e.printStackTrace()
}
}
}
I have created another service ApplicationUtilService in which I am trying to use the NotifierService.
class ApplicationUtilService{
def notifierService
def notifyUser(){
notifierService.sendWarningEmail("User name", "user#domain.com", new Date())
}
}
I am trying to call notifyUser() in a grails job UpdateJob
class UpdateJob{
def applicationUtilService
static triggers = {
// Scehduling parameters
}
def execute(){
applicationUtilityService.notifyUser()
}
}
I get the following error
Error 2014-12-05 12:04:53,550 [quartzScheduler_Worker-1] ERROR listeners.ExceptionPrinterJobListener - Exception occurred in job: Grails Job
Message: java.lang.NullPointerException: Cannot invoke method notifyUser() on null object
Line | Method
->> 111 | execute in grails.plugins.quartz.GrailsJobFactory$GrailsJob
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 202 | run in org.quartz.core.JobRunShell
^ 573 | run . . in org.quartz.simpl.SimpleThreadPool$WorkerThread ...`
It works when I instantiate as
ApplicationUtilService applicationUtilService = new ApplicationUtilService()
instead of using grails dependency injection. Again, the same problem with the notifierService in ApplicationUtilService and fixed by instantiating same as above.
Now, the real problem is with the mailService. The instantiation as above didn't work. How could I resolve it
The Null Pointer is occurring on UpdateJob.applicationUtilService, so it seems like applicationUtilService isn't being injected into UpdateJob correctly. Is UpdateJob in the right package?

could not initialize proxy - no Session, accessing the session object in the filters class

i'm a bit new on the groovy grails technology and i'm having a problem with this one
i looked at this could not initialize proxy - no Session but the application don't get stale too long
I am trying to access the session object on my SecurityFilter placed on the config subfolder. I just wanted to do a check for every request on the controllers to verify if a user has the rights to do such actions.
class SecurityFilters {
def filters = {
userFilterList(controller:"user", action:"list") {
before = {
if (!session.user.accountType.equals("Admin")) {
redirect(uri: "/")
}
}
}
userFilterShow(controller:"user", action:"show") {
before = {
if (!session.user.accountType.equals("Admin")) {
redirect(uri: "/")
}
}
}
userFilterEdit(controller:"user", action:"edit") {
before = {
if (!session.user.accountType.equals("Admin")) {
redirect(uri: "/")
}
}
}
}
}
but I get this error
Message: could not initialize proxy - no Session
Line | Method
->> 6 | doCall in SecurityFilters$_closure1_closure2_closure5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 186 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 636 | run in java.lang.Thread
before I get to this point I placed the user object on the session object right after doing the login instructions but I am not sure what happened that the session object became not available
some of the properties of the user object were not retrieved, so in the login when I put the user object in the on the session, I also had to manually transfer the property that I needed so I could retrieve again for later use
session.user = user //not enough
session.user.accountType = user.accountType
now I was able to retrieve the user object from the session object and get the property that I wanted to get

Resources