简体   繁体   English

找不到Jhipster Prod构建失败以及Cloudfoundry错误

[英]Jhipster Prod Build failure along with Cloudfoundry error Not Found

Jhipster prod profile build is getting failed giving access denied error on execution of Jhipster产品概要文件构建失败,在执行以下命令时给出拒绝访问错误

yarn install 纱线安装

It had generated .war in earlier build with dev profile. 它在早期版本中使用开发人员配置文件生成了.war On uploading the .war to cloudfoundry via subgenerator the app status is running. 通过子生成器将.war上传到cloudfoundry时,应用程序状态正在运行。 But, application is not accessible. 但是,应用程序不可访问。

Error on accessing root: 访问root时出错:

Sorry, an error has occurred.
Status: Not Found (Not Found)
Message: Not Found

Maven Build error : Maven构建错误:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\codelab\a2z\dhulai>mvnw -Pprod -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Dhulai 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.13.RELEASE:run (default-cli) > test-compile @ dhulai >>>
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (default-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 23 resources
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 23 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) @ dhulai ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (docker-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-tests) @ dhulai ---
[INFO] argLine set to -javaagent:C:\\Users\\patelri\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.9\\org.jacoco.agent-0.7.9-runtime.jar=destfile=C:\\codelab\\
a2z\\dhulai\\target\\test-results\\coverage\\jacoco\\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- git-commit-id-plugin:2.2.4:revision (default) @ dhulai ---
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.13.RELEASE:build-info (default) @ dhulai ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:yarn (yarn install) @ dhulai ---
[INFO] Running 'yarn install' in C:\codelab\a2z\dhulai
[ERROR] Access is denied.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.581 s
[INFO] Finished at: 2018-08-04T16:50:28+05:30
[INFO] Final Memory: 35M/422M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project dhulai: Failed to run task: 'yarn install' failed. org.ap
ache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]

Configuration file of Jhipster: Jhipster的配置文件:

.yo-rc.json .yo-rc.json

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.np.dhulai",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.14.4",
    "baseName": "dhulai",
    "packageName": "com.np.dhulai",
    "packageFolder": "com/np/dhulai",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "postgresql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "DELETED",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "nl"
    ]
  }
}

Other Details OS : Windows 10 Enterprise 64 bit 其他详细信息操作系统:Windows 10 Enterprise 64位 在此处输入图片说明

[Update 1] Updated pom file to have verbose flag and the stack trace post it suggest [更新1]更新了pom文件以使其具有详细标志,并建议发布堆栈跟踪信息

   [INFO] --- frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) @ dhulai ---
[INFO] Installing node version v10.4.0
[INFO] Copying node binary from C:\Users\patelri\.m2\repository\com\github\eirslett\node\10.4.0\node-10.4.0-win-x64.exe to C:\codelab\a2z\dhulai\node\node.exe
[INFO] Installed node locally.
[INFO] Installing Yarn version v1.9.4
[INFO] Downloading https://github.com/yarnpkg/yarn/releases/download/v1.9.4/yarn-v1.9.4.tar.gz to C:\Users\patelri\.m2\repository\com\github\eirslett\yarn\1.9.4\yarn
-1.9.4.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
Aug 04, 2018 6:21:53 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: has_recent_activity=1; path=/; expires=Sat, 04 Aug 2018 13:51:55 -0000". Invalid 'expires' attribute: Sat, 04 Aug 2018 1
3:51:55 -0000
Aug 04, 2018 6:21:53 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Wed, 04 Aug 2038 12:51:55 -0000; secure; HttpOnly". Invalid 'expires'
attribute: Wed, 04 Aug 2038 12:51:55 -0000
[INFO] Unpacking C:\Users\patelri\.m2\repository\com\github\eirslett\yarn\1.9.4\yarn-1.9.4.tar.gz into C:\codelab\a2z\dhulai\node\yarn
[INFO] Installed Yarn locally.
[INFO] 
[INFO] --- frontend-maven-plugin:1.6:yarn (webpack build dev) @ dhulai ---
[INFO] yarn not inheriting proxy config from Maven
[INFO] Running 'yarn run webpack:build' in C:\codelab\a2z\dhulai
[ERROR] Access is denied.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.223 s
[INFO] Finished at: 2018-08-04T18:22:33+05:30
[INFO] Final Memory: 39M/330M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build dev) on project dhulai: Failed to run task: 'yarn run webpack:build'
 failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

However, if I independently execute yarn run webpack:build it has no issue with the access permission 但是,如果我独立执行yarn run webpack:build ,则访问权限没有问题

I have faced the same problem. 我也遇到过同样的问题。 Try to change node.version and yarn.version both to lower version in your pom.xml (May be to the version that was install on your computer when generating the project). 尝试将pom.xml中的node.versionyarn.version都更改为较低版本(可能是生成项目时计算机上安装的版本)。 I'm not your about what is going wrong, but this worked for me. 我不是您的问题所在,但这对我有用。 Hope It will help 希望对你有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM