pact-jvm-provider-maven_2.11 works with Java8, but not Java7. Getting the following error
[ERROR] Failed to execute goal au.com.dius:pact-jvm-provider-maven_2.11:3.5.0:verify (default-cli) on project product-xapi-service: Execution default-cli of goal au.com.dius:pact-jvm-provider-maven_2.11:3.5.0:verify failed: Unable to load the mojo 'verify' in the plugin 'au.com.dius:pact-jvm-provider-maven_2.11:3.5.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: au/com/dius/pact/provider/maven/PactProviderMojo : Unsupported major.minor version 52.0
I don't see the mention of requirement of Java 8 as well. Does it support Java 7 at all?
Actually, i find the documentation specifying the versions here https://github.com/DiUS/pact-jvm. Thanks.
Related
I tried to follow the follow tutorial:
https://www.lagomframework.com/documentation/1.4.x/java/GettingStartedSbt.html
For generating the project scaffolding, I want to use the following template:
sbt new lagom/lagom-java.g8
But already receive the following error:
[error] org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
A bit frustrating at such early stage in the tutorial...
Any idea how to fix this?
Edit: the error is caused by:
[error] Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: https//github.com/lagom/lagom-java.g8.git: not found.
Seems there is a :missing after https. How to fix?
Verify you have the prerequisites. Prerequisites documented here https://www.lagomframework.com/documentation/1.4.x/java/JavaPrereqs.html
I just followed the instructions and was unable to reproduce the error from the CLI using sbt version 1.1.1.
What version of sbt are you using?
I am having trouble at getting the example "QuickJournal" to compile on iOS. The code compiles OK, but fails during the Fody step.
Goals
Try out the example application for .NET through the following
- Pull the repository
- Open the solution in examples/QuickJournal
- Compile and test
Expected Results
Smooth compilation & testing experience
Actual Results
Fody out of memory exception
Steps to Reproduce
See the setup, follow steps
I am using the latest Xamarin/Visual Studio Mac/XCode
Code Sample
The regular realm source code
Version of Realm and Tooling
git clone https://github.com/realm/realm-dotnet.git
git checkout 8f5e36ffd91e06b9c60b91f9de3fb312b411a4a4
The exception I am getting is
Fody: Found debug symbols at '~/realm-dotnet/examples/QuickJournal/QuickJournal/obj/Debug/QuickJournal.pdb'.
MSBUILD : error : Fody: An unhandled exception occurred:
MSBUILD : error : Exception:
MSBUILD : error : Out of memory
MSBUILD : error : StackTrace:
MSBUILD : error : at (wrapper alloc) System.Object:AllocVector (intptr,intptr)
MSBUILD : error : at Microsoft.Cci.Pdb.MsfDirectory..ctor (Microsoft.Cci.Pdb.PdbReader reader,
See log file
RealmCompilelog.txt
Realm 1.2.1 addresses that by using an updated version of Fody.
Answer for older Realm versions:
This is caused by a Cecil bug with Mono 5.0. As Realm depends on Fody, which uses Cecil, compilation will fail for project referencing it. Until new Cecil and Fody versions are released, the workaround is to revert to Mono 4.8:
When i add to apache-karaf-3.0.3\etc\system.properties the property karaf.lock.level=50
the following exception is thrown:
java.lang.RuntimeException: Error installing bundle listed in startup.properties with url: mvn:org.ops4j.pax.url/pax-url-aether/2.3.0 and startlevel: 5
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:392)
at org.apache.karaf.main.Main.launch(Main.java:245)
at org.apache.karaf.main.Main.main(Main.java:167)
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle org.ops4j.pax.url.mvn [1]: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.6.0)(!(version>=2.0.0)))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
at org.apache.karaf.main.Main.installAndStartBundles(Main.java:389)
... 2 more
same result when configuring the failover mechanism as described in the documentation. http://karaf.apache.org/manual/latest/users-guide/failover.html
karaf.lock=true
karaf.lock.class=org.apache.karaf.main.lock.DefaultJDBCLock
karaf.lock.level=50
karaf.lock.delay=10
karaf.lock.jdbc.url=jdbc:mysql://localhost/something
karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
karaf.lock.jdbc.user=aUser
karaf.lock.jdbc.password=aUnsecurePassword
karaf.lock.jdbc.table=KARAF_LOCK
karaf.lock.jdbc.clustername=karaf
karaf.lock.jdbc.timeout=30
the driver is dropped to apache-karaf-3.0.3\lib\ext
when karaf.lock.level is removed or set to greater than 0 and lower than 5 it seems to work.
when i set the same lock.level.property to 50 in a 2.3.3 installation of karaf everything seems to work just fine.
does anyone know what changed there from 3.x.x to 2.3.3 or what could cause the problem.
best regards and thank you for your time :D
I have an SBT build for a project that requires Java 8 and I have also included some Java 8 features (mainly java.time package elements) in the build itself. If I attempt to build the project on an earlier JVM (such as 1.7), I get a whole load of errors and exceptions when I run the sbt command.
So, I decided to add an initialize property to detect the JVM in use and terminate the build with an elegant message if the JVM in use wasn't at least version 8. Of course, this only works if I use it to build the builder (if I put it in ./build.sbt, then I still get errors if using JVM 1.7 or earlier because the java.time elements are not present). So I have a ./project/build.sbt file that contains the following:
initialize := {
val _ = initialize.value
if (!scala.util.Properties.isJavaAtLeast ("1.8")) {
sys.error ("My project requires Java 8 or later")
}
}
This works, but rather inelegantly. If I run sbt with Java 7, then I get the following output from the build:
java.lang.RuntimeException: My project requires Java 8 or later
at scala.sys.package$.error(package.scala:27)
at $ed9be51e9ab4a59b3b3b$$anonfun$$sbtdef$1.apply(C:\Users\me\Documents\src\myproject\project\build.sbt:55)
at $ed9be51e9ab4a59b3b3b$$anonfun$$sbtdef$1.apply(C:\Users\me\Documents\src\myproject\project\build.sbt:47)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.EvaluateSettings$MixedNode.evaluate0(INode.scala:177)
at sbt.EvaluateSettings$INode.evaluate(INode.scala:135)
at sbt.EvaluateSettings$$anonfun$sbt$EvaluateSettings$$submitEvaluate$1.apply$mcV$sp(INode.scala:67)
at sbt.EvaluateSettings.sbt$EvaluateSettings$$run0(INode.scala:76)
at sbt.EvaluateSettings$$anon$3.run(INode.scala:72)
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:744)
[error] My project requires Java 8 or later
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
If I place the same code in an empty ./build.sbt file, and run using Java 7 then I simply get:
[error] My project requires Java 8 or later
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
That is, I don't get the exception message and stack trace.
Is there a way to make the build build exit more elegantly, so that I get output of the latter form rather than the former?
I am getting below error while deploying war file .Here JDK version on development machine and deployment machines is same then also i am getting this error.
[05/Jun/2013:11:20:42] failure ( 5712): WebModule[/cover]: WEB2671: Error configuring application listener of class com.bt.cover.ContextListener
java.lang.UnsupportedClassVersionError: com/bt/cover/ContextListener (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1717)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1431)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1301)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3349)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3743)
at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
Based on this answer: Unsupported major.minor version 49.0, it looks like you may be running on a different JVM from what you used to compile your code. Hope this helps.