When i run the install.bat file on a windows 7 machine. i receive the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Error: Could not find or
load main class Files\thingsboard\lib\thingsboard.jar ThingsBoard
installation failed!
I assumed it was reading the BASE file directory incorrectly. So I it to the absolute directory location as shown below:
SET BASE="C:\Program Files\thingsboard"
SET LOADER_PATH=%BASE%\conf,%BASE%\extensions
SET SQL_DATA_FOLDER=%BASE%\data\sql
SET jarfile=%BASE%\lib\thingsboard.jar
SET installDir=%BASE%\data
I get the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Logging system failed to
initialize using configuration from 'C:\Program
Files\thingsboard\install\logback.xml'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161
)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.jav
a:57)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:47)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114)
at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:
304)
at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingAppl
icationListener.java:235)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.jav
a:208)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult
icaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:138)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:121)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe
ner.java:68)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java
:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect) ThingsBoard installation failed!
What am I doing wrong?
The quotes seem to be a problem.
C:\ Program Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log java.io.FileNotFoundException:
"C:\Program Files\thingsboard"\logs\install.log
Have you tried to use SET BASE=%ProgramFiles%\thingsboard or escape the space in the path with a ^ SET BASE=C:\Program^ Files\thingsboard?
edit:
The problem is because of the space in the install dir.
I have tried to install it in "c:\test folder" and got the same problem.
There was no problem when installing in a folder without space like "c:\test"
I changed the following part in the install.bat file and was able to install it in the folder with a space.
SET "BASE=%~dp0"
SET "LOADER_PATH=%BASE%conf,%BASE%extensions"
SET "SQL_DATA_FOLDER=%BASE%data\sql"
SET "jarfile=%BASE%lib\thingsboard.jar"
SET "installDir=%BASE%data"
PUSHD %BASE%conf
java -cp "%jarfile%" -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication "-Dinstall.data_dir=%installDir%" -Dinstall.load_demo=%loadDemo% -Dspring.jpa.hibernate.ddl-auto=none -Dinstall.upgrade=false "-Dlogging.config=%BASE%install\logback.xml" org.springframework.boot.loader.PropertiesLauncher
if errorlevel 1 (
#echo ThingsBoard installation failed!
POPD
exit /b %errorlevel%
)
POPD
"%BASE%thingsboard.exe" install
When I received this error, I ran the command with Run as Administrator and my problem was solved.
if you receive the same result:
Install JRE
Delete the space in the installation directory
Run command with Run as Administrator
Related
Since upgrading my os to Mac Catalina,
I'm getting the following error when trying to run the following:
MysqldResource mysqldResource = new MysqldResource(uri); // Uri - temp db dir
mysqldResource.start("embedded-mysqld-thread-" + System.currentTimeMillis(), databaseOptions);
Looks like the source of the problem is with the dependency "mysql-connector-mxj-db-files" having binary files in 32bit format, while catalina stopped supporting it.
This is the error I'm getting:
Exception in thread "embedded-mysqld-thread-1574931580040" com.mysql.management.util.WrappedException: java.io.IOException: Cannot run program "/private/var/folders/l5/4ywgvbbj1kvgvrwxzp6dz82c0000gn/T/test_db_24166997810717/bin/mysqld": error=86, Bad CPU type in executable
at com.mysql.management.util.Exceptions.toRuntime(Exceptions.java:55)
at com.mysql.management.util.Exceptions$Block.exec(Exceptions.java:89)
at com.mysql.management.util.RuntimeI$Default.exec(RuntimeI.java:180)
at com.mysql.management.util.Shell$Default.run(Shell.java:140)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Cannot run program "/private/var/folders/l5/4ywgvbbj1kvgvrwxzp6dz82c0000gn/T/test_db_24166997810717/bin/mysqld": error=86, Bad CPU type in executable
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at com.mysql.management.util.RuntimeI$Default$1.inner(RuntimeI.java:177)
at com.mysql.management.util.Exceptions$Block.exec(Exceptions.java:86)
... 3 more
Caused by: java.io.IOException: error=86, Bad CPU type in executable
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 6 more
Does anyone know of an alternative to mysql-connector-java or knows of a way to run the existing dependency on Mac OS Catalina?
For anyone who has the same issue on MacOS Catalina, you can follow the README.md in my repo (https://github.com/pengyue/mysql-connector-mxj-mac-os-catalina), which has the 64 bits executables for MacOS Catalina, and this improved connector works on Catalina.
To explain what I have done:
Download the 64 bits executables from MySQL to the folder 5-5-9
Add the platform mapping for 64 bits MacOS in platform-map.properties
Create a jar by using jar cvf mysql-connector-mxj-db-files-5.0.12.jar .
Replace the jar in your mvn settings folder ~/.m2/repository/mysql/mysql-connector-mxj-db-files/5.0.12/ with the jar you just created.
This solution works fine for my projects, Unfortunately I could not find a github for the mysql-connector-mxj, as it is deprecated and not maintainable anymore.
The other option is to use wix-embedded-mysql(https://github.com/wix/wix-embedded-mysql) instead of mysql-connector-mxj, but this probably requires some code changes in your projects.
I have installed java JRE but i keep on getting. Am using windows 10 for development
After running ionic run android or ionic emulate android i get this error:
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.zip.ZipFile.<init>(ZipFile.java:159)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
I have also set JRE_HOME in the environment variables
Probably it is related to something missing or corrupted.
You can find a similar question here, hope it helps.
First of all you have to install
node.js
apache ANT
JDK & JRE
Android SDK & Eclipse
After installation, you have to set software paths into environmental- variable. Then fire your npm install -g cordova. Without this PhoneGap will not be created.
I set up all my environment variable correctly but I'm getting a weird error, there is no match on google for the class name (which is just giberish)
So I added the 2 required environment variable :
JAVA_HOME C:\programs\Java\jdk1.6.0_41
M2_HOME C:\dev\apache-maven-3.0.4
And added this at the end of the variable PATH
;%JAVA_HOME%\bin;%M2_HOME%\bin
And when running mvn --version I get :
Exception in thread "main" java.lang.NoClassDefFoundError: ûXX
Caused by: java.lang.ClassNotFoundException: ûXX
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: ÔÇôXX. Program will exit.
The weird thing is that I get exactly the same thing on 2 totally different computers.
I tried with old file that I already had and freshly downloaded files.
I don't get it.
This works on my PC with Win7 64x OS:
JAVA_HOME c:\Program Files (x86)\Java\jdk1.6.0_21
J2_HOME c:\Program Files (x86)\Java\jdk1.6.0_21\bin
M2_HOME c:\Program Files (x86)\apache-maven-3.1.0
PATH ...;%M2_HOME%\bin;%J2_HOME%
Sometimes, when we want get PATH without spaces, we can use this trick:
'Progra~1' instead of 'Program Files'
'Progra~2' instead of 'Program Files (x86)'
and etc
This is old DOS filenames style: 8+3 - where 8 chars for name and 3 for extension (if it present)
This works on old Win machines
when passing maven path try to come in to maven package and get path, I had a maven package inside of maven package,so my path is C:\apache-maven-3.6.0\apache-maven-3.6.0. it is work on my computer.
I recently updated some of the addons for eclipse (3.7). To do so, I started eclipse with sudo (as not doing so caused some errors while installing new Software earlier). Now I get an error immediatly before the splash screen would appear when I start eclipse without using sudo:
!ENTRY org.eclipse.equinox.launcher 4 0 2012-09-20 12:27:48.447
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
I do not get this error when I start eclipse with "sudo eclipse". Any suggestions on how to solve this issue? I am using Ubuntu 11.04.
Cheers
Nebwi
A wild guess. This could be permission issue.
Did you give permissions to the folders as a sudo. Please right click and see the properties of the files in org.eclipse.core.runtime.adaptor.EclipseStarter
And give the read and execute permissions and try. Hope this may help.
While you were "sudo"ing, you may have changed ownership of the files so that you can no longer read them as you. In a command window cd to you install and type:
ls -al
If the owner is root, then you will need to change it back to you. To do this you really need to know your group. It could be your username, the word "staff", "user" etc. To find out for sure, just do that same ls command in your home directory. If you need to change the owners, then type:
sudo chown -R yourUserName.yourUserGroup *
On some unix systems it is "yourUserName:yourUserGroup". Then try eclipse.
Does anybody know a tutorial how HBase can be run on Windows under Cygwin?
I managed to setup everything such as the keys for auto login with SSH but Im stuck with following error message:
localhost: +======================================================================+
localhost: | Error: JAVA_HOME is not set and Java could not be found |
localhost: +----------------------------------------------------------------------+
localhost: | Please download the latest Sun JDK from the Sun Java web site |
localhost: | > http://java.sun.com/javase/downloads/ < |
localhost: | |
localhost: | HBase requires Java 1.6 or later. |
localhost: | NOTE: This script will find Sun Java whether you install using the |
localhost: | binary or the RPM based installer. |
localhost: +======================================================================+
...
java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
I already set .bash_profile to point to:
export JAVA_HOME='/usr/lib/jre1.6.1'
which is symbolic link on the real jre
/usr/lib/jre1.6.1 -> /cygdrive/c/Java/jre7/
I had the same issue and I found following:
Cygwin use ":" as a path separator.
But script that creates CLASS_PATH works incorrectly. Final CLASS_PATH looks like
"...:zookeeper.jar:" with ":" at the end. Before run java script converting CLASS_PATH to Windows style. But with ":" at the end !!
So my solution is: just create an empty file "zzz.jar" under hbase/lib.
zzz.jar will be very last in CLASS_PATH and zookeeper.jar will be added to CLASS_PATH correctly.
I know it is better to fix script, but I who cares :)
I need HBase for 2 days only, so it works and I am happy :)
For JAVA_HOME error, you can fix it by setting JAVA_HOME in the hbase\conf\hbase-env.sh.
For the class not found exception, try adding the hbase\lib to the HBASE_CLASSPATH under the same file.
Personally, I use the following two lines in my hbase-env.sh on a Windows 7 Environment + Cygwin:
export JAVA_HOME=/cygdrive/c/Program\ Files/Java/jdk1.7.0/
export HBASE_CLASSPATH=/cygdrive/c/programs/hbase-0.92.1/lib/
Use a VM to run hadoop in a Linux environment. With Java you may be facing issues typical under windows, adding Cygwin to the mix adds a whole other set, for example:
spaces in the include path
multiple installations of java from different applications (e.g. browser plugins) can mess up the consistency of the the CLASSPATH, JAVA_HOME and PATH variables
shell script path/syntax issues
For tutorial purposes I highly recommend the cloudera demo VM and tutorial:
https://ccp.cloudera.com/display/SUPPORT/Cloudera%27s+Hadoop+Demo+VM
https://ccp.cloudera.com/display/SUPPORT/Hadoop+Tutorial#HadoopTutorial-Purpose
EDIT:
The first error looks like Java is not being found, but the second error is clearly coming from Java, so the combination of these two errors is somewhat confusing. Are you sure that they are both being produced by the same script at the same time?
The second error is caused by not having the zookeeper jar file on the classpath. Try modifying the script or copying the jar into the hadoop lib dir.
hbase_classpath is not need, just change zookeeper.jar to azookeeper.jar