-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Package org.springframework.dao does not exist when building gateway using maven #12827
Comments
Thanks for the report, this bug occurs when there is no database. As a quick workaround, you can edit ExceptionTranslator.java and remove the DataAccessException import and the block that uses it.
I will submit a pull request. |
gmarziou
added a commit
to gmarziou/generator-jhipster
that referenced
this issue
Oct 23, 2020
5 tasks
gmarziou
added a commit
to gmarziou/generator-jhipster
that referenced
this issue
Oct 23, 2020
gmarziou
added a commit
to gmarziou/generator-jhipster
that referenced
this issue
Oct 23, 2020
fixed by #12829 |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview of the issue
When I tried to build gateway application using maven, failed to compile.
The stack trace is below:
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions (MojoExecutor.java:355)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
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.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/home/jason/Desktop/platform/gateway/src/main/java/com/buaa/edu/web/rest/errors/ExceptionTranslator.java:[8,31] package org.springframework.dao does not exist
Motivation for or Use Case
In IDE, it says "Cannot resolve dao". So i think there is something wrong with the dependencies where dao is missing.
I don't know where went wrong that result in bugs in the pom.xml but that's where I think caused the problem.
Reproduce the error
I first generated a uaa application, then used it as the authentication method for the gateway.
The .yo-rc.json file is below:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.buaa.edu"
},
"jhipsterVersion": "6.10.4",
"applicationType": "gateway",
"baseName": "gateway",
"packageName": "com.buaa.edu",
"packageFolder": "com/buaa/edu",
"serverPort": "8080",
"authenticationType": "uaa",
"uaaBaseName": "uaa",
"cacheProvider": "hazelcast",
"enableHibernateCache": false,
"websocket": "spring-websocket",
"databaseType": "no",
"devDatabaseType": "no",
"prodDatabaseType": "no",
"searchEngine": false,
"messageBroker": "kafka",
"serviceDiscoveryType": "consul",
"buildTool": "maven",
"enableSwaggerCodegen": true,
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "angularX",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1603459081256,
"testFrameworks": ["gatling", "cucumber", "protractor"],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false,
"blueprints": []
}
}
Environment and Tools:
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
git version 2.17.1
node: v12.19.0
npm: 6.14.8
yarn: 1.12.3
Docker version 19.03.9, build 9d988398e7
docker-compose version 1.27.4, build 40524192
Related issues
The text was updated successfully, but these errors were encountered: