My team is trying to use Flyway to migrate our database during deployment of our JBOSS ESB packages. We created a Migration MBean that calls flyway to initialize and migrate our database.
During deployment we get the following error:
DEPLOYMENTS IN ERROR:
Deployment "vfszip:/opt/jboss-soa-p.5.2.0/jboss-as/server/default/deploy/our-package.esb/
" is in error due to the following reason(s): java.io.FileNotFoundException: JAR entry db/migration not found in /opt/jboss-soa-p.5.2.0/jboss-as/server/default/deploy/our-package.esb
Environment:
JBOSS 5.2.0
Flyway Core 2.0.3
Structure of ESB Package (our-package.esb)
|lib
|db
|migration
|V1__Initial_structure.sql
|V1_1__Populate_table.sql
|jboss-service.xml
|META-INF
Our deployments will mainly consist of queues, topics and associated listeners. We have multiple ESB packages to deploy across several environments.
Update
2013-02-18 12:33:11,700 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner)
Error installing to Start: name=our.pack.age:service=DBMigrator state=Create mode=Manual
requiredState=Installed
com.googlecode.flyway.core.api.FlywayException:
Unable to scan for SQL migrations in location: db/migration
at
com.googlecode.flyway.core.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:97)
at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.collectMigrations(CompositeMigrationResolver.java:219)
at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.doFindAvailableMigrations(CompositeMigrationResolver.java:157)
at com.googlecode.flyway.core.resolver.CompositeMigrationResolver.resolveMigrations(CompositeMigrationResolver.java:127)
at com.googlecode.flyway.core.info.MigrationInfoServiceImpl.refresh(MigrationInfoServiceImpl.java:86)
at com.googlecode.flyway.core.info.MigrationInfoServiceImpl.(MigrationInfoServiceImpl.java:79)
at
com.googlecode.flyway.core.Flyway$4.execute(Flyway.java:1019)
at
com.googlecode.flyway.core.Flyway$4.execute(Flyway.java:1012)
at
com.googlecode.flyway.core.Flyway.execute(Flyway.java:1259)
at
com.googlecode.flyway.core.Flyway.info(Flyway.java:1012)
at
our.pack.age.DBMigrator.migrate(DBMigrator.java:52)
at
our.pack.age.DBMigrator.start(DBMigrator.java:31)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:597)
...More
Caused by: java.io.FileNotFoundException:
JAR entry db/migration not found in /opt/jboss-soa-p.5.2.0/jboss-as/server/default/deploy/our-package.esb
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at
sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
at
com.googlecode.flyway.core.util.scanner.JarFileLocationScanner.getJarFromUrl(JarFileLocationScanner.java:55)
at com.googlecode.flyway.core.util.scanner.JarFileLocationScanner.findResourceNames(JarFileLocationScanner.java:34)
at com.googlecode.flyway.core.util.scanner.ClassPathScanner.findResourceNames(ClassPathScanner.java:156)
at com.googlecode.flyway.core.util.scanner.ClassPathScanner.scanForResources(ClassPathScanner.java:58)
at com.googlecode.flyway.core.resolver.sql.SqlMigrationResolver.resolveMigrations(SqlMigrationResolver.java:86)
... 68 more
DBMigrator is our custom MBean used to call Flyway to migrate our database.
We are using Flyway default configurations with the exception of setOutOfOrder(true).
Test SQL files were placed in src/main/resources/db/migration.
Related
My SonarQube version is sonarqube-7.5 community edition.
Sonar Scanner version is sonar-scanner-3.3.0.1492-windows
I downloaded sonar-plsql-plugin-3.3.0.2273.jar and placed it in \sonarqube-7.5\extensions\plugins\ folder.
My operating system is Windows.
When I try to start SonarQube, I get the below exception in web.log file.
The PLSQL plugin which I am using is compatible with SonarQube 6.7+ and I am using version 7.5 (https://docs.sonarqube.org/display/PLUG/SonarPLSQL)
How could I resolve this issue and start the server?
2019.01.28 16:00:00 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2019.01.28 16:00:01 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin SonarPLSQL [plsql]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:82)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:586)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/sonarsource/plugins/license/api/LicensedPluginRegistration
at com.sonar.plsql.plugin.PlSqlPlugin.define(Unknown Source)
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:72)
... 9 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sonarsource.plugins.license.api.LicensedPluginRegistration
at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
... 11 common frames omitted
2019.01.28 16:00:02 INFO web[][o.s.p.StopWatcher] Stopping process
Sonar PLSQL plugin is a commercial product. You cannot install it on SonarQube Community edition. You have to buy at least Developer edition. Read more at Plans & Pricing.
Installed jBoss EAP 7.0 and trying to deploy a .war file but getting below error. I tried to search for the error but failed to understand Explanations about it.
03:13:23,229 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.module.service."deployment.MMSBackOffice.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.MMSBackOffice.war".main: WFLYSRV0179: Failed to load module: deployment.MMSBackOffice.war:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.modules.ModuleNotFoundException: javax.enterprise.deploy.api:main
at org.jboss.modules.Module.addPaths(Module.java:1092)
at org.jboss.modules.Module.link(Module.java:1448)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
... 5 more
Try adding this module inside jboss-deployment-structure.xml dependencies explicitly and place it inside your war WEB-INFthen try this once again.
I have built a Camel project in Eclipse with Maven dependencies.
It ran successfully and also Built the Jar file and ran it from the command prompt
which is running as required. But when I moved the JAR file onto to our Linux machine
which is like a Job Manager server and when I try to run the JAR file as below
I am getting the below error message.
When I try to run with the below command
$ java –jar mycamelproject
I am getting the below error, but I do have the below mentioned dependency in the Dependency-Jars folder.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/c
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.support
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
Then I tried running with the below command.
$ mvn -X exec:java -Dexec.mainClass=mycamelpackage.mycamelmainclass
I am getting a series of the below errors such as below
[DEBUG] Could not find metadata org.codehaus.mojo/maven-metadata.xml in local (/home/ec2-user/.m2/repository)
[DEBUG] Skipped remote update check for org.codehaus.mojo/maven-metadata.xml, already updated during this session.
[WARNING] Failure to transfer org.codehaus.mojo/maven-metadata.xml from
http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): proxy.host.net
[ERROR] No plugin found for prefix 'exec' in the current project
and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
available from the repositories
How should java –jar mycamelproject work if no classpath is set? And mycamelproject should be a JAR file anyway (and if it is, you should add the *.jar extension).
Beside that, I guess your local Maven repository may be corrupt. That's usually the reason why you see the resolution will not be reattempted error message. The easiest way to fix this is to remove the corrupt directories and start Maven again.
I am trying to build a sample spring MVC app using Maven and getting deployed in JBoss 7 application server.
While trying to build using maven, it builds fine without error. However while trying to deploy using JBoss 7, I am getting this following error.
Kindly help to give ideas what might be the cause of this error.
13:48:36,408 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."firstSpring-1.0-SNAPSHOT.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."firstSpring-1.0-SNAPSHOT.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "firstSpring-1.0-SNAPSHOT.war"
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.springframework.web.servlet.tags.EvalTag with ClassLoader ModuleClassLoader for Module "deployment.firstSpring-1.0-SNAPSHOT.war:main" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor from [Module "deployment.firstSpring-1.0-SNAPSHOT.war:main" from Service Module Loader]
I'm having trouble running a custom jar on Elastic Map-Reduce
I'm using jdk1.6.0_26, Hadoop 0.20.205, and compiling with Eclipse on my computer and everything works perfectly fine
for example if I ran the following on my computer it would be successful
hadoop jar MaxTemperature.jar input/temperature.txt output
I specified the jar as the following on AWS
s3n://chrishadoop/MaxTemperature.jar
and I specified the arguments as
s3n://chrishadoop/input/temperature.txt s3n://chrishadoop/output
I did not specify the main class because I pointed to it in the manifest
Here is the jar I'm using, I will make it public for a little while
https://s3.amazonaws.com/chrishadoop/MaxTemperature.jar
Here is the error I'm getting
2012-07-08 19:31:39,824 INFO com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Pusher awoke, starting to push data into simpledb...
2012-07-08 19:31:40,552 FATAL com.amazonaws.elasticmapreduce.statepusher.StatePusher (main): Fatal Exception raised while extracting data from hadoop and pushing to simpledb
java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.run(StatePusher.java:65)
at com.amazonaws.elasticmapreduce.statepusher.StatePusher.main(StatePusher.java:205)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 2 more
There is a version of Jackson which is installed as part of the AMI, and I'm guessing you're bundling a different version of Jackson? The error seems to be happening in the support code which makes "enable debugging" work.