When i create my spring Boot starter project im getting error as maven configuration problem. Please help me to solve.
enter image description here
Similar Bug was reported in eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=547340
You can fix this by temporary downgrading the maven jar plugin version to 3.1.1 from 3.1.2. Add this to the properties section:
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
In your pom.xml
<properties>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
Update: A fix has been released. Click Help > Check for updates in Eclipse/STS and install the newest m2e connector.
Related
I am new to the Mulesoft and Java. We have a Mule application in Mule 3.9.1, jdk8 and Maven 3.8.4. I am getting below errors could you please help to resolve the Anypoint Studio setup issues.
The import com.xom.dm.mulesoft.AbstractInputTransformer cannot be resolved
The method getFunctionalMap(String) of type PlannerGroupsInputTransformer must override a superclass method
Unable to find type 'org.mule.module.apikit.exception.NotFoundException'
<modelVersion>4.0.0</modelVersion>
<groupId>com.xom.dm.project</groupId>
<artifactId>dm-10-notifications</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<mule.version>3.9.1</mule.version>
<mule.tools.version>1.2</mule.tools.version>
<munit.version>1.3.8</munit.version>
<mule.munit.support.version>3.9.1</mule.munit.support.version>
<service.instance>${instance}</service.instance>
</properties>
I have tried changing build path and jre libraries... nothing works.
Probably the project is not correctly configured to build with Anypoint Studio 6 built-in Maven support. That you are trying to configure manually the build path is a tip that something is wrong for a Maven based project. Studio should configure the build path automatically from the pom. You must not change it manually. Read the documentation pages for that feature that I shared above and all its child pages to learn how to use a Maven project correctly in Studio 6.
I want to upgrade the Spring Framework version from 4.0.5.RELEASE to 5.3.20 using Maven.
The versions in my pom.xml is
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java-version>1.8</java-version>
<org.springframework-version>4.0.5.RELEASE</org.springframework-version>
<org.springframework-security-version>3.2.5.RELEASE</org.springframework-security-version>
<org.apache.tiles-version>3.0.4</org.apache.tiles-version>
<org.hibernate-version>4.2.15.Final</org.hibernate-version><!-- 4.3.5.Final -->
<org.aspectj-version>1.6.10</org.aspectj-version>
<org.slf4j-version>1.7.7</org.slf4j-version>
<jackson.version>1.9.10</jackson.version>
</properties>
Can anybody help me in which all files I have to make changes.
Do I need to change other versions also in pom.xml to make it compatible with the new Spring version?
PS - I am new to Spring Framework. Would really appreciate any help.
I am trying to deploy my application to Heroku, but I'm geting this message all the time. When I run it in IntelliJ the application is working.
The application is written in Spring Boot.
What could be the cause of this error?
Here is my pom.xml
I think the problem is due to a mismatch of the Java version in your project's pom.xml file and that being used by Heroku.
A simple solution could be either specify your target version in pom.xml or configure the Java version in Heroku. You can add the following code below <description> in your pom.xml file to specify your target version.
<properties>
<java.version>1.8</java.version>
</properties>
I have a maven project in IntelliJ IDEA;
When I run the test using mvn test everything is fine, but when I use
the green arrow on IntelliJ IDEA I got this error: Error:java: release version 5 not supported
Go to: File->Project structure->Project and configure Project SDK to 1.8
It is a common error in IntelliJ.
Try adding
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
to your POM file.
Or:
update Java Compiler
update SDK version
I have a strange issue and that I have not been able to resolve. I am trying to use the sample JPA sprint boot (v0.5.0-M6) project as a starting point for an application I am writing. I grabbed the JPA sample and got that to run locally. I then proceeded to add my code into that project. I imported into eclipse and run as spring-boot. Then I get this error:
Exception in thread "main" java.lang.IllegalAccessError: tried to access class org.springframework.core.io.DefaultResourceLoader$ClassPathContextResource from class org.springframework.boot.context.embedded.EmbeddedWebApplicationContext
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getResourceByPath(EmbeddedWebApplicationContext.java:386)
at org.springframework.core.io.DefaultResourceLoader.getResource(DefaultResourceLoader.java:100)
at org.springframework.context.support.GenericApplicationContext.getResource(GenericApplicationContext.java:211)
at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.load(ConfigFileApplicationContextInitializer.java:192)
at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.load(ConfigFileApplicationContextInitializer.java:134)
at org.springframework.boot.context.initializer.ConfigFileApplicationContextInitializer.initialize(ConfigFileApplicationContextInitializer.java:121)
at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:403)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:287)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:749)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:738)
From what I can tell, this is the wrong application context, since I am not using XML configuration but annotations to drive the configuration. Spring boot is automatically selecting this one and I need to tell it not to use the above. At least that is what I think I need to do.
I did search here and in the spring.io forums but no one seems to have the same issue.
Question: What drives the selection of an application context with the auto configuration?
What should I be looking at to resolve the above issue? What else do I need to provide to here help debug the auto configuration issue?
TIA,
Scott
I got the same problem.
if you use maven check your pom.xml
remove conflict version in Spring Lib.
<properties>
<hibernate.version>4.2.0.Final</hibernate.version>
<mysql.connector.version>5.1.21</mysql.connector.version>
<spring.version>3.2.2.RELEASE</spring.version>
</properties>
i remove this line
<spring.version>3.2.2.RELEASE</spring.version>
and in maven dependency just
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
Hope this help.
I was facing the same problem, and solved fixing the referencing to the boot-starter-parent pom.
At the pom.xml file I used:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>0.5.0.M6</version>
</parent>
I have some urgent issues to fix now, so I didn't inspected this parent pom to see what's so important here, but I hope this can help you - don't forget to verify the version you're using!