IllegalStateException: in SimpleFrameBuilder when running grails app in tcserver w/ insight - tcserver

I am trying to profile a grails application using insight.
Grails - 2.4.0 or 2.4.1 (tried 2.4.1 to see if it fixed my issue)
GGTS - 3.5.0 w/ eclipse 4.3.2
tcserver - VMWare vFabric tc Server Developer Edition (Runtime) v2.9
(from within eclipse)
PermGenSpace = 1024m
I have tried the following;
Drag the grails application from the project explorer and drop it on the tc server in the Servers pane
Build the grails application with grails dev war and placed the war file into the webapps directory directly via command line
Run As -> Run on Server
I'm seeing the same result, which is the stacktrace below. Anybody have an thoughts as to what might be wrong or how to make this work? If more information is needed, please let me and I'll try to provide it.
Thanks much!
Thantous
EDIT:
Got the server to startup by adjusting the memory of the tcserver. The real issues stopping the server from starting was the heap memory error at the very bottom of the stacktrace. I am still seeing the error for SimepleFrameBuilder, but at least the server starts up now :).
Here is the relevant part of the server config for memory settings;
-Xmx2048m -Xss1024k -XX:MaxPermSize=2048m
-- StackTrace --
2014-06-25 09:13:40,995 [localhost-startStop-1] ERROR errorhandling.CollectionErrors - Disabling aspect com.springsource.insight.plugin.springcore.ClassPathScanOperationCollectionAspect
- IllegalStateException: current frame builder doesn't support frame discarding class com.springsource.insight.intercept.trace.SimpleFrameBuilder
2014-06-25 09:13:41,010 [localhost-startStop-1] ERROR errorhandling.AdviceErrorHandlingAspect - Error swallowed in advice adviceexecution(void com.springsource.insight.collection.AbstractOperationCollectionAspect.afterReturning(Object, JoinPoint.StaticPart))
java.lang.IllegalStateException: current frame builder doesn't support frame discarding class com.springsource.insight.intercept.trace.SimpleFrameBuilder
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.getFirstCollapsedFrame(CollapsingFrameBuilder.java:183)
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.collapseIfRequired(CollapsingFrameBuilder.java:150)
at com.springsource.insight.intercept.trace.collapse.CollapsingFrameBuilder.exit(CollapsingFrameBuilder.java:72)
at com.springsource.insight.intercept.trace.ThreadLocalFrameBuilder.exit(ThreadLocalFrameBuilder.java:93)
at com.springsource.insight.collection.overflow.CountOperationsTraceOverflowStrategy.doExit(CountOperationsTraceOverflowStrategy.java:196)
at com.springsource.insight.collection.overflow.CountOperationsTraceOverflowStrategy.exit(CountOperationsTraceOverflowStrategy.java:91)
at com.springsource.insight.collection.DefaultOperationCollector.exit(DefaultOperationCollector.java:161)
at com.springsource.insight.collection.DefaultOperationCollector._exitNormal(DefaultOperationCollector.java:74)
at com.springsource.insight.collection.DefaultOperationCollector.exitNormal(DefaultOperationCollector.java:65)
at com.springsource.insight.collection.AbstractOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_collection_AbstractOperationCollectionAspect$2$34342d20_aroundBody2(AbstractOperationCollectionAspect.aj:105)
at com.springsource.insight.collection.AbstractOperationCollectionAspect$AjcClosure3.run(AbstractOperationCollectionAspect.aj:1)
at com.springsource.insight.collection.errorhandling.AdviceErrorHandlingAspect.ajc$around$com_springsource_insight_collection_errorhandling_AdviceErrorHandlingAspect$1$e76a6b03proceed(AdviceErrorHandlingAspect.aj:41)
at com.springsource.insight.collection.errorhandling.AdviceErrorHandlingAspect.ajc$around$com_springsource_insight_collection_errorhandling_AdviceErrorHandlingAspect$1$e76a6b03(AdviceErrorHandlingAspect.aj:43)
at com.springsource.insight.collection.AbstractOperationCollectionAspect.ajc$afterReturning$com_springsource_insight_collection_AbstractOperationCollectionAspect$2$34342d20(AbstractOperationCollectionAspect.aj:1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[error 2014/06/25 09:14:45.735 PDT <GemfireHeapPoller> tid=0x23] Member: gamera(5640:loner):0:eb9aced3 above critical heap threshold

Related

Sonar Qube plugin problems with Flex

I'm having problems after an upgrade of my Sonar Qube :(
I installed the newest version (5.0) of Sonar Qube using an existing MySQL database. The previous Sonar Qube version was 3.7.4.
I'm using it to analyze a pure ActionScript project using the Flex plugin (Version 2.1).
The problems to me seem threefold:
Just starting the server and viewing previous analysis results I get gray
rects where code quality used to be indicated in shades of green etc.
After installing the Flex plugin using the Update Center this
remains.
Running the sonar-runner (version 2.4) I get two types of errors:
A whole lot of these:
23:35:01.572 DEBUG - Resource org.sonar.api.resources.Directory#46815882[key=path/to/folder] was found using deprecated key. Please update your plugin.
After which the analysis exits with this:
23:35:01.585 INFO - Sensor FlexSquidSensor done: 4508 ms
23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor#1f96a21e...
23:35:01.585 INFO - No Cobertura report provided (see 'sonar.flex.cobertura.reportPath' property)
23:35:01.585 INFO - Sensor org.sonar.plugins.flex.cobertura.CoberturaSensor#1f96a21e done: 0 ms
23:35:01.585 INFO - Sensor SCM Sensor (wrapped)...
23:35:01.612 INFO - SCM provider for this project is: git
23:35:01.612 INFO - Retrieve SCM blame information...
23:35:01.615 INFO - 280 files to be analyzed
23:35:04.012 DEBUG - Updating semaphore batch-nl.manno:Earz
23:35:04.447 DEBUG - Release semaphore on project : org.sonar.api.resources.Project#4aa0b07b[id=60,key=nl.manno:Earz,qualifier=TRK], with key batch-nl.manno:Earz
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 14.293s
Final Memory: 15M/123M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalArgumentException: Expected one blame result per line but provider returned 3 blame lines while file src/nl/aloft/earz/core/modules/interval/Interval.as has 76 lines
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
at org.sonar.batch.scm.DefaultBlameOutput.blameResult(DefaultBlameOutput.java:68)
at org.sonar.plugins.scm.git.JGitBlameCommand.blame(JGitBlameCommand.java:131)
at org.sonar.plugins.scm.git.JGitBlameCommand.access$000(JGitBlameCommand.java:44)
at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:105)
at org.sonar.plugins.scm.git.JGitBlameCommand$1.call(JGitBlameCommand.java:102)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)
logout
Now I used to have more plugins installed than just Flex (including the mentioned Cobertura) but after installing those Sonar Qube fails to run at all without too much notification (needless to say the runner won't run either).
Can anyone shed some light on this?
Thanks in advance,
Manno
We already faced this issue with files having old Mac line ends (CR or \r). Git will not consider them as line ends so you end up having less lines in your blame than in your file.
You can "clean" your file using mac2unix utility.

Play TypeSafe Activator fails to start - IllegalArgumentException "Failed to download new template catalog properties"

Moving from play 2.2.x to latest activator last night. Downloaded minimal 1.2.10, extracted it in program file (x86)\typesafe... and put the directory into the system path variable. cloned my repository, and when i executed activator run it downloaded the required modules and my app is up and running. All great so far. run works!
Then I tried to create a new app, and activator fails, with the following trace:
Checking for a newer version of Activator (current version 1.2.10)...
... our current version 1.2.10 looks like the latest.
Found previous process id: 9632
FOUND REPO = activator-local # file:////C:/Program%20Files%20(x86)/Typesafe/activator-1.2.10-minimal/repository
Play server process ID is 9760
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[WARN] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [ActorSystem(default)] Failed to download new template ca
talog properties: java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\admin\.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' is a directory.
[ERROR] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [akka://default/user/template-cache] Could not find a te
mplate catalog. (activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.
properties with an index hash in it, even though we should have downloaded one
activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.properties with a
n index hash in it, even though we should have downloaded one
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:184)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
I've taken a look at several similar issues on SO and elsewhere. I've deleted .activator directory and retried, I've tried this process from behind a proxy and not, as well as offline (surely offline should work!), but it consistently gives the above error. activator ui gives the same error. I'm stuck and any suggestions would be appreciated. (Edit. tried with full activator download, rather than minimal, and I get the same error.)
Look for reasons it might be impossible to create or access 'C:\Users\admin.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' ... maybe a permissions issue?
The failed check is for "is a directory" but that also fails if it just doesn't exist or can't be accessed.

Getting 'java.sql.SQLException: com.mysql.jdbc.Driver' with grails run-app (when BuildConfig.groovy doesn't need to be recompiled)

I've upgraded my grails application from 1.3.9 to 2.2.3 and then to 2.3.3. I read the release and upgrade notes for 1.3.9->2.2.3 and then from 2.2.3->2.3.3
I am using OpenJDK 6, Jetty 6 and the plugin jetty 1.1, MySQL 5.5 and I have the connector library under lib
Now my issue is if I run grails clean and then grails run-app the application runs without any problems but if I stop it and run grails run-app again I get a gigantic error (see here: http://pastebin.com/36MpXhir)
I also found that changing something like adding a space somewhere in BuildConfig.groovy (anything that makes it be recompiled) makes the application run normally.
Looking at the stacktrace the first thing that puzzles me is
[02.12.13 16:13:59.919] [main] pool.ConnectionPool Unable to create initial connections of pool.
java.sql.SQLException: com.mysql.jdbc.Driver
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:127)
at org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy.afterPropertiesSet(LazyConnectionDataSourceProxy.java:162)
There are references to org.apache.tomcat even though I'm using jetty (and removed tomcat from BuildConfig.groovy).
Did anyone else encounter such a problem?
Don't put jar files in the lib directory if they're available in a public Maven repo. It's far better to download jars once and keep them in a local cache, and reuse them as needed.
The MySQL driver is used as the commented-out example in the generated BuildConfig.groovy - just un-comment it :) You might want to bump up the version to the latest, e.g.
dependencies {
runtime 'mysql:mysql-connector-java:5.1.27'
}
This is a good site for finding Maven artifacts: http://mvnrepository.com/artifact/mysql/mysql-connector-java
If you do have a jar that's not in a Maven repo (e.g. one with shared code at your company) then you can put it in the lib directory, but it's not auto-discovered. Run grails compile --refresh-dependencies to get it added to the classpath.
For me same error has occurred while running the Grails Application.Then I debug and view the code history of my code which was committed recently.
From that I found the issue that was:
Inside the controller file I send the instance with-out properly
Eg:
**def list=[personInstance.]---> error occurred.**
**render list as JSON**
Then I correct my mistake-->clean the app --> run the app
Now its working fine.

c3p0 - hibernate - mysql

hibernate 3.6.8 final
c3p0 jar that came with hibernate 3.6.8 package -> c3p0-0.9.1.jar
1
15
40
0
5
2
The app seems to be working fine, however I get massive log calls with the following stacktrace:
org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1566)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2411)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor38.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:152)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1074)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1061)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1796)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:620)
Any information on how to remove that INFO log would be very much helpful thanks!
UPDATE: Is this a critical error? Or can should I just ignore it?
After a search on the web regarding this issue, I found some similar issues reported by several people. All of them point to a common problem: Threads. Basically, if you start new threads in your application (either in your code or by using a third party tool like Quartz, you have to make sure that all of the threads are stopped appropriately when the application is undeployed from the server. Here are some quotes from the searches:
Mikolaj Rydzewski wrote:
It looks like after webapp's instance has been undeployed, background quartz thread wants to do something and then exception occurs.
Another (and better explanation) on jspwiki.org:
It is possible that this is caused by Tomcat unsuccessfully reloading the web application. The app is unloaded, but all threads don't get shut down properly. As a result, when the threads try to run, they get clobbered by the fact that Tomcat has shut down its classloader, and an error is logged.
So, in order to solve this issue you have to make sure all threads started by your application will be stopped at application undeployment (or redeployment, it's the same). You can do this by registering a ServletContextListener to your application server and stopping your threads inside contextDestroyed(ServletContextEvent) method.
If you are using log4j, change your logging settings to something like this (the word ERROR replace INFO) :
log4j.rootLogger=ERROR, file, stdout
log4j.logger.org.hibernate=ERROR
They are located in the the log4j.properties file in yr project.
OK I switched to boneCP, c3p0 does not really seem to work for java6!!!

Groovy: deploying a war file

I have a groovy application running locally on my desktop.
Apparently it runs error free. At least all unit tests I wrote are fulfilled.
I want to deploy the application using a war file. For this I use the command
grails war
in the home directory of the application. When doing this I am getting the following exception:
Error executing script War: java.lang.NullPointerException
gant.TargetExecutionException: java.lang.NullPointerException
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.NullPointerException
at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy:289)
at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy)
at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy:282)
at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy)
at _GrailsWar_groovy$_run_closure5_closure25.doCall(_GrailsWar_groovy:258)
at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:256)
at _GrailsWar_groovy$_run_closure4.doCall(_GrailsWar_groovy:239)
at War$_run_closure1.doCall(War.groovy:38)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
... 10 more
Any hint why?
Thanks a lot in advance
I think you'll have to find the source of Gant.groovy and see what it's doing on that line. Apparently there is some problem caused by your project's specific configuration (since such a show-stopper bug would have been caught if it always occurred), but the error message does not contain much information.
Alternatively, you could try upgrading Grails to the latest version 1.1.1 if you haven't already.