LinkageError with deployment of play framework 1.2.5 application - playframework-1.x

Play framework 1.2.5 was already setup on an ubuntu 11 server. I stopped the process, ran play clean and then deployed the new app (I have since then ran play clean a few times as well without any luck). I keep getting LinkageErrors and the application is throwing classcast exceptions for objects for different classes. Any suggestions to help pinpoint what's causing the issue and how best to resolve it - thanks in advance.
Oops: LinkageError
An unexpected error occured caused by exception LinkageError: loader (instance of play/classloading/ApplicationClassloader): attempted duplicate class definition for name: "models/testModel/TestClass"
Reference to play framework is still set up in the system path. I am using "play start" to run the application.

Try using Prod mode in application.conf and check if you receive more verbose error messages during pre-compilation. Also, replacing your deployment or even the play directory might help (though that did not resolve the issue in my case). Hope it helps.

Related

Calabash how to speed up execution time

I have a Android device connected to my PC.
Running a calabash test I use the following command:
calabash-android run <NAME>.apk features/<NAME>.feature
Now before running a feature Calabash always uploads the application again witch takes time.
How can I disable this?
Any help would be appreciated!
Thank you!
You can control the reinstallation of the app using the hooks file. This contains the cucumber hooks for before and after scenario. If you didn't make the hooks file that you are running then it's probably one from a sample project.
The bit you're looking for is the 'reinstall_apps' command. If you remove it completely then your app won't ever be reinstalled, which can be a bad thing as it's sometimes necessary to reset the app completely. The way I handle it is to tag the features where I do want the app reinstalled with #reinstall_app and then
Before do |scenario|
puts "Starting scenario - #{scenario.name}"
reinstall_app if scenario.source_tag_names.include?('#reinstall_app'))
...
end

ActiveMQ Error in CF9 to CF11 Migration

Please forgive me since I'm rather new to this, but I'll try to explain the situation as best as I can.
The current system is running on ColdFusion 9 and ActiveMQ 5.3.1. We are trying to upgrade the system to ColdFusion 11 and I'm running into some issues. In ColdFusion 9 ActiveMQ appears to run fine on Beta and Production (we also have a local and alpha environment) however in ColdFusion 11 I get the following error: http://puu.sh/gVp1L/d77453416f.png This happens in the /CFIDE/adminapi/eventgateway.cfc:204 which of course is a file that has been abstracted to not be readable.
I have tried the following:
Three different ActiveMQ servers
Two different installs of CF11
Going step by step through the eventgateway api
When I manually try to start the Gateway Instance in CFIDE, it goes to a white page, and nothing shows up in the eventgateway log. The only error I've managed to see was actually in CF9 and it was:
Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory
I'm assuming that's just a goofy ActiveMQ install locally though. I did some googling on this error and it says that I might be missing a .jar file within ActiveMQ, but when I view the /lib directory I can see the file they claim must be missing. Within CF9, I can actually see errors in the eventgateway log, but like I said, I get a white screen and nothing happens in CF11.
Any ideas?
Thanks,
Nick
This was due to the activemq.jar not being including in the cfusion/lib folder for CF11, but was for CF9.

Unable to debug glassware- Google glass

I am unable to debug glassware.I have tried the solution in this thread How to debug Google Glass GDK application?
This application uses voice commands, It gets installed but doesn't start the default activity.I am unable to find any classes to select in the run configurations.But messages are logged in Log cat.
Update:By activating DDMS I am able to debug.. But its strange that after few times of debugging, app stops working .. I dont get any exceptions logged.
You generally don't setup a default activity for Glass since there's not a way to "run" a specific application. You will likely want to set up a voice command and add a listener for that voice command. This is how your application will launch.
Even with no exceptions, could you post your LogCat output? This might help to shed a little more light on the issues you're having. I've been able to debug applications without any issues, so I know it's possible.

Hawtio stops working after running for days

We are using hawtio to have a fancy and nice web interface for seeing JMX MBeans and Camel Route in our project. However, we have noticed that after weeks running Hawtio stops working and we are getting a Jetty error when trying to access it.
We are using hawtio in standalone mode, version 1.2.0/offline. Also I guess it worth to mention that our Camel routes are pretty heavy and consume many resources (not sure if that impacts hawtio). When trying to access we get this:
HTTP ERROR 404
Problem accessing /ourContextPath/. Reason:
Not Found
Powered by Jetty://
It seems like there is no active resource for our context path and I something went wrong like a thread stopped working or something.
Does anybody have any idea how to solve this or how to find what's causing this? Also, is this a known bug fixed in the latest version (1.2.1)?
Jetty needs a work/temp directory to operate.
Default behavior is to use whatever java.io.tmpdir points to.
However, on many unix installations, this points to /tmp, and that directory is often cleaned out by other processes.
To fix, either specify a java.io.tmpdir to be somewhere other than /tmp
$ java -Djava.io.tmpdir=/var/run/jetty -jar start.jar
or create a ${jetty.base}/work/ directory (if running Jetty 9.1+)
or create a ${jetty.home}/work/ directory (if running versions of Jetty prior to 9.1)
See the answer at Jetty: Starts in C:\Temp for more details on how this work/temp directory operates and is configured.

IIS 7.5 crashes after a few requests (with Django + PyISAPIe)

I managed to run Django using IIS as webserver (using PyISAPIe) and everything goes well in my test server, mounting Windows 2008 Server R2 64bit.
Then I installed the application on another server with the same configuration and it works fine for the first request. Then when I reload the page, I get a "Service not working" page.
On the event log I see an Application error saying that python26.dll had some problems:
Faulting application name: w3wp.exe
Faulting module name: python26.dll
Exception code: 0x40000015
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\python26.dll
Can you give me some hint on how to solve that problem?
UPDATE: "Rapid-Fail Protection" in the Advanced Settings of the Application Pool was set to 5 failures; disabling it, all worked well.
So, now the question is: how can I detect what caused the failures?
UPDATE: I discovered that IIS crashes when there are multiple requests (img, css, js). PyISAPIe is called for each of them, passing them to static server once recognized.
No idea why this happens...
PyISAPIe is not a good choice to run Django on Windows 2008. In this article you can find better solution: Running Django on Windows (with performance tests)
Check the eventlog it should be in there.
You may also find some more detail in the httperror log (C:\Windows\System32\LogFiles\HTTPERR).
I discovered that IIS crashes when there are multiple requests (img,
css, js). PyISAPIe is called for each of them, passing them to static
server once recognized. No idea why this happens...
Do multiple request cause the error on both machines? When there are multiple requests in an ISAPI application, each request runs in its own thread. The Python multi-threading model is GLOBAL - all threads running under that Python process are co-mingled and sharing all global resources, so you must serialize all multi-threaded code running in all applications and processes using your Python engine. This is a serious downside in Python multi-threaded processing and may be the source of your problems. See http://docs.python.org/library/multiprocessing.html and other sources.
But even this only occurs on one machine and not the other, that may still be the cause - it could also depend on many other environmental variables - number of requests, resources of the machine, processors, etc.
Check memory usage on machine (total physical).