Giter VIP home page Giter VIP logo

Comments (5)

iuliana avatar iuliana commented on August 19, 2024

Hello Huntw999,

I am sorry you have problems and happy to take a look.

Can you give me more details? Is the editor complaining about a specific problem?

Cheers!

from pro-spring-5.

huntw999 avatar huntw999 commented on August 19, 2024

after download and import into intellij the build works fine no errors

when i try to run anything in any module in intellij it is unable to find the spring classes and some of the supporting classes

main112 would have error when i ran with intellij the class as an application

/Users/williamhunt/All DownLoadsForDevelopment Books/pro-spring-5/chapter06/plain-jdbc/src/main/java/com/apress/prospring5/ch6/PlainJdbcDemo.java
Error:(6, 17) java: package org.slf4j does not exist
Error:(7, 17) java: package org.slf4j does not exist
Error:(15, 20) java: cannot find symbol
symbol: class Logger
location: class com.apress.prospring5.ch6.PlainJdbcDemo
Error:(15, 36) java: cannot find symbol
symbol: variable LoggerFactory
location: class com.apress.prospring5.ch6.PlainJdbcDemo

this error occurred even though the org.slf4j was in the gradle dependency

the help with intellij would as me if i wanted to add to class path which leads me to believe it is not in class path

these errors show up when i create a run application and execute it

after running intellij has trouble finding class it should find

any thoughts?

from pro-spring-5.

huntw999 avatar huntw999 commented on August 19, 2024

after import - if i view most classes it will tell me it can't find classes that are in the dependency

from pro-spring-5.

iuliana avatar iuliana commented on August 19, 2024

Hello William,

In the README.adoc document it is mentioned that you need Gradle 5.x and JDK 8. Considering how old this project is and that is definitely not compatible to Gradle 6, stick to Gradle 5.0.

Make sure IntelliJ knows too that it must compile ad run the project with Java 8 and Gradle 5. Check the Gradle view and configure it to point to the Gradle version you want. And in the IntelliJ menu, go to Project Structure and set Project SDK and Project language Level to 8.

I re-cloned it and build it from scratch, to try to catch any missing libraries.
I've modified the code and added a bunch of @ignore to tests that can't be run without a database or a server. This will allow for the project to fully build and execute most of the tests when doing gradle clean build

master > gradle --version


Gradle 5.0

Build time: 2018-11-26 11:48:43 UTC
Revision: 7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987

Kotlin DSL: 1.0.4
Kotlin: 1.3.10
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_191 (Oracle Corporation 25.191-b12)
OS: Mac OS X 10.15.6 x86_64


master > gradle clean build

This project is a collection of simple code samples. It is meant to be used together with the "Spring Pro, Fifth Edition" published by Apress in order to learn and practice with all Spring Web libraries.

BUILD SUCCESSFUL in 2m 32s
457 actionable tasks: 2 executed, 455 up-to-date

As for the PlainSingerDao the test woud pass if I had a MySQL database locally. Which I don't. And I'm not sure what is wrong with all MySQL docker images, but they all start in --skip-name-resolve mode and ignore my GRANT commands, so I cannot connect to it. And I don't have the time to hunt for a solution for this problem right now.

So, long story short: it works on my computer. Which means the problem is on yours. Check your IntelliJ, there is definitely something wrong with it.

Good luck!
Iuliana

from pro-spring-5.

huntw999 avatar huntw999 commented on August 19, 2024

That is very helpful - it gives me the the feedback i need to move it forward thank you

from pro-spring-5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.