Quartz versioning issue with jboss - grails

I m having quartz 1.7.3 in .grails/plugins folder in development environment
where in grails/web-inf/lib i have quartz-1.8.4.jar version
It works properly in development sts 3.1.0 IDE version
When i moved the same to production environment by creating war directory in the war folder it includes both 1.7.3 and quartz-1.8.4.jar files at .war/web-inf/lib/
where in jboss/server/default/lib contains quartz.jar (i.e. 1.5.2 comes with by default jboss)
now i m facing issue in invoking quartz jobs on start up and afterwards
same thing is working without changing anything in other server only i m facing the compatibility after putting logs in config.groovy i came to know the error.
I tried to put one jar from 1.7 or 1.8 in web-inf/lib still didn't worked
I did put the 1.5.2 version in web-inf/lib folder still i m facing compatibility issue
Any idea/suggestions

If i remember,
You need to check the quatz tables in the db, may in the other server ther not exist in the db or somting like that..
Tables are starting QURTZ_?
There is somting like 5-7 tables in the db.

There was versioning issue as more than one jar of diff versions were getting conflicting came to know after switching to logging in the system. As there were one more jar included in jboss-web-deplyer/lib directory after removing that jar the problem got resolved.
Thanks for the help.

Related

Neo4J 4 + Apoc : Unable to set up injection for procedure 'Static'

Getting the following error on neo4j server startup with the apoc plugin.
Have copied the jar to the plugins folder.
Caused by:
org.neo4j.kernel.api.exceptions.ComponentInjectionException: Unable to
set up injection for procedure 'Static', the field 'apocConfig' has
type 'class apoc.ApocConfig' which is not a known injectable component
Neo4j version: 4.0.4
Apoc version: 4.0.0.13
What could be the problem?
I would suggest reviewing the installation procedure to see if you missed any steps,
https://neo4j.com/docs/operations-manual/current/installation/linux/
Also, double check the java version that neo4j is using, and check if there are any other local java environment factors specific to this install. class paths, other jars, etc.
We were having the same issue with neo4j 4.x and custom plugin folder.
Updating custom plugin folder in neo4j config didn't work, we had to add folder (or extension) into java CP (classpath) as well.
It worked in 3.x neo4j version without adding a folder into the classpath.
Try to make sure that you have plugins folder listed in -cp and might work for you.
Similar to Ilija's problem, our embedded database (using Eclipse with the Maven plugin) did not like our custom plugin folder.
Since the database was for setup and then deployment (effectively 2 separate things), we could move the database from the default Neo4j directory after it was setup.
As a test, you could delete the contents of your plugin folder and see if it works then.

How to generate grails jar components for glassfish

Found in this tuto the cmd to deploy a grails app on Glassfish application server:
asadmin deploy --libraries $GRAILS_HOME/lib/glassfish-grails.jar helloworld-0.1.war
Browsing to $GRAILS_HOME/lib/ , don't find glassfish-grails.jar file .
From where can someone get this library ? i mean :glassfish-grails.jar
That stuff is badly dated and I don't think they've updated it in 4 years. For some reason it didn't even appear to be open source when I look at this a year or so ago.
There was plugin but it's almost as dated. The repo has seen some updates fairly recently, so if you wanted to get this thing to the finish line it seems very doable and I think it'd be a great addition.
I would be willing to help out some after the holidays It looks like just updating the glassfish-embedded-all dependency to 'org.glassfish.main.extras:glassfish-embedded-all:4.1' and ensuring that the plugin code compiles would be a chunk of the work, with ensuring that it functions being the remaining :) See http://mvnrepository.com/ for more info, dependencies, etc.
Feel free to email me if you get stuck or want to know anything about getting a new server to act like Tomcat and Jetty do in run-app - I've worked on both of those.
The tutorial was written for the Glassfish v3 Prelude version, a very early version of Glassfish 3, and seems to be invalid for current versions of Glassfish 3.
The file glassfish-grails.jar doesn't exist anymore in the GRAILS lib folder, but it isn't needed anyway.
To make a shared-war (a WAR without the lib files) work, you have to do the following:
Copy all the libs from $GRAILS_HOME/lib/ to $GLASSFISH_HOME/glassfish/lib/.
Deploy it via: asadmin deploy helloworld-0.1.war (or use the Glassfish Admin GUI)
Everything else should work as described in the tutorial.
See also:
Grails - trying to deploy a nojars application into glassfish 3.0.1

Grails 2.4.0.RC1 seems to lock javascript files on Windows 7 - 64bit

I am using Grails 2.4.0.RC1 (and JDK 1.7.0_55) and whenever I browse to any app view that makes use of javascript files from the web-app folder, the java process seems to lock those files.
So I cannot work on any of those javascript files any more since when I try to save changes Windows 7 will not let me do it.
I used Process Explorer to check which process is locking the files and it's the java process running the grails app indeed.
At first I thought that this problem could be related to the new asset-pipeline:1.8.7 plugin which I am using. So I uninstalled it to check if the problem was still there... and it was.
The same app was running on Grails 2.3.5 just fine (although we were using an older JDK too... I must check with JDK 1.7.0_55).
By the way, something similar happened with a much older version of Grails: https://jira.grails.org/browse/GRAILS-3585
Is Anyone experiencing the same problem?
UPDATE 1:
I have tested this problem running the app on different versions of java and these are my results:
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_55 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.7.0_25 -> PROBLEM OCCURS
Win7-64bits, grails2.4.0.RC1, jdk1.6.0_18 -> OK
UPDATE 2:
I created a blank app (which uses Tomcat by default) and everything works fine.
The same blank app using jetty-plugin (with Jetty8) DOES present the problem.
I am further investigating this now.
I found the problem.
It had to do with the jetty-plugin indeed.
On the official version of the plugin 2.0.3 which uses Jetty7, the locking problem is NOT present. But this plugin uses a very old version of Jetty, so it's no use.
On the branch of the plugin created to run Jetty8:
https://github.com/grails-plugins/grails-jetty/tree/2.0.x
... the problem is there.
Also, on the new grails jetty plugin version 3.0.x (which uses Jetty 9.0.x), the problem is there too!
UPDATE 1:
Have a look at:
Jetty locking static files in Windows
Apparently the "useFileMappedBuffer" init-param of Jetty has to be set to false to prevent file locking.
You can use a local version of the jetty plugin and modify the above-mentioned property on [jetty-plugin]/grails-app/conf/webdefault.xml

How do I upgrade the Grails version for an existing application?

I have an example Grails application (from Grails in Action) that was created a while ago under version 1.1.1 on a different PC.
I am now loading Grails 1.2.0 and want to revisit the app. However, when I try to run it I get this message:
Application expects grails version [1.1.1], but GRAILS_HOME is version [1.2.0] - use the correct Grails version or run 'grails upgrade' if this Grails version is newer than the version your application expects.
After reading around a bit I cleared out the 1.2.0 folder under .grails in my home directory (from previous attempts while exploring the issue), ran "grails clean" and "grails upgrade" (answering "y" where prompted).
However, I consistently get "Invalid duplicate class definition" conflicts between classes in \grails\qotd\src\java and \grails\qotd\grails-app{controllers,services,conf}.
Are there any additional manual steps that I need to perform?
I understood your problem.
The solution is just modify the grails vesion to 1.2.0 in application.properties file in your application
If, as you pointed out in the comments, your /src/java contains .groovy files - that could definitely cause unexpected behavior. I haven't hit your particular issue, but any time I had a .groovy file mismatched with the class name inside it, I'd get strange compilation issues - so I guess you could be having a similar issue.
If you have files / classes with the same names in two locations, that's the likely culprit. If you have .groovy files in /src/java, that's another potential source.
Also, putting BootStrap, Config, DataSource and URLMappings into /src/java, that's another potential source of issues. I'd clear out your /src/java by making sure all the files are in their appropriate places under grails-app.
You can upgrade grails version with 5 steps
Project -> Clean
application.properties -> Change app.grails.version
Your project -> Properties -> Grails -> Change grails installation
to new grails version.
Your project -> Grails tools -> Refresh Dependencies
I think this may be help you

Error in Grails

Anyone knows how to fix this ?
It works fine on my env (Me being the developer) and doesn't work on my colleagues machine who unzips the whole
Welcome to Grails null - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: C:\abc\products\grails-1.1
Base Directory: C:\abc\products\foo\bar
Running script C:\abc\products\grails-1.1\scripts\RunApp.groovy
Environment set to development
Application expects grails version [1.1], but GRAILS_HOME is version [null] - us
e the correct Grails version or run 'grails upgrade' if this Grails version is n
ewer than the version your application expects.
Some clarifications
1) There has been no Grails version change , either on my machine or my colleagues machine. In fact some of them are installing for the first time
2) Under C:\Documents and Settings\myfriend.grails I can see a folder called 'null'
I tried removing this folder - but it gets created he runs my application
3) The way I am giving him the release is- I unzip the whole folder and he unzips it
SO there are three steps
A_ grails create-app to create the APp
B_ Unzip my folder to replace the generated folder
C_ Grails run-app
Things are fine after the step A- but degenerate after Step C
It appears that his Grails installation is corrupted or not set up correctly. I would have him reinstall a fresh copy of Grails - http://www.grails.org/Installation and try again.
The error that you are getting is telling us that the application that you are trying to run is identified as version 1.1 and I assume that this is correct. The fact that Grails is not able to identify what version is installed makes me point to a corrupted or mis-configured Grails installation
If he types 'grails' at the command line what does he see?
I found the problem.
This was because I had added a file- build.properties
And since the file was there- it was expecting it to have certain properties defined in it
Once I renamed it to something else- it started to work

Resources