MultipleCompilationErrorsException: startup failed for groovey application - grails

Getting error like :
General error during conversion: java.lang.NoClassDefFoundError: Unable to load class grails.plugin.springsecurity.SpringSecurityUtils due to missing dependency Lgrails/core/GrailsApplication;
[groovyc]
[groovyc] java.lang.RuntimeException: java.lang.NoClassDefFoundError: Unable to load class grails.plugin.springsecurity.SpringSecurityUtils due to missing dependency Lgrails/core/GrailsApplication;
while building application

Related

Neo4J 3.3.3 database got corrupted as there was not enough disk space and no way to fix it?

I ran out of disk space and my Neo4J 3.3.3 database doesn't start anymore showing the following error:
2018-04-16 21:10:35.148+0000 ERROR Failed to start Neo4j: Starting
Neo4j failed: Component
'org.neo4j.server.database.LifecycleManagingDatabase#7e5c856f' was
successfully initialized, but failed to start. Please see the attached
cause exception "null. At position LogPosition{logVersion=250,
byteOffset=198709181} and entry version V3_0_10". Starting Neo4j
failed: Component
'org.neo4j.server.database.LifecycleManagingDatabase#7e5c856f' was
successfully initialized, but failed to start. Please see the attached
cause exception "null. At position LogPosition{logVersion=250,
byteOffset=198709181} and entry version V3_0_10".
When I run neo4j-admin check-consistency --database=graph.db I get:
unexpected error: null. At position LogPosition{logVersion=250,
byteOffset=198709181} and entry version V3_0_10
So probably some logs got corrupted.
Does Neo4J have any tools to fix this situation?
I looked at https://github.com/neo4j/neo4j-javascript-driver/issues/300 - but it didn't help me as I don't even get any error message just the one above.
I tried https://github.com/jexp/store-utils but when I run
copy-store.sh community ~/neo4j-community-3.3.3/data/databases/graph.db ~/target.db
it says
[ERROR] COMPILATION ERROR : [INFO]
------------------------------------------------------------- [ERROR] /home/noduslabs/repair/store-utils/src/main/java/org/neo4j/tool/StoreCopy.java:[96,18]
error: cannot find symbol [ERROR] class StoreCopy
/home/noduslabs/repair/store-utils/src/main/java/org/neo4j/tool/StoreCopy.java:[96,59]
error: cannot find symbol [ERROR] class StoreCopy
/home/noduslabs/repair/store-utils/src/main/java/org/neo4j/tool/StoreCopy.java:[97,37]
error: cannot find symbol
Running that same store-utils but branch 32 seem to go further but then the same error occurs:
[ERROR] Failed to execute goal
org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project
store-util: An exception occured while executing the Java class. null:
InvocationTargetException: Error starting
org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory,
/home/noduslabs/neo4j-community-3.3.3/data/databases/graph.db:
Component 'org.neo4j.kernel.recovery.Recovery#4168eb66' failed to
initialize. Please see the attached cause exception "null. At position
LogPosition{logVersion=250, byteOffset=198709181} and entry version
V3_0_10". -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java
(default-cli) on project store-util: An exception occured while
executing the Java class. null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
So basically I'm stuck and there's not way to fix the DB, right?

unable to resolve class java.sql.sqltype grails ggts

I am facing the same issue. I have tried cleaning multiple times the project. Tried creating new workspace Tried clean installation, but still facing the same issue
Failure:
Loading Grails 2.4.4
.
|Environment set to production
.................................
|Packaging Grails application
...........
|Compiling 115 source files [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] C:\src\sw\compiler\test\reports\TRez\grails-app\domain\automatedreports\TestRun.groovy: 3: unable to resolve class java.sql.SQLType
[groovyc] # line 3, column 1.
[groovyc] import java.sql.SQLType;
[groovyc] ^
[groovyc]
[groovyc] 1 error
.Error
|
Compilation error: startup failed:
C:\src\sw\compiler\test\reports\TRez\grails-app\domain\automatedreports\TestRun.groovy: 3: unable to resolve class java.sql.SQLType
# line 3, column 1.
import java.sql.SQLType;
^
1 error
Error |
org.codehaus.groovy.grails.cli.ScriptExitException
Error |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Error |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Error |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
---more like this
Can anyone please help as I am completely stuck here
java.sql.SQLType doesn't exist before Java 8. It is almost certainly a problem with the version of Java you are compiling with being 7 or lower. Ensure you have Java 8 installed and your JAVA_HOME environment variable is set correctly to point at the Java 8 install. Refer to this question for more details: How do I make grails choose the right JDK?

org.springframework.beans.FatalBeanException type mismatch between read and write methods

I have a web application written using Grails 2.2.4. To this point we have been compiling and running it using the IBM 1.6 JDK on AIX because our AIX version did not support 1.7 or higher.
We recently updated our AIX version so we can now support 1.7 and 1.8. We need to do make use of 1.7 at minimum with our Grails 2.2.4 application so that we can use TLS 1.2.
When we try to use the IBM 1.7 JDK we get errors in some of our unit tests like:
java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at grails.test.mixin.services.ServiceUnitTestMixin.mockService(ServiceUnitTestMixin.groovy:46)
at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
at org.spockframework.runtime.extension.builtin.JUnitFixtureMethodsExtension$FixtureType$FixtureMethodInterceptor.intercept(JUnitFixtureMethodsExtension.java:145)
at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
at org.spockframework.runtime.extension.MethodInvocation.invokeTargetMethod(MethodInvocation.java:91)
at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:85)
at com.atlassian.clover.recorder.spock.CloverSpockIterationInterceptor.intercept(CloverSpockIterationInterceptor.java:36)
at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
Caused by: java.lang.reflect.InvocationTargetException
... 11 more
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.cfglife.agent.AgentContextService]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods
... 11 more
Caused by: java.beans.IntrospectionException: type mismatch between read and write methods
... 11 more
It happens in 37 of 1272 tests and only when tested under the IBM 1.7 SDK. When run using Oracle or OpenJDK the tests run with no failures.
Does anyone know how to get around this?
On deployment and startup (using Tomcat ) it shows up a little differently.
2017-05-04 11:24:52.782 | ERROR | org.springframework.web.context.ContextLoader | localhost-startStop-1 | Context initialization failed |
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.cfglife.agent.AgentContextService]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more
Caused by: java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more
2017-05-04 11:24:52.790 | ERROR | org.codehaus.groovy.grails.web.context.GrailsContextLoader | localhost-startStop-1 | Error initializing the application: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass |
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.cfglife.agent.AgentContextService]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more
Caused by: java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more
2017-05-04 11:24:52.795 | ERROR | org.codehaus.groovy.grails.web.context.GrailsContextLoader | localhost-startStop-1 | Error initializing Grails: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass |
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:483)
at java.util.concurrent.FutureTask.run(FutureTask.java:274)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
at java.lang.Thread.run(Thread.java:809)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.cfglife.agent.AgentContextService]; nested exception is java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more
Caused by: java.beans.IntrospectionException: type mismatch between read and write methods
... 5 more

Quartz job exists even after deleting it?

I was testing a helloworld quartz job. I copied an existing job and pasted it in grails-app/jobs folder. I named it TestJob.groovy. I simply made it to fire every minute with a println message. I had made a mistake in the cron expression. I deleted this job and restarted the app and i get the following error message. The strange thing is looks like the file still exists since the error mentions the error was in the file TestJob.groovy but i had already removed this file. I tried cleaning the project and rebuilding it and i still get the error. I appreciate any help in resolving this error and restarting back the app normally. Thanks!
| Loading Grails 2.2.0
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Compiling 1 source files.....
| Running Grails application
ERROR context.ContextLoader: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
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)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
... 4 more
Caused by: java.lang.IllegalArgumentException: Cron expression '0 * * * * *' in the job class com.runnercard.RemoveUserCodeJob is not a valid cron expression
at grails.plugins.quartz.config.TriggersConfigBuilder$_prepareCronTriggerAttributes_closure5.doCall(TriggersConfigBuilder.groovy:204)
at grails.plugins.quartz.config.TriggersConfigBuilder$_closure1.doCall(TriggersConfigBuilder.groovy:216)
at grails.plugins.quartz.config.TriggersConfigBuilder.prepareCronTriggerAttributes(TriggersConfigBuilder.groovy:198)
at grails.plugins.quartz.config.TriggersConfigBuilder.createTrigger(TriggersConfigBuilder.groovy:78)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:251)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:244)
at com.runnercard.RemoveUserCodeJob$__clinit__closure1.doCall(TestJob.groovy:14)
at grails.plugins.quartz.config.TriggersConfigBuilder.build(TriggersConfigBuilder.groovy:51)
at grails.plugins.quartz.DefaultGrailsJobClass.evaluateTriggers(DefaultGrailsJobClass.java:57)
at grails.plugins.quartz.DefaultGrailsJobClass.<init>(DefaultGrailsJobClass.java:47)
... 4 more
ERROR context.GrailsContextLoader: Error initializing the application: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
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)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
... 4 more
Caused by: java.lang.IllegalArgumentException: Cron expression '0 * * * * *' in the job class com.runnercard.RemoveUserCodeJob is not a valid cron expression
at grails.plugins.quartz.config.TriggersConfigBuilder$_prepareCronTriggerAttributes_closure5.doCall(TriggersConfigBuilder.groovy:204)
at grails.plugins.quartz.config.TriggersConfigBuilder$_closure1.doCall(TriggersConfigBuilder.groovy:216)
at grails.plugins.quartz.config.TriggersConfigBuilder.prepareCronTriggerAttributes(TriggersConfigBuilder.groovy:198)
at grails.plugins.quartz.config.TriggersConfigBuilder.createTrigger(TriggersConfigBuilder.groovy:78)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:251)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:244)
at com.runnercard.RemoveUserCodeJob$__clinit__closure1.doCall(TestJob.groovy:14)
at grails.plugins.quartz.config.TriggersConfigBuilder.build(TriggersConfigBuilder.groovy:51)
at grails.plugins.quartz.DefaultGrailsJobClass.evaluateTriggers(DefaultGrailsJobClass.java:57)
at grails.plugins.quartz.DefaultGrailsJobClass.<init>(DefaultGrailsJobClass.java:47)
... 4 more
doing a grails clean and clearing .slcache did it. Maybe the cache is the culprit.

Grails 3 throwing strange exception when using more than 14 Domain classes with #Resource

Grails 3 is throwing a strange exception when using REST Resources. What I have noticed is that when I have more than 14 Domain classes with the #Resource annotation it is throw a weird exception and refuses to start with the run-app command. I have checked in code to a github repo to demonstrate the problem. If you get this project and do a grails run-app it will throw an exception. I am using JDK 7 and grails 3.0.4.
Github repo: https://github.com/akhopkar/testREST
The Exception it throws is:
ERROR grails.boot.GrailsApp - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.test.A2Controller': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Comparison method violates its general contract!

Resources