Hi,

do you really want to work with SNAPSHOT versions? I would prefer to work with releases instead ..

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>

which is available from Central...

So you don't need any definition of repositories in your pom file...if you have just remove them...

Furthermore I see in the screenshots that there are compilation errors...furthermore to drill down to the problem it would be more helpful to test on plain command line...and from within Eclipse etc..


Kind regards
Karl Heinz Marbaise


On 24/06/18 06:02, Karen Goh wrote:
Thanks Jeff.  It is working now.

However, I'd like to know is it possible to change the version to 2.0.3 from 
2.1.0 in maven pom.xml ?

<parent>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>2.0.3.BUILD-SNAPSHOT</version>
</parent>

I have tried to change on the advice of a forum member in Java Range.

But, I keep receiving error message :

Project build error: Non-resolvable parent POM for 
com.Superhi5:SpringBootHi5CRUD:0.0.1-SNAPSHOT: Could not transfer artifact 
org.springframework.boot:spring-
  boot-starter-parent:pom:2.0.3.BUILD-SNAPSHOT from/to spring-snapshots 
(https://repo.spring.io/snapshot): repo.spring.io and 'parent.relativePath' 
points at no local
  POM


I tried various ways like doing mvn clean, mvn purge local repositories, update 
and then sue the below as per stackoverflow suggestion to change the version 
but to no avai.

  
https://books.google.de/books?id=yEqrMNX3LAgC&lpg=PA124&ots=IoIU0MYUp-&dq=huettermann+automatic+releasing&hl=de&pg=PA123#v=onepage&q=huettermann%20automatic%20releasing&f=false

Hope you could let me know how should I go about changing the version without 
all these errros.

Tks & rgds,
Karen


--------------------------------------------
On Fri, 6/22/18, Jeff MAURY <jeffma...@gmail.com> wrote:

  Subject: Re: No compiler is provided in this environment - how to stop this 
error ?
  To: "Maven Users List" <users@maven.apache.org>, "Karen Goh" 
<karenwo...@yahoo.com>
  Date: Friday, June 22, 2018, 7:24 PM
Your JAVA_HOME must point a jdk
  not à jre
Le ven. 22 juin
  2018 à 13:16, Karen Goh <karenwo...@yahoo.com.invalid>
  a
  écrit :
>
  Hi,
  >
  > I have been
  trying to tackle the below error without avail.
  >
  > In my due diligence,
  I have done the necessary checking like making sure
  > that the environment is run on 1.8JDK
  >
  > Please see
  screenshot
  >
  > https://ibb.co/eopTVT
  >
  > https://ibb.co/g2wE4o
  >
  > I got the below when
  I did the following:
  >
  > 1st, I did run maven clean
  > 2nd, I did maven install
  >
  > And the error
  appeared.
  >
  >
  >
  > ---
  maven-resources-plugin:3.0.1:resources (default-resources)
  @
  > SpringBootHi5CRUD ---
  > [INFO] Using 'UTF-8' encoding to
  copy filtered resources.
  > [INFO] Copying
  1 resource
  > [INFO] Copying 0 resource
  > [INFO]
  > [INFO] ---
  maven-compiler-plugin:3.7.0:compile (default-compile) @
  > SpringBootHi5CRUD ---
  >
  [INFO] Changes detected - recompiling the module!
  > [INFO] Compiling 6 source files to
  >
  C:\Users\Karen.Goh\eclipse-workspace\SpringBoothi5\target\classes
  > [INFO]
  -------------------------------------------------------------
  > [ERROR] COMPILATION ERROR :
  > [INFO]
  -------------------------------------------------------------
  > [ERROR] No compiler is provided in this
  environment. Perhaps you are
  > running on
  a JRE rather than a JDK?
  > [INFO] 1
  error
  > [INFO]
  -------------------------------------------------------------
  > [INFO]
  >
  ------------------------------------------------------------------------
  > [INFO] BUILD FAILURE
  >
  [INFO]
  >
  ------------------------------------------------------------------------
  > [INFO] Total time: 16.031 s
  > [INFO] Finished at:
  2018-06-22T18:53:34+08:00
  > [INFO] Final
  Memory: 20M/182M
  > [INFO]
  >
  ------------------------------------------------------------------------
  > [ERROR] Failed to execute goal
  >
  org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
  > (default-compile) on project
  SpringBootHi5CRUD: Compilation failure
  >
  [ERROR] No compiler is provided in this environment. Perhaps
  you are
  > running on a JRE rather than a
  JDK?
  > [ERROR] -> [Help 1]
  > [ERROR]
  > [ERROR] To
  see the full stack trace of the errors, re-run Maven with
  the
  > -e switch.
  >
  [ERROR] Re-run Maven using the -X switch to enable full
  debug logging.
  > [ERROR]
  >
  > If I run using -X
  switch, I get the below error :
  >
  > [ERROR] Failed to execute goal
  >
  org.springframework.boot:spring-boot-maven-plugin:2.1.0.BUILD-SNAPSHOT:run
  > (default-cli) on project
  SpringBootHi5CRUD: An exception occurred while
  > running. null: InvocationTargetException:
  Error creating bean with name
  >
  'articleServiceImpl': Unsatisfied dependency
  expressed through field
  >
  'articleRepository'; nested exception is
  >
  org.springframework.beans.factory.BeanCreationException:
  Error creating
  > bean with name
  'articleRepository': Invocation of init method
  failed;
  > nested exception is
  java.lang.IllegalArgumentException: Not a managed type:
  > class com.StudentRecruit.model.Article
  -> [Help 1]
  >
  org.apache.maven.lifecycle.LifecycleExecutionException:
  Failed to execute
  > goal
  >
  org.springframework.boot:spring-boot-maven-plugin:2.1.0.BUILD-SNAPSHOT:run
  > (default-cli) on project
  SpringBootHi5CRUD: An exception occurred while
  > running. null
  >
     at
  >
  
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
  >         at
  >
  
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  >         at
  >
  
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  >         at
  >
  
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  >         at
  >
  
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  >         at
  >
  
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  >         at
  >
  
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  >         at
  org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  >         at
  org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  >         at
  org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  >         at
  org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  >         at
  org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  >         at
  org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  >         at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)
  >         at
  >
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  >         at
  >
  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  >         at
  java.lang.reflect.Method.invoke(Method.java:498)
  >         at
  >
  
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  >         at
  >
  org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  >         at
  >
  
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  >         at
  >
  org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  > Caused by:
  org.apache.maven.plugin.MojoExecutionException: An
  exception
  > occurred while running.
  null
  >         at
  >
  
org.springframework.boot.maven.AbstractRunMojo$IsolatedThreadGroup.rethrowUncaughtException(AbstractRunMojo.java:525)
  >         at
  >
  org.springframework.boot.maven.RunMojo.runWithMavenJvm(RunMojo.java:97)
  >         at
  >
  org.springframework.boot.maven.AbstractRunMojo.run(AbstractRunMojo.java:249)
  >         at
  >
  
org.springframework.boot.maven.AbstractRunMojo.execute(AbstractRunMojo.java:198)
  >         at
  >
  
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  >         at
  >
  
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  >         ... 20 more
  > Caused by:
  java.lang.reflect.InvocationTargetException
  >         at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native
  Method)
  >         at
  >
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  >         at
  >
  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  >         at
  java.lang.reflect.Method.invoke(Method.java:498)
  >         at
  >
  
org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:557)
  >         at
  java.lang.Thread.run(Thread.java:748)
  >
  Caused by:
  >
  org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error
  > creating bean with name
  'articleServiceImpl': Unsatisfied dependency
  > expressed through field
  'articleRepository'; nested exception is
  >
  org.springframework.beans.factory.BeanCreationException:
  Error creating
  > bean with name
  'articleRepository': Invocation of init method
  failed;
  > nested exception is
  java.lang.IllegalArgumentException: Not a managed type:
  > class com.StudentRecruit.model.Article
  >         at
  >
  
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:587)
  >         at
  >
  
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:91)
  >         at
  >
  
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:373)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
  >         at
  >
  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  >         at
  >
  
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
  >         at
  >
  
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
  >         at
  >
  
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
  >         at
  >
  
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
  >         at
  >
  org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)
  >         at
  >
  
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)
  >         at
  >
  org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
  >         at
  >
  org.springframework.boot.SpringApplication.run(SpringApplication.java:1234)
  >         at
  >
  org.springframework.boot.SpringApplication.run(SpringApplication.java:1222)
  >         at
  >
  
com.StudentRecruit.SpringBoothi5Application.main(SpringBoothi5Application.java:11)
  >         ... 6 more
  > Caused by:
  org.springframework.beans.factory.BeanCreationException:
  Error
  > creating bean with name
  'articleRepository': Invocation of init method
  > failed; nested exception is
  java.lang.IllegalArgumentException: Not a
  > managed type: class
  com.StudentRecruit.model.Article
  >
       at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
  >         at
  >
  
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
  >         at
  >
  
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
  >         at
  >
  
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
  >         at
  >
  
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1065)
  >         at
  >
  
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:584)
  >         ... 25 more
  > Caused by:
  java.lang.IllegalArgumentException: Not a managed type:
  class
  >
  com.StudentRecruit.model.Article
  >
       at
  >
  
org.hibernate.metamodel.internal.MetamodelImpl.managedType(MetamodelImpl.java:473)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.<init>(JpaMetamodelEntityInformation.java:73)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getEntityInformation(JpaEntityInformationSupport.java:66)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:188)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:139)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:123)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:64)
  >         at
  >
  
org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:298)
  >         at
  >
  
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$4(RepositoryFactoryBeanSupport.java:294)
  >         at
  org.springframework.data.util.Lazy.getNullable(Lazy.java:195)
  >         at
  org.springframework.data.util.Lazy.get(Lazy.java:78)
  >         at
  >
  
org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:297)
  >         at
  >
  
org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:112)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767)
  >         at
  >
  
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
  >         ... 35 more
  > [ERROR]
  > [ERROR]
  > [ERROR] For more information about the
  errors and possible solutions,
  > please
  read the following articles:
  > [ERROR]
  [Help 1]
  > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to