Hi , this was inspired by the thread at openxdata developer discussion group.
I got through some steps to get the mobile client's code of the
emulator work with a server-side code in development mode.
Here are the chronicles.
1. Set up the mobile code(used 1.2.2 from the branch) as indicated on
the link https://trac.openxdata.org/wiki/MobileSetup
2. define download and upload urls as http://localhost:8888/mpsubmit
3. If using server-side code v1.2, you will want to throw the protocal
jars into the admin project . Put those jars into the folder admin/war/
protocal-jars
4. Run your mobile code through ant's tasks as outlined in the link in
step #1.
5. Run the server-side with mvn gwt:run, ofcourse from the admin
project on commandline.
Given the above steps, I pulled a list of studies on the emulator.
Don't hesitate to get back incase of any problems.
Cheers,
Simon.
Tuesday, 13 September 2011
Saturday, 10 September 2011
A feel of GXT
http://www.extjs.com/examples/explorer.html#overview
The link above gave me a practical exposure to the rich features of GXT. I have used them to develop an internet application.
It has beautiful code snippets.
:)
Simon.
The link above gave me a practical exposure to the rich features of GXT. I have used them to develop an internet application.
It has beautiful code snippets.
:)
Simon.
Wednesday, 31 August 2011
How can I serve ruby and php on same apache machine?
Hi, I was caught up in between issues of deploying a ruby app behind an apache server, while allowing others like PHP to continue running normally. Here is the set of steps that worked for me.
$ sudo passenger-install-apache2-module
-make a directory /var/www/mywebsites/
-throw the ruby app into /var/www/mywebsites/
eg scp -r cce /var/www/mywebsites/
-create a symbolic link to /var/www/mywebsites/cce/public
e.g ln -s /var/www/mywebsites/cce/public /var/www/cce
-Configure vHosts as follows
<VirtualHost *:80>
# Normal virtual host info
ServerName localhost
#ServerAlias *.seanbehan.com
DocumentRoot /var/www/
<Directory /var/www>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
Satisfy all
</Directory>
RailsBaseURI /cce
<Directory /var/www/cce>
Options Indexes Multiviews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
-------------------------------
We are done. Run http://localhost/cce and the app loads seamlessly.
Have fun!
Simon.
-Ensure Phusion Passenger is installed and configured in apache.If you don't have them, run these two commands to install passenger and configure it automatically$ sudo gem install passenger
$ sudo passenger-install-apache2-module
-make a directory /var/www/mywebsites/
-throw the ruby app into /var/www/mywebsites/
eg scp -r cce /var/www/mywebsites/
-create a symbolic link to /var/www/mywebsites/cce/public
e.g ln -s /var/www/mywebsites/cce/public /var/www/cce
-Configure vHosts as follows
<VirtualHost *:80>
# Normal virtual host info
ServerName localhost
#ServerAlias *.seanbehan.com
DocumentRoot /var/www/
<Directory /var/www>
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
Satisfy all
</Directory>
RailsBaseURI /cce
<Directory /var/www/cce>
Options Indexes Multiviews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
-------------------------------
We are done. Run http://localhost/cce and the app loads seamlessly.
Have fun!
Simon.
Friday, 1 July 2011
Useful Links
http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Plugin+inside+Eclipse
Job asked me to help myself with the above link in order to get a "job" done.
Thanks,
Simon.
Job asked me to help myself with the above link in order to get a "job" done.
Thanks,
Simon.
Monday, 27 June 2011
Context Initialization failed, OXD version 1.2
I get this error below. I have visited http://techieth8s.blogspot. com/2011/04/unable-to-locate- spring.html, so I added the would-be missing jars to the classpath/maven repo. The error persists.
Will be happy to get some pointers.
ERROR - ContextLoader.
Will be happy to get some pointers.
ERROR - ContextLoader.
initWebApplicationContext(214) |2011-06-26 20:48:43,197| Context initialization failed
org.springframework.beans.factory.parsing. BeanDefinitionParsingException : Configuration problem: Failed to import bean definitions from relative location [openxdata-server- applicationContext-security. xml]
Offending resource: class path resource [openxdata-applicationContext.xml]; nested exception is org.springframework.beans. factory.parsing. BeanDefinitionParsingException : Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework. org/schema/security]
Offending resource: class path resource [openxdata-server-applicationContext-security. xml]
at org.springframework.beans.factory.parsing. FailFastProblemReporter.error( FailFastProblemReporter.java: 68)
at org.springframework.beans.factory.parsing.ReaderContext. error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext. error(ReaderContext.java:76)
at org.springframework.beans.factory.xml. DefaultBeanDefinitionDocumentR eader. importBeanDefinitionResource( DefaultBeanDefinitionDocumentR eader.java:201)
at org.springframework.beans.factory.xml. DefaultBeanDefinitionDocumentR eader.parseDefaultElement( DefaultBeanDefinitionDocumentR eader.java:147)
at org.springframework.beans.factory.xml. DefaultBeanDefinitionDocumentR eader.parseBeanDefinitions( DefaultBeanDefinitionDocumentR eader.java:132)
at org.springframework.beans.factory.xml. DefaultBeanDefinitionDocumentR eader.registerBeanDefinitions( DefaultBeanDefinitionDocumentR eader.java:92)
at org.springframework.beans.factory.xml. XmlBeanDefinitionReader. registerBeanDefinitions( XmlBeanDefinitionReader.java: 489)
at org.springframework.beans.factory.xml. XmlBeanDefinitionReader. doLoadBeanDefinitions( XmlBeanDefinitionReader.java: 384)
at org.springframework.beans.factory.xml. XmlBeanDefinitionReader. loadBeanDefinitions( XmlBeanDefinitionReader.java: 328)
at org.springframework.beans.factory.xml. XmlBeanDefinitionReader. loadBeanDefinitions( XmlBeanDefinitionReader.java: 296)
at org.springframework.beans.factory.support. AbstractBeanDefinitionReader. loadBeanDefinitions( AbstractBeanDefinitionReader. java:143)
at org.springframework.beans.factory.support. AbstractBeanDefinitionReader. loadBeanDefinitions( AbstractBeanDefinitionReader. java:178)
at org.springframework.beans.factory.support. AbstractBeanDefinitionReader. loadBeanDefinitions( AbstractBeanDefinitionReader. java:149)
at org.springframework.web.context.support. XmlWebApplicationContext. loadBeanDefinitions( XmlWebApplicationContext.java: 124)
at org.springframework.web.context.support. XmlWebApplicationContext. loadBeanDefinitions( XmlWebApplicationContext.java: 92)
at org.springframework.context.support. AbstractRefreshableApplication Context.refreshBeanFactory( AbstractRefreshableApplication Context.java:123)
at org.springframework.context.support. AbstractApplicationContext. obtainFreshBeanFactory( AbstractApplicationContext. java:423)
at org.springframework.context.support. AbstractApplicationContext. refresh( AbstractApplicationContext. java:353)
at org.springframework.web.context.ContextLoader. createWebApplicationContext( ContextLoader.java:254)
at org.springframework.web.context.ContextLoader. initWebApplicationContext( ContextLoader.java:198)
at org.springframework.web.context.ContextLoaderListener. contextInitialized( ContextLoaderListener.java:45)
at org.mortbay.jetty.handler.ContextHandler.startContext( ContextHandler.java:543)
at org.mortbay.jetty.servlet.Context.startContext(Context. java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext( WebAppContext.java:1220)
at org.mortbay.jetty.handler.ContextHandler.doStart( ContextHandler.java:513)
at org.mortbay.jetty.webapp.WebAppContext.doStart( WebAppContext.java:448)
at com.google.gwt.dev.shell.jetty.JettyLauncher$ WebAppContextWithReload. doStart(JettyLauncher.java: 447)
at org.mortbay.component.AbstractLifeCycle.start( AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart( HandlerWrapper.java:130)
at org.mortbay.jetty.handler.RequestLogHandler.doStart( RequestLogHandler.java:115)
at org.mortbay.component.AbstractLifeCycle.start( AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart( HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start( AbstractLifeCycle.java:39)
at com.google.gwt.dev.shell.jetty.JettyLauncher.start( JettyLauncher.java:543)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java: 421)
at com.google.gwt.dev.DevModeBase.startUp( DevModeBase.java:1035)
at com.google.gwt.dev.DevModeBase.run(DevModeBase. java:783)
at com.google.gwt.dev.DevMode.main(DevMode.java:275)
Copying a VirtualBox image to another
Having spent a whole day figuring out how to restore my data, I decided to make use of google. The hard-disk's bootloader was already gone. My work for the Virtual Machine was still intact, thank God! VM in use was VirtualBox. I found Jen3ral's blog helpful. Here is the link . Incase you find the link inactive, am pasting his work here.
To copy the image to another computer:I hope you enjoy it!
Once you’ve copied the disk image you need to create a new machine and register that hard disk with VirtualBox on the target host machine:
- Close VirtualBox if it’s running.
- Go to your home folder and enable show hidden files through the View menu.
- Find the .VirtualBox folder, go to the HardDisks folder and copy the .vdi file you want to use. In my case I burned the file to a DVD because we have so many people who will be needing to save this in their home directory.
- Now go to the other host computer you want to use that .vdi file on and open VirtualBox if you’ve never opened it on the new host machine before. This will create the .VirtualBox folder. Then paste it in the same place (user’s home directory -> show hidden files -> .VirtualBox -> HardDisks). You might need to create the HardDisks folder yourself.
- Edit the permissions of the file in order for it to work. All I did was right-click on it after moving the file over and give read & write permissions to the owner, which should have your username there. You can change the permissions to the group and others sections if needed later, but that wasn’t necessary for me.
- From the VirtualBox window click the New button. This will open the New Virtual Machine Wizard.
- VM Name and OS Type – Give it a name and pick the type & version of the virtual machine OS.
- Memory – Just leave it as the default. You can change it later if you notice any problems.
- Virtual Hard Disk – This is where you select the hard disk you copied in to the home directory earlier. So click on existing and when the Virtual Media Manager window comes up choose to Add. It should take you to the correct folder so just select the image file and click open, then select.
- You’re done, it’ll take you back to the main window with the new virtual machine you just created based off the existing image file.
Subscribe to:
Posts (Atom)