Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Looks like lombok dependencies not added. #1

Open
@shubhamv108

Description

➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) mvn clean install 
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.vipcube.spring:demo-spring-db-read-write-splitting >-------
[INFO] Building The Demo of DB Read/Write Splitting in Spring Boot 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ demo-spring-db-read-write-splitting ---
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.7.9:build-info (default) @ demo-spring-db-read-write-splitting ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo-spring-db-read-write-splitting ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo-spring-db-read-write-splitting ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/service/impl/AppUserServiceImpl.java:[15,37] variable repository not initialized in the default constructor
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[75,17] cannot find symbol
 symbol: variable log
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.904 s
[INFO] Finished at: 2025年01月19日T23:00:06+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project demo-spring-db-read-write-splitting: Compilation failure: Compilation failure: 
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/service/impl/AppUserServiceImpl.java:[15,37] variable repository not initialized in the default constructor
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[75,17] cannot find symbol
[ERROR] symbol: variable log
[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
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.vipcube.spring:demo-spring-db-read-write-splitting >-------
[INFO] Building The Demo of DB Read/Write Splitting in Spring Boot 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ demo-spring-db-read-write-splitting ---
[INFO] Deleting /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.7.9:build-info (default) @ demo-spring-db-read-write-splitting ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo-spring-db-read-write-splitting ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo-spring-db-read-write-splitting ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/service/impl/AppUserServiceImpl.java:[15,37] variable repository not initialized in the default constructor
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.000 s
[INFO] Finished at: 2025年01月19日T23:01:27+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project demo-spring-db-read-write-splitting: Compilation failure
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/service/impl/AppUserServiceImpl.java:[15,37] variable repository not initialized in the default constructor
[ERROR] 
[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
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.vipcube.spring:demo-spring-db-read-write-splitting >-------
[INFO] Building The Demo of DB Read/Write Splitting in Spring Boot 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ demo-spring-db-read-write-splitting ---
[INFO] Deleting /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.7.9:build-info (default) @ demo-spring-db-read-write-splitting ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo-spring-db-read-write-splitting ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo-spring-db-read-write-splitting ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[32,31] variable props not initialized in the default constructor
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.077 s
[INFO] Finished at: 2025年01月19日T23:02:13+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project demo-spring-db-read-write-splitting: Compilation failure
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[32,31] variable props not initialized in the default constructor
[ERROR] 
[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
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ docker stop $(docker ps -a -q)
7860dff60a19
ba7556dee0e6
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ docker rm $(docker ps -a -q)
7860dff60a19
ba7556dee0e6
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ docker-compose up -d
ERROR: 
 Can't find a suitable configuration file in this directory or any
 parent. Are you in the right directory?
 Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
 
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ cd docker 
➜ docker git:(main) ✗ docker-compose up -d
Creating network "database" with driver "bridge"
Pulling postgresql-master (docker.io/bitnami/postgresql:11-debian-10)...
11-debian-10: Pulling from bitnami/postgresql
1df6ad7b73a0: Pulling fs layer
78428d56d224: Pulling fs layer
a17dc2f10ed8: Pull complete
d076b528e106: Pull complete
dffe088a0fd9: Pull complete
4f2f55dc6deb: Pull complete
b09ec4201e5a: Pull complete
2d9a06ce41c2: Pull complete
2e6c22a80030: Pull complete
177e9500c376: Pull complete
49803d67af09: Pull complete
6c0c036a4969: Pull complete
22bb9ba880c5: Pull complete
c0f37051d01b: Pull complete
Digest: sha256:73301ceb7c6c03424ca4863e30002a19c53e134b8b4486e6ca8a9bafe28eecb6
Status: Downloaded newer image for bitnami/postgresql:11-debian-10
Creating docker_postgresql-master_1 ... done
Creating docker_postgresql-slave_1 ... done
➜ docker git:(main) ✗ psql -U postgres
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
 Is the server running locally and accepting connections on that socket?
➜ docker git:(main) ✗ docker ps -a 
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7bca9c4a1d21 bitnami/postgresql:11-debian-10 "/opt/bitnami/script..." 31 seconds ago Up 31 seconds 0.0.0.0:5433->5432/tcp, [::]:5433->5432/tcp docker_postgresql-slave_1
7b8028cf248b bitnami/postgresql:11-debian-10 "/opt/bitnami/script..." 32 seconds ago Up 31 seconds 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp docker_postgresql-master_1
➜ docker git:(main) ✗ psql -U postgres -H localhost -p 5432
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
 Is the server running locally and accepting connections on that socket?
➜ docker git:(main) ✗ psql -U postgres -H localhost -p 5432
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
 Is the server running locally and accepting connections on that socket?
➜ docker git:(main) ✗ psql -U postgres -H localhost -p 5432\
> / 
psql: error: invalid integer value "5432/" for connection option "port"
➜ docker git:(main) ✗ psql -U postgres -H localhost -p 5432 
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
 Is the server running locally and accepting connections on that socket?
➜ docker git:(main) ✗ docker-compose up -d -f docker-compose-proxy.yml
Builds, (re)creates, starts, and attaches to containers for a service.
Unless they are already running, this command also starts any linked services.
The `docker-compose up` command aggregates the output of each container. When
the command exits, all containers are stopped. Running `docker-compose up -d`
starts the containers in the background and leaves them running.
If there are existing containers for a service, and the service's configuration
or image was changed after the container's creation, `docker-compose up` picks
up the changes by stopping and recreating the containers (preserving mounted
volumes). To prevent Compose from picking up changes, use the `--no-recreate`
flag.
If you want to force Compose to stop and recreate all containers, use the
`--force-recreate` flag.
Usage: up [options] [--scale SERVICE=NUM...] [--] [SERVICE...]
Options:
 -d, --detach Detached mode: Run containers in the background,
 print new container names. Incompatible with
 --abort-on-container-exit.
 --no-color Produce monochrome output.
 --quiet-pull Pull without printing progress information
 --no-deps Don't start linked services.
 --force-recreate Recreate containers even if their configuration
 and image haven't changed.
 --always-recreate-deps Recreate dependent containers.
 Incompatible with --no-recreate.
 --no-recreate If containers already exist, don't recreate
 them. Incompatible with --force-recreate and -V.
 --no-build Don't build an image, even if it's missing.
 --no-start Don't start the services after creating them.
 --build Build images before starting containers.
 --abort-on-container-exit Stops all containers if any container was
 stopped. Incompatible with -d.
 --attach-dependencies Attach to dependent containers.
 -t, --timeout TIMEOUT Use this timeout in seconds for container
 shutdown when attached or when containers are
 already running. (default: 10)
 -V, --renew-anon-volumes Recreate anonymous volumes instead of retrieving
 data from the previous containers.
 --remove-orphans Remove containers for services not defined
 in the Compose file.
 --exit-code-from SERVICE Return the exit code of the selected service
 container. Implies --abort-on-container-exit.
 --scale SERVICE=NUM Scale SERVICE to NUM instances. Overrides the
 `scale` setting in the Compose file if present.
 --no-log-prefix Don't print prefix in logs.
➜ docker git:(main) ✗ cd .. 
➜ Demo-SpringBoot-DB-ReadWriteSplitting git:(main) ✗ mvn spring-boot:run -Dspring-boot.run.profiles=direct
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< org.vipcube.spring:demo-spring-db-read-write-splitting >-------
[INFO] Building The Demo of DB Read/Write Splitting in Spring Boot 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> spring-boot-maven-plugin:2.7.9:run (default-cli) > test-compile @ demo-spring-db-read-write-splitting >>>
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.7.9:build-info (default) @ demo-spring-db-read-write-splitting ---
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo-spring-db-read-write-splitting ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo-spring-db-read-write-splitting ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[32,31] variable props not initialized in the default constructor
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.144 s
[INFO] Finished at: 2025年01月19日T23:06:39+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project demo-spring-db-read-write-splitting: Compilation failure
[ERROR] /home/r00t/git/Demo-SpringBoot-DB-ReadWriteSplitting/src/main/java/org/vipcube/spring/demo/config/DataSourceConfig.java:[32,31] variable props not initialized in the default constructor
[ERROR] 
[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

HGow to fix this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /