Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

these old frameworks don't exist any longer and are giving error while running ! #6

Open
ashu-89 opened this issue Dec 1, 2018 · 5 comments

Comments

@ashu-89
Copy link

ashu-89 commented Dec 1, 2018

Hi All, @cfaddict ,

I'm getting the following errors while running from freshly installed Intellij Idea community edition.

Error:(5, 1) java: package org.springframework does not exist
Error:(12, 2) java: cannot find symbol
symbol: class Service
Error:(17, 10) java: cannot find symbol
symbol: class Autowired
location: class com.therealdanvega.service.AuthorService
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/repository/AuthorRepository.java
Error:(5, 43) java: package org.springframework.data.repository does not exist
Error:(9, 43) java: cannot find symbol
symbol: class CrudRepository
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/domain/Author.java
Error:(3, 25) java: package javax.persistence does not exist
Error:(4, 25) java: package javax.persistence does not exist
Error:(5, 25) java: package javax.persistence does not exist
Error:(7, 2) java: cannot find symbol
symbol: class Entity
Error:(10, 10) java: cannot find symbol
symbol: class Id
location: class com.therealdanvega.domain.Author
Error:(11, 10) java: cannot find symbol
symbol: class GeneratedValue
location: class com.therealdanvega.domain.Author
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/DataLoader.java
Error:(11, 52) java: package org.springframework.beans.factory.annotation does not exist
Error:(12, 38) java: package org.springframework.stereotype does not exist
Error:(19, 2) java: cannot find symbol
symbol: class Component
Error:(25, 10) java: cannot find symbol
symbol: class Autowired
location: class com.therealdanvega.DataLoader
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/repository/PostRepository.java
Error:(5, 43) java: package org.springframework.data.repository does not exist
Error:(6, 38) java: package org.springframework.stereotype does not exist
Error:(11, 41) java: cannot find symbol
symbol: class CrudRepository
Error:(10, 2) java: cannot find symbol
symbol: class Repository
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/domain/Post.java
Error:(6, 25) java: package javax.persistence does not exist
Error:(7, 25) java: package javax.persistence does not exist
Error:(8, 25) java: package javax.persistence does not exist
Error:(9, 25) java: package javax.persistence does not exist
Error:(10, 25) java: package javax.persistence does not exist
Error:(11, 25) java: package javax.persistence does not exist
Error:(12, 25) java: package javax.persistence does not exist
Error:(13, 25) java: package javax.persistence does not exist
Error:(15, 49) java: package com.fasterxml.jackson.databind.annotation does not exist
Error:(19, 2) java: cannot find symbol
symbol: class Entity
Error:(22, 10) java: cannot find symbol
symbol: class Id
location: class com.therealdanvega.domain.Post
Error:(22, 14) java: cannot find symbol
symbol: class GeneratedValue
location: class com.therealdanvega.domain.Post
Error:(26, 10) java: cannot find symbol
symbol: class Column
location: class com.therealdanvega.domain.Post
Error:(29, 10) java: cannot find symbol
symbol: class Column
location: class com.therealdanvega.domain.Post
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/interceptor/BaseInterceptor.java
Error:(3, 26) java: package javax.servlet.http does not exist
Error:(4, 26) java: package javax.servlet.http does not exist
Error:(6, 38) java: package org.springframework.web.method does not exist
Error:(7, 39) java: package org.springframework.web.servlet does not exist
Error:(8, 47) java: package org.springframework.web.servlet.handler does not exist
Error:(10, 38) java: cannot find symbol
symbol: class HandlerInterceptorAdapter
Error:(12, 32) java: cannot find symbol
symbol: class HttpServletRequest
location: class com.therealdanvega.interceptor.BaseInterceptor
Error:(12, 60) java: cannot find symbol
symbol: class HttpServletResponse
location: class com.therealdanvega.interceptor.BaseInterceptor
Error:(12, 106) java: cannot find symbol
symbol: class ModelAndView
location: class com.therealdanvega.interceptor.BaseInterceptor
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/controller/AuthorController.java
Error:(3, 52) java: package org.springframework.beans.factory.annotation does not exist
Error:(4, 38) java: package org.springframework.stereotype does not exist
Error:(5, 30) java: package org.springframework.ui does not exist
Error:(6, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(10, 2) java: cannot find symbol
symbol: class Controller
Error:(11, 2) java: cannot find symbol
symbol: class RequestMapping
Error:(23, 28) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.AuthorController
Error:(29, 28) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.AuthorController
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/Application.java
Error:(3, 32) java: package org.springframework.boot does not exist
Error:(4, 46) java: package org.springframework.boot.autoconfigure does not exist
Error:(6, 2) java: cannot find symbol
symbol: class SpringBootApplication
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/config/WebConfig.java
Error:(3, 46) java: package org.springframework.context.annotation does not exist
Error:(4, 32) java: package org.springframework.core does not exist
Error:(5, 57) java: package org.springframework.web.servlet.config.annotation does not exist
Error:(6, 57) java: package org.springframework.web.servlet.config.annotation does not exist
Error:(7, 57) java: package org.springframework.web.servlet.config.annotation does not exist
Error:(12, 32) java: cannot find symbol
symbol: class WebMvcConfigurerAdapter
Error:(11, 2) java: cannot find symbol
symbol: class Configuration
Error:(15, 40) java: cannot find symbol
symbol: class ViewControllerRegistry
location: class com.therealdanvega.config.WebConfig
Error:(22, 37) java: cannot find symbol
symbol: class InterceptorRegistry
location: class com.therealdanvega.config.WebConfig
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/controller/HomeController.java
Error:(3, 52) java: package org.springframework.beans.factory.annotation does not exist
Error:(4, 38) java: package org.springframework.stereotype does not exist
Error:(5, 30) java: package org.springframework.ui does not exist
Error:(6, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(10, 2) java: cannot find symbol
symbol: class Controller
Error:(21, 28) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.HomeController
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/PostService.java
Error:(5, 52) java: package org.springframework.beans.factory.annotation does not exist
Error:(6, 38) java: package org.springframework.stereotype does not exist
Error:(11, 2) java: cannot find symbol
symbol: class Service
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/json/JsonDateSerializer.java
Error:(7, 34) java: package com.fasterxml.jackson.core does not exist
Error:(8, 34) java: package com.fasterxml.jackson.core does not exist
Error:(9, 38) java: package com.fasterxml.jackson.databind does not exist
Error:(10, 38) java: package com.fasterxml.jackson.databind does not exist
Error:(12, 41) java: cannot find symbol
symbol: class JsonSerializer
Error:(17, 38) java: cannot find symbol
symbol: class JsonGenerator
location: class com.therealdanvega.json.JsonDateSerializer
Error:(17, 57) java: cannot find symbol
symbol: class SerializerProvider
location: class com.therealdanvega.json.JsonDateSerializer
Error:(18, 33) java: cannot find symbol
symbol: class JsonProcessingException
location: class com.therealdanvega.json.JsonDateSerializer
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/controller/PostController.java
Error:(3, 52) java: package org.springframework.beans.factory.annotation does not exist
Error:(4, 38) java: package org.springframework.stereotype does not exist
Error:(5, 30) java: package org.springframework.ui does not exist
Error:(6, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(7, 47) java: package org.springframework.web.bind.annotation does not exist
Error:(11, 2) java: cannot find symbol
symbol: class Controller
Error:(12, 2) java: cannot find symbol
symbol: class RequestMapping
Error:(24, 28) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.PostController
Error:(30, 69) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.PostController
Error:(36, 67) java: cannot find symbol
symbol: class Model
location: class com.therealdanvega.controller.PostController
/home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/config/SecurityConfig.java
Error:(3, 55) java: package org.springframework.boot.autoconfigure.security does not exist
Error:(4, 46) java: package org.springframework.context.annotation does not exist
Error:(5, 43) java: package org.springframework.core.annotation does not exist
Error:(6, 75) java: package org.springframework.security.config.annotation.method.configuration does not exist
Error:(7, 67) java: package org.springframework.security.config.annotation.web.builders does not exist
Error:(8, 72) java: package org.springframework.security.config.annotation.web.configuration does not exist
Error:(13, 37) java: cannot find symbol
symbol: class WebSecurityConfigurerAdapter
Error:(10, 2) java: cannot find symbol
symbol: class Configuration
Error:(11, 2) java: cannot find symbol
symbol: class EnableGlobalMethodSecurity
Error:(12, 2) java: cannot find symbol
symbol: class Order
Error:(16, 34) java: cannot find symbol
symbol: class HttpSecurity
location: class com.therealdanvega.config.SecurityConfig

@ashu-89
Copy link
Author

ashu-89 commented Dec 1, 2018

Hi @cfaddict / All,

I'm getting this error in ECLIPSE IDE after importing as existing maven project in eclipse from the local repository that I cloned from this git.
I'm only posting the last part, instead of entire list of errors.
If needed I can also paste that here, or below.


[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:55 min
[INFO] Finished at: 2018-12-01T20:05:19+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project crud-start: Could not resolve dependencies for project com.therealdanvega:crud-start:jar:0.0.1-SNAPSHOT: Could not transfer artifact org.aspectj:aspectjweaver:jar:1.8.7 from/to central (https://repo.maven.apache.org/maven2): /home/ashu/.m2/repository/org/aspectj/aspectjweaver/1.8.7/aether-90e8d34b-f3e4-4c28-8c47-708742180098-aspectjweaver-1.8.7.jar-in-progress (No such file or directory) -> [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]
[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/DependencyResolutionException

@ashu-89
Copy link
Author

ashu-89 commented Dec 1, 2018

however, i can see that download sources and javadoc progress bar is showing now as 30% only.
At the time I ran this as maven build with goal spring-boot:run, it was even lesser.
So, I'll wait for sometime till it becomes 100 and try again !

@ashu-89
Copy link
Author

ashu-89 commented Dec 1, 2018

@cfaddict

So, in eclipse after 100% download of sources and java doc it is giving the following error:

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< com.therealdanvega:crud-start >--------------------
[INFO] Building crud-start 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.3.1.RELEASE:run (default-cli) > test-compile @ crud-start >>>
[WARNING] The POM for com.fasterxml:classmate:jar:1.1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.thymeleaf:thymeleaf-spring4:jar:2.1.4.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ crud-start ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ crud-start ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /home/ashu/spring-boot-intro/crud/initial/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading /home/ashu/.m2/repository/org/aspectj/aspectjweaver/1.8.7/aspectjweaver-1.8.7.jar; invalid LOC header (bad signature)
[ERROR] error reading /home/ashu/.m2/repository/org/hibernate/hibernate-core/4.3.11.Final/hibernate-core-4.3.11.Final.jar; invalid LOC header (bad signature)
[ERROR] error reading /home/ashu/.m2/repository/org/codehaus/groovy/groovy/2.4.4/groovy-2.4.4.jar; invalid LOC header (bad signature)
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[5,27] cannot find symbol
symbol: class boot
location: package org.springframework
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[12,2] cannot find symbol
symbol: class Service
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[17,10] cannot find symbol
symbol: class Autowired
location: class com.therealdanvega.service.AuthorService
[INFO] 6 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.940 s
[INFO] Finished at: 2018-12-01T20:13:55+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project crud-start: Compilation failure: Compilation failure:
[ERROR] error reading /home/ashu/.m2/repository/org/aspectj/aspectjweaver/1.8.7/aspectjweaver-1.8.7.jar; invalid LOC header (bad signature)
[ERROR] error reading /home/ashu/.m2/repository/org/hibernate/hibernate-core/4.3.11.Final/hibernate-core-4.3.11.Final.jar; invalid LOC header (bad signature)
[ERROR] error reading /home/ashu/.m2/repository/org/codehaus/groovy/groovy/2.4.4/groovy-2.4.4.jar; invalid LOC header (bad signature)
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[5,27] cannot find symbol
[ERROR] symbol: class boot
[ERROR] location: package org.springframework
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[12,2] cannot find symbol
[ERROR] symbol: class Service
[ERROR] /home/ashu/spring-boot-intro/crud/initial/src/main/java/com/therealdanvega/service/AuthorService.java:[17,10] cannot find symbol
[ERROR] symbol: class Autowired
[ERROR] location: class com.therealdanvega.service.AuthorService
[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]
[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/MojoFailureException

Could you please help asap ?
Thanks and Regards,
Ashutosh Pathak

@drormik
Copy link

drormik commented Jan 19, 2019

you might be using a new version of spring boot - with code that is based on old version of spring boot
or that you didn't import the spring boot libraries at all (use maven)

try creating a new spring project (using spring boot starter), and check out the maven dependencies on it. then go to your existing project and check if those spring boot dependencies are on it.

@Hexman768
Copy link

The issue may be that you are missing the spring boot data jpa dependency, add that and see if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants