I am working macOS Big Sur 11.2.3, with java version "14.0.1" 2020-04-14, node v16.1.0, git version 2.24.3 (Apple Git-128), and maven
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 14.0.1, vendor: N/A, runtime: /usr/local/Cellar/openjdk/14.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_IN, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
I have installed Jhipster with below command and is successfully installed.
sudo npm install -g generator-jhipster
But now when I type the command jhipster to generate the application in a new project folder, I am getting below error. I have no clue what went wrong and how to resolve this. can any one help me on this please.
Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment
at new Errlop (/usr/local/lib/node_modules/generator-jhipster/node_modules/errlop/edition-es5/index.js:61:18)
at Object.errtion (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/util.js:23:14)
at isCompatibleEngines (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:183:19)
at isCompatibleEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:250:10)
at determineEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:287:4)
at determineEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:312:12)
at solicitEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:350:16)
at Object.requirePackage (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:364:9)
at Object.<anonymous> (/usr/local/lib/node_modules/generator-jhipster/node_modules/istextorbinary/index.cjs:4:38)
at Module._compile (node:internal/modules/cjs/loader:1109:14) {
klass: [Function: Errlop] {
create: [Function (anonymous)],
isErrlop: [Function (anonymous)],
ensure: [Function (anonymous)]
},
parent: undefined,
ancestors: [],
orphanStack: 'Error: editions-autoloader-invalid-engines: The edition had no engines to compare against the environment\n' +
' at new Errlop (/usr/local/lib/node_modules/generator-jhipster/node_modules/errlop/edition-es5/index.js:61:18)\n' +
' at Object.errtion (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/util.js:23:14)\n' +
' at isCompatibleEngines (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:183:19)\n' +
' at isCompatibleEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:250:10)\n' +
' at determineEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:287:4)\n' +
' at determineEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:312:12)\n' +
' at solicitEdition (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:350:16)\n' +
' at Object.requirePackage (/usr/local/lib/node_modules/generator-jhipster/node_modules/editions/edition-es5/index.js:364:9)\n' +
' at Object.<anonymous> (/usr/local/lib/node_modules/generator-jhipster/node_modules/istextorbinary/index.cjs:4:38)\n' +
' at Module._compile (node:internal/modules/cjs/loader:1109:14)',
code: 'editions-autoloader-invalid-engines'
}
Always use an LTS 64-bit version of Node as stated in the JHipster doc
Related
I am trying to use Gradle on my Windows machine. The command I want to be able to use is:
gradle init --type java-application
But here is the error I get when I run this command on Powershell (or cmd):
> Task :init FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':init'.
> The requested build type 'java-application' is not supported. Supported types:
- 'basic'
- 'cpp-application'
- 'cpp-library'
- 'groovy-appl²cat²on'
- 'groovy-gradle-plugin'
- 'groovy-l²brary'
- 'java-appl²cat²on'
- 'java-gradle-plugin'
- 'java-l²brary'
- 'kotlin-appl²cat²on'
- 'kotlin-gradle-plugin'
- 'kotlin-l²brary'
- 'pom'
- 'scala-appl²cat²on'
- 'scala-l²brary'
- 'swift-application'
- 'swift-library'
As seen in the output, there is probably an encoding issue here. Because
java-appl²cat²on
is displayed as a possible type.
I used versions 6.9 and 7.0.2 and the results are the same. My system language is Turkish but I also use Git, Maven etc. without any issues.
Here is the output of gradle --version in case it is useful:
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_231 (Oracle Corporation 25.231-b11)
OS: Windows 10 10.0 amd64
Update: Issue #17383 has been fixed and is targeted for Gradle 7.2.
You may hit a bug in Gradle. I was able to reproduce the issue by forcing tr-TR locale in environment variable JAVA_TOOL_OPTIONS. I filed a bug in the Gradle issue tracker to have this checked: Build init plugin is locale sensitive.
As a workaround, you could force English locale for project initialization, in Powershell:
PS> $env:JAVA_TOOL_OPTIONS="-Duser.language=en -Duser.country=US"
PS> gradle.bat init --type java-application
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Groovy) [1..2]
I'm trying to deploy a new version of my app to the path /app-test using the ## notation.
I've set the warFileName in pom.xml to be app-test##2021-01-21-pkix-fix and then called
mvn clean tomcat7:deploy
which generates and builds a .war successfully:
...
[INFO] Generating war /xyz/target/app-test##2021-01-21-pkix-fix.war
[INFO] Building war: /xyz/target/app-test##2021-01-21-pkix-fix.war
As it proceeds to upload the resources, it tries to do so multiple times while adding /deploy?path for the 2nd time. The third attempt makes even less sense:
[INFO] Deploying war to http://mydomain.eu/app-test##2021-01-21-pkix-fix
Uploading: http://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
Uploaded: http://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
Uploading: https://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
Uploaded: https://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
Uploading: https://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
Uploaded: https://mydomain.eu/manager/text/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix/deploy?path=%2Fapp-test%23%232021-01-21-pkix-fix
The deployment then fails:
FAIL - Failed to deploy application at context path /app-test##2021-01-21-pkix-fix/deploy?path=/app-test##2021-01-21-pkix-fix
because paths must not contain the = char which is confirmed by the catalina-daemon.out error log:
...
javax.management.MalformedObjectNameException: Invalid character '=' in value part of property
at javax.management.ObjectName.construct(ObjectName.java:618)
at javax.management.ObjectName.<init>(ObjectName.java:1382)
...
Here's my condensed pom.xml.
I suspect this has to do with my relatively recent mvn upgrade through homebrew. Here's my current version:
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 1.8.0_112, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
Why does tomcat keep adding /deploy?path to my deployments?
As I'm investigating further, it's likely it's related to the tomcat7-maven-plugin but the docs haven't really clarified anything.
When all else fails, there's always the option to deploy the .war manually.
Package the program first:
mvn clean package [-P profile_name]
and then locate the .war in /target:
I try to make Oracle request in python from Raspberry pi. The problem is:
"Oracle does not support the ARM CPU architecture which the Raspberry Pi uses. You downloaded and unzipped the Oracle Instant Client, but it can't actually run. And without the Oracle Client libraries, cx_oracle will not work, and neither will generic Python ODBC connectors."
Info:
Apache Maven 3.2.5
Maven home: /opt/apache-maven-3.2.5
Java version: 1.8.0_212, vendor: Raspbian
Java home: /usr/lib/jvm/java-8-openjdk-armhf/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "4.19.42-v7+", arch: "arm", family: "unix"
The location of ojdbc6.jar is:
/home/pi/ojdbc6.jar
I need python, so installed JPype and JayDeBeApi and I wrote this on jupyter notebopok:
import jaydebeapi
import jpype
import os
conn= jaydebeapi.connect('oracle.jdbc.driver.OracleDriver',
'[admin]/[root]#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=helloworld.com)(PORT=1521))(CONNECT_DATA=(SID=hello42)))',
'/home/pi/ojdbc6.jar')
But i have this error:
---------------------------------------------------------------------------
java.lang.RuntimeExceptionPyRaisable Traceback (most recent call last)
<ipython-input-12-2085c24bdf88> in <module>
----> 1 conn=jaydebeapi.connect('oracle.jdbc.driver.OracleDriver','[admin]/[root]#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=helloworld.com)(PORT=1521))(CONNECT_DATA=(SID=hello42)))','/home/pi/ojdbc6.jar')
/usr/local/lib/python3.5/dist-packages/jaydebeapi/__init__.py in connect(jclassname, url, driver_args, jars, libs)
379 else:
380 libs = []
--> 381 jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)
382 return Connection(jconn, _converters)
383
/usr/local/lib/python3.5/dist-packages/jaydebeapi/__init__.py in _jdbc_connect_jpype(jclassname, url, driver_args, jars, libs)
188 return jpype.JArray(jpype.JByte, 1)(data)
189 # register driver for DriverManager
--> 190 jpype.JClass(jclassname)
191 if isinstance(driver_args, dict):
192 Properties = jpype.java.util.Properties
/usr/local/lib/python3.5/dist-packages/jpype/_jclass.py in JClass(name)
71 jc = _jpype.findClass(name)
72 if jc is None:
---> 73 raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
74
75 return _getClassFor(jc)
java.lang.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class oracle.jdbc.driver.OracleDriver not found
I think the problem is the classpath, but I am still a beginner. What would be the commands to type to configure this?
thank you in advance !
I'm pretty sure that the '/home/pi/ojdbc6.jar' is currently treated as driver_args instead of jars variable.
The correct way:
conn=jaydebeapi.connect('oracle.jdbc.driver.OracleDriver',
'[admin]/[root]#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=helloworld.com)(PORT=1521))(CONNECT_DATA=(SID=hello42)))',
jars='/home/pi/ojdbc6.jar')
Alternatively you can add the Oracle light client jar manually to jpype classpath.
jpype.startJVM(jpype.getDefaultJVMPath(), '-Djava.class.path=/home/pi/ojdbc6.jar'
conn=jaydebeapi.connect('oracle.jdbc.driver.OracleDriver',
'[admin]/[root]#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=helloworld.com)(PORT=1521))(CONNECT_DATA=(SID=hello42)))')
This is only happens to 3rd party Maven repository for ElasticSearch on EC2 instance. It's working fine locally.
https://maven.elasticsearch.org/releases
Is it a configuration issue?
[ERROR] Failed to execute goal on project system-s: Could not resolve
dependencies for project com.7leaf:system-s:jar:0.0.1: Failed to collect
dependencies at org.elasticsearch.plugin:shield:jar:2.4.1: Failed to read
artifact descriptor for org.elasticsearch.plugin:shield:jar:2.4.1: Could not
transfer artifact org.elasticsearch.plugin:shield:pom:2.4.1 from/to es-repo
(https://maven.elasticsearch.org/releases): Received fatal alert:
handshake_failure -> [Help 1]
This is the Maven and Java version on the server.
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /usr/share/apache-maven
Java version: 1.8.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.23-31.51.amzn1.x86_64", arch: "amd64", family: "unix"
After trying out a few things, I found out that the issue is SSL and for this case, I'm able to switch to use non-SSL endpoint instead to solve the issue.
Switch to use
http://maven.elasticsearch.org/releases
instead of
https://maven.elasticsearch.org/releases
Since migrating to Maven, a lot of Java project builds on Hudson randomly fail with the following error message:
[ERROR] Process did not initiate connection and is still alive; killing it
[ERROR] Failure: hudson.AbortException: Process failed to connect; exit code: 143
ERROR: Process failed to connect; exit code: 143
The build queue is not full. The next build usually works just fine. Any clues on what is happening?
I'm using Hudson version 3.2.1 with Hudson Maven3 Plug-in version 3.0.4
Full log (edited for simplicity/security):
Started by user anonymous
Building on master
Updating {svn path} revision: {date} depth:infinity ignoreExternals: false
At revision {number}
no change for {svn path} since the previous build
[INFO] Using bundled Maven 3 installation
[INFO] Checking Maven 3 installation environment
[workspace] $ {maven home}/mvn --help
[INFO] Checking Maven 3 installation version
[INFO] Detected Maven 3 installation version: 3.1.1
[workspace] $ {maven home}/mvn clean package -V -B -Dmaven.ext.class.path={classpath} -Dhudson.eventspy.port=54304 -f pom.xml
[DEBUG] Waiting for connection on port: 54304
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 12:22:22-0300)
Maven home: {maven home}
Java version: 1.6.0_22, vendor: Sun Microsystems Inc.
Java home: {java home}
Default locale: en_US, platform encoding: ISO-8859-1
OS name: "linux", version: "2.6.18-407.el5", arch: "amd64", family: "unix"
[ERROR] Process did not initiate connection and is still alive; killing it
[ERROR] Failure: hudson.AbortException: Process failed to connect; exit code: 143
ERROR: Process failed to connect; exit code: 143
Sending e-mails to: {e-mail}
[DEBUG] Skipping watched dependency update for build: project-trunk #6 due to result: FAILURE
Finished: FAILURE
Since having random failures defeats the whole purpose of having a continuous integration tool, the answer is moving on to Jenkins for better Maven support.