Skip to content
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

install.sh fails with entityManagerFactory: null #130

Open
orzen opened this issue Dec 4, 2024 · 3 comments
Open

install.sh fails with entityManagerFactory: null #130

orzen opened this issue Dec 4, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@orzen
Copy link

orzen commented Dec 4, 2024

Component: Thingsboard Edge
I have trouble with:

  • Installation

Description

I try to run the install-script according to the installation instructions(here) but instead I get an error:

Error creating bean with name 'entityManagerFactory' defined in class path resource [org/thingsboard/server/dao/config/JpaDaoConfig.class]: null

Entire output:

/usr/share/tb-edge/bin/install# ./install.sh
OpenJDK 64-Bit Server VM warning: Option UseBiasedLocking was deprecated in version 15.0 and will likely be removed in a future release.
  ______    __      _                              ____                               __
 /_  __/   / /_    (_)   ____    ____ _   _____   / __ )  ____   ____ _   _____  ____/ /
  / /     / __ \  / /   / __ \  / __ `/  / ___/  / __  | / __ \ / __ `/  / ___/ / __  /
 / /     / / / / / /   / / / / / /_/ /  (__  )  / /_/ / / /_/ // /_/ /  / /    / /_/ /
/_/     /_/ /_/ /_/   /_/ /_/  \__, /  /____/  /_____/  \____/ \__,_/  /_/     \__,_/
                              /____/

 ===================================================
 :: ThingsBoard Edge CE ::       (v3.8.0EDGE)
 ===================================================

Starting TbEdgeInstallApplication v3.8.0EDGE using Java 17.0.2 with PID 6189 (/usr/share/tb-edge/bin/tb-edge.jar started by thingsboard in /usr/share/tb-edge/bin/install)
Running with Spring Boot v3.2.4, Spring v6.1.6
The following 1 profile is active: "install"

ThingsBoard Edge installation failed!

I use the Debian release located here with OpenJDK 17.0.2. My guess is that I've missed something obvious, but I have no experience working with Java and have a hard time troubleshooting this on my own, any guess on what I might have missed?

Environment

  • OS: Poky Scarthgap
  • ThingsBoard: 3.8

Disclaimer

We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

@orzen orzen added the question Further information is requested label Dec 4, 2024
@orzen orzen changed the title Your title here install.sh fails with entityManagerFactory: null Dec 4, 2024
@jekka001
Copy link

jekka001 commented Dec 11, 2024

Hello, I’ll try to help you :)

First of all, it’s important to mention that Edge depends on ThingsBoard Community Edition, so it’s essential to have ThingsBoard Community Edition installed. Alternatively, you can use our demo.

You will need to register (or log in with your email).

Next, the following guide will help you: Edge-instruction.

The link you provided is for ThingsBoard Community Edition.

Therefore, if you are specifically interested in Edge, please follow all the steps in the guide I provided, and everything will work :)

If you have any questions, feel free to ask. I’ll be happy to assist you!

@orzen
Copy link
Author

orzen commented Dec 16, 2024

Thanks for the help!

I noticed that I've forgotten the Community Edition, however the same error shows up when I try to run install.sh as part of the installation process for the Community Edition. I follow this https://thingsboard.io/docs/user-guide/install/ubuntu/ but on my system update-alternatives might work differently, what is expected of update-alternatives and what is the error a symptom of?

@jekka001
Copy link

The command sudo update-alternatives --config java is used to select the desired Java version, in this case, Java 17, which will be set as the default on your system.
When you run this command, it will display a list of available Java versions. You may see something like this:

Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java  1111      auto mode
 1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java  1081      manual mode
 2            /usr/lib/jvm/java-11-openjdk-amd64/bin/java  1111      manual mode
 3            /usr/lib/jvm/java-17-openjdk-amd64/bin/java  1711      manual mode

In this case, you should enter 3 because Java 17 is listed as option 3.

If everything is done correctly, running the command java -version should display the following output:

openjdk version "17.x.xx" 
OpenJDK Runtime Environment (...)
OpenJDK 64-Bit Server VM (...)

If you encounter any issues, please provide as much information as possible, including logs after running these commands, so I can assist you further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants