I experience some strange problems with a brand new grails 2 installation and project.
my setup:
windows 7
grails 2.1.1
intellij
problems:
when storing an entity i set a flash.message="foo"+x. grails caches this code (not value). when i change it to "bar"+x then grails does not pick up the change. i have to stop, grails clean, and start again. takes forever.
in my grails controller i query a web service. when the web service is offline then i get a FileNotFoundException. so i wrap the code in a try-catch. now i still get that FileNotFoundException, and the browser output with the error 500 even shows my code snipped with the try-catch.
stopping grails does not stop the java process. i have to kill it using the task manager. this happens for both ways of starting: ctrl-alt-g run-app and then stopping with the skull icon, and run in debug mode and then stopping with the red button.
break points don't work. no matter where i set a break point in my controller, it never stops there.
Any idea what could be wrong?
I expected grails v2 to be less painful than v1, but so far it's really giving me a hard time.
Related
I'm currently in the process of writing an ASP.NET core application and I'm getting data from a web api and loading the information in a grid and some dropdown menus.
This all works fine, but I've noticed that sometimes when I'm debugging and I step through the functions that make requests to the api and receive the data back from it, the data just fails to load in my application. Everything seems fine while I'm debugging, and this doesn't happen when I start my application by selecting "Start Without Debugging."
I would like to specify that this only happens when I step through the code; if I run the debugger without any break points it behaves correctly. In addition this behaviour is not always observable when I step through the code, and it is more likely to happen when I take a long time.
I'd like to know if anyone knows what exactly is causing this or can point me to some reading material that would help me understand it. I'm assuming it has something to do with stalling the requests or making them time out but I obviously need to learn more about what is happening.
Tomcat 7 Throws an error saying the application requires more time to start but even if i increase the timeout to 600 sec the same error comes up , how can i run the application .
I am loading all the jars from https://repo.spring.io/release/org/springframework/spring/
I am using jdk 1.6
Version 4.2.5 But still error .
Please help how can i run my application.
Error image
Solution : remove all project from Tomcat server, then restart tomcat again.
Method :
Window tab -> show view -> select server --> then right click server -> add and remove --> remove all configured --> finish --> restart server, may it help you.
Tomcat 7 normally starts within a few seconds. It sounds like you have one of these problems:
Something is going drastically wrong - check all logs in the /logs directory there may be clues in there.
Something in the static initialisation code of one of your classes is taking forever. Put breakpoints in any static initialization code and see if they are reached, and that control is returned to Tomcat in a timely fashion.
Something in the static initialisation code of another deployed application is taking forever. Undeploy all other apps (if there are any) and try again.
Also, try undeploying your application. Does Tomcat start normally now? This will sort out whether the problem is the Tomcat installation or your application.
My guess (and it is a guess) is that you are trying to open a mis-configured remote resource like a database, web service or JMS queue. Web services are often the culprit, as the JAXWS default is to have an infinite timeout. You need to do extra work to implement timeouts.
So I'm working on my Meteor project and all of a sudden everything stops working and my console reports that everything is 'undefined'. See screenshot. Why does this happen? Usually things will just randomly start working again after I reboot my machine or go get lunch.
This can happen if you have a hot code reload during when the page is loading from a previous hot code reload.
Your browser will eventually reconnect to the server, reconnect & refresh the page. In the case above it looks the the bit of Js that connects to the server doesn't get loaded to begin with (the DDP bit) so it doesn't behave as normal. If it reconnects it can fix it self by refreshing.
It's very hard to tell what exactly is causing it from the information you've given. I'd look at custom packages that replace core packages or some kind of of package you have that runs early on in your code that would stop the normal loading of a project.
If you're using meteor on windows there are a couple of bugs that do this too. I'm not sure how to get past those besides doing Ctrl+C to stop and then using meteor to start the project again.
I am trying to debug a project, suddenly I'm running into an issue where enumerating any object collections results in a timeout if I try to view it.
If I run the program normally I have no issues. If I try to view any collection, such as a list, I get a timeout error and the whole thing bombs out.
I thought something might be going on with one of my more complex collections so I tried creating just a normal list of strings as follows...
List<string> blah = new List<string>{"fsdf","fsdg","Gt","gsersg","ser","gersgxdrsd"};
The same thing happens. I can hover over the object, I can even see the object count, however if I view the collection it dies.
I've ensured that the project/class library is in debug mode, disabled all extensions, restarted the system, tried percusive maintnence - nothing has worked.
Does anyone have any ideas? I'm completely losing my mind here.
I should also mention that this is a web application, I didn't notice before but a w3wp debug window pops up after I stop debugging. Sorry to leave out important info - was too frustrated to think straight when I wrote the post. I can still execute my code normally, and while debugging. I can examine all other objects without issue, it is only looking at collections in the watch window (or by hovering) that breaks.
Have a look at How to correctly debug web applications on local IIS 7.5 with VS 2010 Beta2?
I've written a c# windows app, that performs some DB intensive operations. (MySQL connector v6).
When running the project in Debug mode, everything works fine. However, when I run the prject in release mode, it sometimes quits operation midway - with no error message, nothing in the event logs etc.
What would be the best way to debug release mode - when everything works in debug mode?
Thanks for any help,
Bob
You can create a log file and have the application write lines to it with information of your choice, similarly to how the console may be used for debug purposes in a windows form application. You can write values of certain variables to this file, or even just write distinct phrases in select places of the code that will help you detect where the program is in execution when it fails.
Bobby is correct in asking about Application Event Log. If it is bombing on a .NET error, it will likely be logged.
If that doesn't give you anything, wrap the entire app in a try/catch block. On your exception handling, log the error (application log, file, etc...). Make sure when you log it to capture the call stack.
I've got exactly the same problem - application running in debug mode and fail in release. Try the following:
Wrap everything in Program.cs in try{}..catch{} block and it will show a reason
I don't know why but my application failed on Program.SetCompatibleTextRenderingDefault() function with message that it should be called before any instances on IWin32Window or something like that
It is very strange errors for me cuz i didn't have any code before this function. But you can try - maybe it will show something useful for you