My problem is that when I restart my pc my environment variables are lost. I encountered this problem with python libraries, I installed numpy and it worked, but after restarting my PC when I try to import it it gives me an error.
I now Facing this problem with DERBY,
This is my Installation:
C:\Users\ahmad>set DERBY_INSTALL=C:\Users\ahmad\db\db-derby-10.15.2.0-bin
C:\Users\ahmad>set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;%DERBY_INSTALL%\lib\derbyoptionaltools.jar;%DERBY_INSTALL%\lib\derbyshared.jar;.
C:\Users\ahmad> cd %DERBY_INSTALL%\bin
C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin>setEmbeddedCP.bat
C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin>SET DERBY_HOME=C:\Users\ahmad\db\DB-DER~1.0-B
C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin>set CLASSPATH=C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbyshared.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derby.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbytools.jar;C:\Users\ahmad\db\DB-DER~1.0-B/lib/derbyoptionaltools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derby.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbytools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyoptionaltools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyshared.jar;.
C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin>set MODULEPATH=C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbyshared.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derby.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbytools.jar;C:\Users\ahmad\db\DB-DER~1.0-B/lib/derbyoptionaltools.jar
C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin>java org.apache.derby.tools.sysinfo
------------------ Java Information ------------------
Java Version: 16.0.2
Java Vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-16.0.2
Java classpath: C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbyshared.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derby.jar;C:\Users\ahmad\db\DB-DER~1.0-B\lib\derbytools.jar;C:\Users\ahmad\db\DB-DER~1.0-B/lib/derbyoptionaltools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derby.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbytools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyoptionaltools.jar;C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyshared.jar;.
OS name: Windows 10
OS architecture: amd64
OS version: 10.0
Java user name: Ahmad
Java user home: C:\Users\ahmad
Java user dir: C:\Users\ahmad\db\db-derby-10.15.2.0-bin\bin
java.specification.name: Java Platform API Specification
java.specification.version: 16
java.runtime.version: 16.0.2+7-67
--------- Derby Information --------
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derby.jar] 10.15.2.0 - (1873585)
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbytools.jar] 10.15.2.0 - (1873585)
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbynet.jar] 10.15.2.0 - (1873585)
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyclient.jar] 10.15.2.0 - (1873585)
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyshared.jar] 10.15.2.0 - (1873585)
[C:\Users\ahmad\db\db-derby-10.15.2.0-bin\lib\derbyoptionaltools.jar] 10.15.2.0 - (1873585)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale : [English/United States [en_US]]
Found support for locale: [cs]
version: 10.15.2.0 - (1873585)
Found support for locale: [de_DE]
version: 10.15.2.0 - (1873585)
Found support for locale: [es]
version: 10.15.2.0 - (1873585)
Found support for locale: [fr]
version: 10.15.2.0 - (1873585)
Found support for locale: [hu]
version: 10.15.2.0 - (1873585)
Found support for locale: [it]
version: 10.15.2.0 - (1873585)
Found support for locale: [ja_JP]
version: 10.15.2.0 - (1873585)
Found support for locale: [ko_KR]
version: 10.15.2.0 - (1873585)
Found support for locale: [pl]
version: 10.15.2.0 - (1873585)
Found support for locale: [pt_BR]
version: 10.15.2.0 - (1873585)
Found support for locale: [ru]
version: 10.15.2.0 - (1873585)
Found support for locale: [zh_CN]
version: 10.15.2.0 - (1873585)
Found support for locale: [zh_TW]
version: 10.15.2.0 - (1873585)
------------------------------------------------------
------------------------------------------------------
now I will restart my PC:
C:\Users\ahmad>echo %CLASSPATH%
%CLASSPATH%
C:\Users\ahmad>cd %DERBY_INSTALL%\bin
The system cannot find the path specified.
C:\Users\ahmad>java org.apache.derby.tools.sysinfo
Error: Could not find or load main class org.apache.derby.tools.sysinfo
Caused by: java.lang.ClassNotFoundException: org.apache.derby.tools.sysinfo
C:\Users\ahmad>cd db
C:\Users\ahmad\db>cd db-derby-10.15.2.0-bin
C:\Users\ahmad\db\db-derby-10.15.2.0-bin>java org.apache.derby.tools.sysinfo
Error: Could not find or load main class org.apache.derby.tools.sysinfo
Caused by: java.lang.ClassNotFoundException: org.apache.derby.tools.sysinfo
this is the result, it seems like my PC don't save what I do in the CMD.
Now I noticed I don't even need to restart it, even if I closed the current CMD and opened another one, it won't work.
Any Help?
Related
I am trying to build Springboot project with Maven but getting below error while running it on tomcat server .
Please suggest a solution . Thanks .
java: Lombok visitor handler class lombok.javac.handlers.HandleVal failed: java.lang.NoSuchMethodError: 'boolean com.sun.tools.javac.code.Symbol$TypeSymbol.isLocal()'
Lombok
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</dependency>
Maven
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /usr/local/Cellar/maven/3.8.4/libexec
Java version: 11.0.11, vendor: AdoptOpenJDK, runtime: /Users/psingh/.jabba/jdk/adopt#1.11.0-11/Contents/Home
Default locale: en_IN, platform encoding: US-ASCII
OS name: "mac os x", version: "11.1", arch: "x86_64", family: "mac"
Tomcat
Using CATALINA_BASE: /usr/local/Cellar/tomcat#9/9.0.55/libexec
Using CATALINA_HOME: /usr/local/Cellar/tomcat#9/9.0.55/libexec
Using CATALINA_TMPDIR: /usr/local/Cellar/tomcat#9/9.0.55/libexec/temp
Using JRE_HOME: /Users/psingh/.jabba/jdk/adopt#1.11.0-11/Contents/Home
Using CLASSPATH: /usr/local/Cellar/tomcat#9/9.0.55/libexec/bin/bootstrap.jar:/usr/local/Cellar/tomcat#9/9.0.55/libexec/bin/tomcat-juli.jar
Using CATALINA_OPTS:
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.55
Server built: Nov 10 2021 08:26:45 UTC
Server number: 9.0.55.0
OS Name: Mac OS X
OS Version: 11.1
Architecture: x86_64
JVM Version: 11.0.11+9
JVM Vendor: AdoptOpenJDK
I have updated Lombok to 1.18.24 .
It solved the issue !!
Now it is running in IntelliJ idea on Tomcat server .
My Setup:
a fresh grails project with src/docs/fr/guide/test1.gdoc
content in test1.gdoc is:
h1. Mon test
h2. Chapitre 1
test a voir
as for other, environment setup is:
------------------------------------------------------------
Gradle 7.1.1
------------------------------------------------------------
Build time: 2021-07-02 12:16:43 UTC
Revision: 774525a055494e0ece39f522ac7ad17498ce032c
Kotlin: 1.4.31
Groovy: 3.0.7
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 11.0.12 (Azul Systems, Inc. 11.0.12+7-LTS)
OS: Linux 5.4.0-80-generic amd64
| Grails Version: 4.0.11
| JVM Version: 11.0.12
why the command (summary) ./gradlew docs returns a
Execution failed for task ':docs'.
> groovy/text/Template
java.lang.ClassNotFoundException: groovy.text.Template?
After upgrading Android Studio to 4.1.2 on macOs I'm unable to start it. It tries to initialize itself but crashes shortly after that with the following stack:
allVms required 1.8*,1.8+
2021-02-01 22:50:53.573 studio[3796:311854] Can't find bundled java.The folder doesn't exist: /Applications/Android Studio.app/Contents/jbr
2021-02-01 22:50:53.573 studio[3796:311854] Can't find bundled java.The folder doesn't exist: /Applications/Android Studio.app/Contents/jdk
2021-02-01 22:50:53.593 studio[3796:311863] WorkingDirectory is absent in Info.plist. Current Directory: /Users/Admin
2021-02-01 22:50:53.593 studio[3796:311863] fullFileName is: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2021-02-01 22:50:53.593 studio[3796:311863] fullFileName exists: /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2021-02-01 22:50:53.593 studio[3796:311863] Value of STUDIO_VM_OPTIONS is (null)
2021-02-01 22:50:53.593 studio[3796:311863] Processing VMOptions file at /Applications/Android Studio.app/Contents/bin/studio.vmoptions
2021-02-01 22:50:53.594 studio[3796:311863] Done
2021-02-01 22:50:53.594 studio[3796:311863] Processing VMOptions file at /Users/Admin/Library/Application Support/Google/AndroidStudio4.1/studio.vmoptions
2021-02-01 22:50:53.596 studio[3796:311863] No content found
2021-02-01 22:50:53.596 studio[3796:311863] Processing VMOptions file at
2021-02-01 22:50:53.596 studio[3796:311863] No content found
2021-02-01 22:50:58,672 [ 3546] ERROR - rationStore.ComponentStoreImpl - Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
java.lang.Throwable: Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:146)
at com.intellij.configurationStore.ComponentStoreImpl.doAddComponent(ComponentStoreImpl.kt:352)
at com.intellij.configurationStore.ComponentStoreImpl.initPersistenceStateComponent(ComponentStoreImpl.kt:137)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:103)
at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:50)
at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:358)
at com.intellij.serviceContainer.ComponentManagerImpl.createLightService(ComponentManagerImpl.kt:598)
at com.intellij.serviceContainer.ComponentManagerImpl.getOrCreateLightService(ComponentManagerImpl.kt:486)
at com.intellij.serviceContainer.ComponentManagerImpl.getLightService$intellij_platform_serviceContainer(ComponentManagerImpl.kt:458)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:401)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:394)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.getInstance(UsageStatisticsPersistenceComponent.java:54)
at com.intellij.ide.gdpr.ConsentOptions.saveConfirmedConsents(ConsentOptions.java:238)
at com.intellij.ide.gdpr.ConsentOptions.setSendingUsageStatsAllowed(ConsentOptions.java:138)
at com.intellij.ide.gdpr.ConsentOptionsProviderImpl.setSendingUsageStatsAllowed(ConsentOptionsProviderImpl.java:14)
at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.loadState(UsageStatisticsPersistenceComponent.java:74)
at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.loadState(UsageStatisticsPersistenceComponent.java:26)
at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:438)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:373)
at com.intellij.configurationStore.ComponentStoreImpl.initPersistenceStateComponent(ComponentStoreImpl.kt:138)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:103)
at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:50)
at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:358)
at com.intellij.serviceContainer.ComponentManagerImpl.createLightService(ComponentManagerImpl.kt:598)
at com.intellij.serviceContainer.ComponentManagerImpl.getOrCreateLightService(ComponentManagerImpl.kt:486)
at com.intellij.serviceContainer.ComponentManagerImpl.getLightService$intellij_platform_serviceContainer(ComponentManagerImpl.kt:458)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:401)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:394)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.getInstance(UsageStatisticsPersistenceComponent.java:54)
at com.intellij.internal.statistic.utils.StatisticsUploadAssistant.isCollectAllowed(StatisticsUploadAssistant.java:43)
at com.intellij.internal.statistic.eventLog.fus.FeatureUsageEventLoggerProvider.isRecordEnabled(FeatureUsageEventLoggerProvider.kt:12)
at com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider.createLogger(StatisticsEventLogger.kt:41)
at com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider.access$createLogger(StatisticsEventLogger.kt:23)
at com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider$logger$2.invoke(StatisticsEventLogger.kt:27)
at com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider$logger$2.invoke(StatisticsEventLogger.kt:23)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.intellij.internal.statistic.eventLog.StatisticsEventLoggerProvider.getLogger(StatisticsEventLogger.kt)
at com.intellij.internal.statistic.eventLog.fus.FeatureUsageLogger.isEnabled(FeatureUsageLogger.kt:85)
at com.intellij.internal.statistic.eventLog.fus.FeatureUsageLogger.<clinit>(FeatureUsageLogger.kt:29)
at com.intellij.configurationStore.statistic.eventLog.FeatureUsageSettingsEvents$logDefaultConfigurationState$1.run(FeatureUsageSettingsEvents.kt:38)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:222)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:201)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:193)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2021-02-01 22:50:58,694 [ 3568] ERROR - rationStore.ComponentStoreImpl - Android Studio 4.1.2 Build #AI-201.8743.12.41.7042882
2021-02-01 22:50:58,694 [ 3568] ERROR - rationStore.ComponentStoreImpl - JDK: 1.8.0_242-release; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o
2021-02-01 22:50:58,694 [ 3568] ERROR - rationStore.ComponentStoreImpl - OS: Mac OS X
2021-02-01 22:50:58,716 [ 3590] ERROR - rationStore.ComponentStoreImpl - Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
java.lang.Throwable: Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
I tried solutions from here, but none of them worked for me.
If there's no direct solution, would complete removal of Android Studio (like here) with following 'clean' install be reasonable approach?
Yes. I had the same error when upgrading my Mac to Big Sur. I tried cleaning it but it did not work so uninstalled Android Studio and all emulators. After re-install, worked perfectly.
We are using sonar runner 2.3 to analyze java code.
sonar-runner gets stuck at one of our projects. The last message on the console reads Java AST Scan and process gets stuck at that..
[jsaluja#[Proj1]] ~/sonar-runner-2.3/bin/sonar-runner
SonarQube Runner 2.3
Java 1.6.0_21 Sun Microsystems Inc. (64-bit)
Linux 2.6.18-238.5.1.el5 amd64
INFO: Runner configuration file: /home/jsaluja/sonar-runner-2.3/conf/sonar-runner.properties
INFO: Project configuration file: /home/jsaluja/0809/Proj1/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /home/jsaluja/0809/Proj1/.sonar
INFO: SonarQube Server 3.6.2
15:53:51.076 INFO - Load batch settings
15:53:51.197 INFO - User cache: /home/jsaluja/.sonar/cache
15:53:51.201 INFO - Install plugins
15:53:52.129 INFO - Install JDBC driver
15:53:52.137 INFO - Create JDBC datasource for jdbc:oracle:thin:#1.2.3.4/XE
15:53:54.574 INFO - Initializing Hibernate
15:53:57.857 INFO - Load project settings
15:53:58.157 INFO - Apply project exclusions
15:53:58.440 INFO - ------------- Scan Module1
15:53:58.444 INFO - Load module settings
15:54:00.618 INFO - Quality profile : [name=Sonar way,language=java]
15:54:00.631 INFO - Excluded tests:
15:54:00.631 INFO - **/package-info.java
15:54:00.703 INFO - Configure Maven plugins
15:54:00.764 INFO - Compare to previous analysis
15:54:00.783 INFO - Compare over 5 days (2013-08-11)
15:54:00.796 INFO - Compare over 30 days (2013-07-17)
15:54:00.968 INFO - Base dir: /home/jsaluja/0809/Proj1/Module1
15:54:00.968 INFO - Working dir: /home/jsaluja/0809/Proj1/.sonar/a.b.c.d_Module1
15:54:00.968 INFO - Source dirs: /home/jsaluja/0809/Proj1/Module1/src
15:54:00.968 INFO - Source encoding: UTF-8, default locale: en_US
15:54:01.221 INFO - Sensor JavaSourceImporter...
15:54:11.517 INFO - Sensor JavaSourceImporter done: 10296 ms
15:54:11.518 INFO - Sensor JavaSquidSensor...
15:54:11.618 INFO - Java AST scan...
I have waited for over 2 hours.
The project structure
Proj1
Module1
Module2
sonar-project.properties
# required metadata
sonar.projectKey=a.b.c.d:Proj1
sonar.projectName=Proj1
sonar.projectVersion=1234
# List of the module identifiers
sonar.modules=Module1,Module2
I've set-up my Tomcat 7 on Ubuntu 12 with a Java 7 JRE_HOME:
$ /usr/share/tomcat7/bin/version.sh
Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-i386
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.26
Server built: Apr 11 2012 12:24:08
Server number: 7.0.26.0
OS Name: Linux
OS Version: 3.2.0-24-generic-pae
Architecture: i386
JVM Version: 1.7.0_03-b147
JVM Vendor: Oracle Corporation
But when deploying a simple JSF application compiled to 1.7 Tomcat complains with
SEVERE: Critical error during deployment:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! java.util.concurrent.ExecutionException: java.lang.UnsupportedClassVersionError: com/corejsf/UserBean : Unsupported major.minor version 51.0 (unable to load class com.corejsf.UserBean)
When I change my Ant build.xml to compile to "1.6" the application deploys fine. Is this incompatibility with Java 7 to be expected? There is a 6-months-old related question on Tomcat 7 / Java 7 compatibility but the answers there seem to suggest that Java 7 is supported.
I encountered exactly the same issue.
Here are my steps:
Edit file:
/etc/default/tomcat7
Replace JAVA_HOME
From
JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk
to
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_09
Restart Tomcat.