I've followed the AppFuse QuickStart guide with modular and full source options selected. When I issue an
mvn install -Poracle
testUpdateUser throws a ...
.hibernate4.HibernateSystemException: Found shared references to a collection...model.User.roles
I understand that this is because the test code tries this (that's not permitted by Hibernate..)
user2.setRoles(user.getRoles());
What's the proper way to test updateUser, then?
What version of AppFuse are you using? This should be fixed in 3.0.
This is the archetype ... I've used to generate the project ..
.... archetype -DarchetypeVersion=3.0.0
The complete statement (copied from QuickStart..)
mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring-archetype -DarchetypeVersion=3.0.0 -DgroupId=com.mycompany -DartifactId=myproject -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse
Related
I am trying to add Places SDK for android.
I am following the following documentation
https://developers.google.com/places/android-sdk/start and
https://developers.google.com/places/android-sdk/client-migration
Unfortunately i am not able to add dependency "implementation 'com.google.android.libraries.places:places:2.2.0'"
I have gone through following links. But no use. Please help me with this.
Failed to resolve: com.google.android.libraries.places:1.0.0:
Google's new Places Library ( implementation 'com.google.android.libraries.places:1.0.0') not resolving
Finally i found solution to my issue.
I solved it by installing the compatibility library.
Followed this. https://developers.google.com/places/android-sdk/client-migration
Following two steps resolved my issue.
Copy the contents of places_compat_compatify.sh, and save as a file to your local computer.
Use the following command to run the compatibility script
./places_compat_compatify.sh 2.1.0
After this, I could run my project successfully and could Place API.
Thanks
For my android project I upgraded play-services-auth library version from 15.0.0 to 16.0.1
Since then I see following error during the build and it also produces
ajcore files
I have removed my .gradle caches and done build and still see this error.
Anybody else seen this before, how do I fix it?
java.lang.IllegalStateException: Expecting .,<, or ;, but found authapi while unpacking Lcom/google/android/gms/common/api/internal/BaseImplementation$ApiMethodImpl;
at org.aspectj.util.GenericSignatureParser.parseClassTypeSignature(GenericSignatureParser.java:204)
at org.aspectj.util.GenericSignatureParser.parseFieldTypeSignature(GenericSignatureParser.java:155)
at org.aspectj.util.GenericSignatureParser.parseTypeArgument(GenericSignatureParser.java:267)
In my case, removing the Hugo logging plugin fixed the issue.
Check in your gradle file if you have it configured.
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
It happens because some plugin (added by you) use libs:
org.aspectj:aspectjtools
or
org.aspectj:aspectjrt for codegeneration
I cloned optaplanner's repository.
I imported the top-level pom.xml in IntelliJ IDEA.
Then I tried to run org.optaplanner.examples.cloudbalancing.app.CloudBalancingHelloWorld.
I get the following error: Error:osgi: [optaplanner-core] Unexpected build error
The doc says the maven integration will take care of the rest, so I guess I am missing something.
Question 1: Can I somewhat configure IDEA (or use the CLI) to show more verbose errors, so that I can debug it? Unexpected build error is not enough information for me to figure that problem out.
Question 2: How can I fix this error?
FYI, this box is running Ubuntu 18.04 (edit: exact same issue on Fedora 28). My maven version is as follows.
$ mvn --version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-25T04:49:05+09:00)
Maven home: /opt/apache-maven-3.5.3
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-32-generic", arch: "amd64", family: "unix"
EDIT: IntelliJ version: 2018.2.1
Run configuration:
You should disable the Osmorc plugin in IDEA. After thay the project will normally build
Intellij IDEA's OSGI plugin chould not recongnized properties like parsedVersion.*, which was generate by org.codehaus.mojo:build-helper-maven-plugin added in parent project org.kie:kie-parent.
You should disable the OSGI plugin, or add following code to /pom.xml manually.
<properties>
...
<parsedVersion.majorVersion>7</parsedVersion.majorVersion>
<parsedVersion.minorVersion>28</parsedVersion.minorVersion>
<parsedVersion.incrementalVersion>0</parsedVersion.incrementalVersion>
</properties>
Drools and jbpm has the same issue, because they also use org.kie:kie-parent as parent project. It could be sloved by the same way.
i meet the same problem,and solve it later.
first,remove the osgi module in Project Structure->Facets .
then, change the Run/Debug Configurations as the project README.adoc said.
after all ,i can run it successfully.
Every time I encounter this exception in IntelliJ, I fix it trivially and forget the fix easily.
Code:
package whatever;
import org.junit.Test;
public class TestClass
{
#Test
void test() {}
}
Scenario:
Add new TestClass.
Right-click TestClass.
Select "Run 'TestClass'" to run test cases.
The "Messages Build" pane shows:
Information:javac 9-ea was used to compile java sources
Information:Module "dummy" was fully rebuilt due to project configuration/dependencies changes
Information:8/16/17 11:35 PM - Compilation completed with 1 error and 0 warnings in 1s 663ms
Error:java: java.lang.ExceptionInInitializerError
What can possibly go wrong?
What are the likely issues in this simple scenario?
IntelliJ: COMMUNITY 2017.1 (idea-IC-171.4424.56)
To fix the issue, I do:
File -> Project Structure... -> Project Settings / Project -> Project SDK.
Change from "9-ea" to "1.8".
DETAILS
Apparently, the issue is discrepancies in selected JDK-s to build (java 9) and run (java 8).
I'm not sure how "9-ea" gets re-selected there for the same project - neither IntelliJ itself runs in "9-ea" JRE (according to Help -> About) nor JAVA_HOME env var is set to it nor other possible settings (like Maven -> Runner) suggest any "9-ea".
I also didn't manage to run the test under the same JDK (java 9) which it gets compiled under. However, it's unclear what JDK tests are run under because IntelliJ reports only about JDK for compilation.
If you use Lombok: For me it was a solution to set the newest version for my maven lombok dependency in the pom.xml.
*<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>1.18.8</version>
</dependency>*
I was facing same error when i tried to run my application in IntelliJ-2019.2 version. Below are the steps i followed to resolve this issue.
Versions:
IntelliJ : IDEA-IntelliJ-2019.2
Java : jdk1.8_221
Go to below path in IntelliJ
File -> Project Structure -> Project -> Project SDK -> (select java version which you want to use )
(In my case under 'project SDK' java-11 was selected, I changed it to 'java8')
Click on 'Apply' and then 'OK'.
I feel I ran into this issue because IntelliJ was trying to compile my java classes using in-built java-11 whereas my java classes are built on java-8. So when i explicitly configured java-8 in IntelliJ, It worked!! Hope this helps.
I started seeing this exception once I installed Java 11 in my machine. JAVA_HOME was by default pointing to Java 11 and my project was still in Java 8. Changing JAVA_HOME to Java 8 jdk fixed the issue for me.
If you have multiple projects each running on a different JDK, use this command to temporarily change the Java version per command.
JAVA_HOME=/path/to/JVM/jdk/Home mvn clean install
If you have recently updated your IDE then you can try these steps.
Delete .idea directory for the idea project/workspace
Then go to File -> Invalidate Caches / Restart...
Once Idea is restarted re-add/import your module(s)
I faced a similar issue with JARs and Jena (while run from IntelliJ it works).
I was using Apache Jena v4.0.0 in my project and have built a JAR (with a main class for the JAR to act as a console app).
The JAR builts successfully with IntelliJ but when run throws java.lang.ExceptionInInitializerError ... Caused by: java.lang.NullPointerException. NPE suggests that something was not initialized properly.
The jar built with previous version Jena 3.17.0 works perfectly.
What I did to fix it
I've opened both the JARs, compared their META-INF folders and encountered the difference in
my.jar\META-INF\services\org.apache.jena.sys.JenaSubsystemLifecycle
The new version (jena v4.0.0) contains only one line:
org.apache.jena.tdb.sys.InitTDB
The old version (jena v3.17.0) contains two different lines:
org.apache.jena.riot.system.InitRIOT
org.apache.jena.sparql.system.InitARQ
I've added the old two lines to the file and repacked new JAR with it:
org.apache.jena.tdb.sys.InitTDB
org.apache.jena.riot.system.InitRIOT
org.apache.jena.sparql.system.InitARQ
It resolved my issue.
Update: recent Jena v4.4.0 builts with the same "bug".
I'm not an expert and there is probably a better way than patching a JAR by hand.
But I still hope that this solution will help someone like me.
Recently I tried to run Database Migration Plugin with Grails 3.0.11. The problem is when I run $grails dbm-generate-gorm-changelog changelog.groovy or $grails dbm-generate-changelog changelog.groovy I get the following error:
Error occurred running Grails CLI: Task 'dbmGenerateChangelog' not found in root project
I belive it's a simple problem. What am I missing? How can I make it work?
Thank you in advance!
I think you are missing the dependency from the buildscript -block on your build.gradle file. The commands has been changed to gradle tasks.
https://github.com/grails-plugins/grails-database-migration