Code Monkey home page Code Monkey logo

sitewhere-examples's Introduction

SiteWhere Example Applications

Example web applications that demonstrate SiteWhere functionality.

sitewhere-examples's People

Contributors

bishopsmove avatar derekadams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sitewhere-examples's Issues

Unable to build complex-socket-processing

while building complex-socket-processing example from master (1.8.0) branch,

with following command

mvn clean install

Getting the error "It requires a project with an existing pom.xml"

Following is the log.

root@zimbratest-VirtualBox:~/sitewhere-examples-master/socket-event-source/complex-socket-processing# mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: clean. It requires a project with an existing pom.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sat Oct 01 00:17:03 IST 2016
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------

please tell me how can i use this example with sitewhere 1.8.0

no air speed history and fuel level history in air-traffic project

hi,when I building the air-traffic example,some errors happened. After running the command "gradle clean tomcatRun", I can open this link: http://localhost:8090/airtraffic/, but there only has flight details without air speed and fuel level history.here are the logs:

Starting a Gradle Daemon, 2 busy Daemons could not be reused, use --status for details

> Task :air-traffic:tomcatRun
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/hjh/.gradle/caches/modules-2/files-2.1/org.apache.activemq/activemq-all/5.10.0/bb376083b608a6f74e3d3c06afb92049549302c9/activemq-all-5.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/hjh/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.13/55517a839e93c29d8a6ce8d8504a3e124e3a5a2f/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/hjh/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/d90276fff414f06cb375f2057f6778cd63c6082f/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Can you tell me how to solve this error? thanks a lot!

NoClassDefFoundError

After I ran the "gradle clean tomcatRun" command, I encountered the following error:

E:\sitewhere-examples-master\air-traffic>gradle clean tomcatRun
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
Download http://repo.maven.apache.org/maven2/org/slf4j/slf4j-log4j12/1.7.13/slf4j-log4j12-1.7.13.jar
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/win10/.gradle/caches/modules-2/files-2.1/org.apache.activemq/activemq-all/5.10.0/bb376083b608a6f74e3d3c06afb92049549302c9/activemq-all-5.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/win10/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.13/55517a839e93c29d8a6ce8d8504a3e124e3a5a2f/slf4j-log4j12-1.7.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/win10/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/d90276fff414f06cb375f2057f6778cd63c6082f/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Task :air-traffic:tomcatRun
Started Tomcat Server
The Server is running at http://localhost:8090/airtraffic
The web application [/airtraffic] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. This is very likely to create a memory leak.

Exception in thread "pool-2-thread-1" java.lang.NoClassDefFoundError: org/apache/logging/log4j/message/SimpleMessage
at org.apache.logging.log4j.message.AbstractMessageFactory.newMessage(AbstractMessageFactory.java:48)
at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1011)
at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:988)
at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:684)
at com.sitewhere.examples.airtraffic.AirTrafficModelLoader$AirTrafficModel.waitForSiteWhereToStart(AirTrafficModelLoader.java:175)
at com.sitewhere.examples.airtraffic.AirTrafficModelLoader$AirTrafficModel.run(AirTrafficModelLoader.java:142)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.message.SimpleMessage
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 9 more

Task :air-traffic:tomcatRun FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':air-traffic:tomcatRun'.

An error occurred starting the Tomcat server.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 34s
4 actionable tasks: 3 executed, 1 up-to-date

Can anyone helps me to solve this problem? Thanks a lot!

Stomp endpoint not available

While building air-traffic example, after running the command "gradle clean tomcatRun", I met the following errors, here are the logs:

Task :air-traffic:tomcatRun
Starting ProtocolHandler ["http-bio-8090"]
Starting ProtocolHandler ["ajp-bio-8109"]
Started Tomcat Server
The Server is running at http://localhost:8090/airtraffic

2017-11-13T22:38:03,135 [pool-2-thread-1] INFO [AirTrafficModelLoader] Found site. Assuming data model already populated.
2017-11-13T22:38:03,244 [pool-2-thread-1] INFO [AirTrafficModelLoader] Stomp endpoint not available.
2017-11-13T22:38:11,316 [pool-2-thread-1] INFO [AirTrafficModelLoader] Stomp endpoint not available.
2017-11-13T22:38:19,344 [pool-2-thread-1] INFO [AirTrafficModelLoader] Stomp endpoint not available.
2017-11-13T22:38:27,409 [pool-2-thread-1] INFO [AirTrafficModelLoader] Stomp endpoint not available.

Can anyone helps me to solve this problem? Thanks!

how to use

Hello, do you have detailed project construction and access instructions? The information on the Internet is not very comprehensive, such as how to access the platform and how to send instructions to the platform.

getting error while building the air-traffic example

15:00:50.596 [DEBUG] [org.gradle.configuration.BuildScriptProcessor] Timing: Running the build script took 5.393 secs
15:00:50.614 [ERROR] [org.gradle.BuildExceptionReporter]
15:00:50.621 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:00:50.626 [ERROR] [org.gradle.BuildExceptionReporter]
15:00:50.629 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
15:00:50.634 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/home/zimbratest/vimal/sitewhere-examples/build.gradle' line: 21
15:00:50.645 [ERROR] [org.gradle.BuildExceptionReporter]
15:00:50.651 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:00:50.658 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'sitewhere-examples'.
15:00:50.669 [ERROR] [org.gradle.BuildExceptionReporter] > Could not find method create() for arguments [dependencyManagement, class io.spring.gradle.dependencymanagement.report.DependencyManagementReportTask, io.spring.gradle.dependencymanagement.DependencyManagementPlugin$_apply_closure1@9c7f429] on task set.
15:00:50.680 [ERROR] [org.gradle.BuildExceptionReporter]
15:00:50.693 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:00:50.700 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'sitewhere-examples'.
15:00:50.712 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)

Documentation for sitewhere examples are not working for sitewhere 3.0

Hi @derekadams
I have installed sitewhere 3.0 on my kuberenetes cluster and trying to run sitewhere air-traffic example. But using the admin-UI I'm unable to get assets and follow the documentation given here to run that example. The UI shown here doesn't match at all with the sitewhere 3.0 admin-UI. How can I run the example app?
image

Tenant not found for authentication token

I built the air-traffic example, after running the "gradle clean tomcatRun" command, I got the following errors, here are the logs:

[pool-2-thread-1] ERROR [AirTrafficModelLoader] Error loading site information.
com.sitewhere.spi.SiteWhereSystemException: Tenant not found for authentication token.
at com.sitewhere.rest.client.SiteWhereErrorHandler.handleError(SiteWhereErrorHandler.java:57) ~[sitewhere-client-1.8.0.jar:?]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:565) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:484) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at com.sitewhere.rest.client.SiteWhereClient.sendRest(SiteWhereClient.java:1017) ~[sitewhere-client-1.8.0.jar:?]
at com.sitewhere.rest.client.SiteWhereClient.getSiteByToken(SiteWhereClient.java:332) ~[sitewhere-client-1.8.0.jar:?]
at com.sitewhere.examples.airtraffic.AirTrafficModelLoader$AirTrafficModel.run(AirTrafficModelLoader.java:144) [main/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_141]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_141]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]

Can anyone help me to solve this problem? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.