Error when running Mule tutorial

618 views
Skip to first unread message

Eric Bartel

unread,
Feb 21, 2015, 10:02:29 PM2/21/15
to site...@googlegroups.com
I'm trying to run the basic Mule tutorial found here: http://docs.sitewhere.org/current/integration/mule.html

My setup:
  • Anypoint Studio v5.0.1 with SiteWhere connector 1.0.0.201412081749 on Mac OS X
  • SiteWhere 1.0.1 on CentOS 7
  • Mosquitto 1.4 with websockets
  • Mongodb 2.6.7

I've created the example flow in Anypoint Studio and have successfully connected to MQTT websocket in the admin assignment emulator. When I click on the map and create a new location, a pin does not show up and I get an error in the Mule console saying, "Unrecognized field "siteToken". Any ideas on what could cause this error?

Thanks in advance for any help you can provide.

Here is the full output from the console:

INFO  2015-02-21 21:31:52,901 [main] org.mule.module.launcher.MuleContainer: 

**********************************************************************

* Mule ESB and Integration Platform                                  *

* Version: 3.6.0 Build: ed775fdb                                     *

* MuleSoft, Inc.                                                     *

* For more information go to                                         *

* http://www.mulesoft.com/mule-esb-enterprise                        *

*                                                                    *

* Server started: 2/21/15 9:31 PM                                    *

* JDK: 1.7.0_45 (mixed mode)                                         *

* OS: Mac OS X (10.9.2, x86_64)                                      *

* Host: Erics-iMac.local (192.168.88.197)                            *

**********************************************************************

INFO  2015-02-21 21:31:52,940 [main] org.mule.module.launcher.coreextension.DefaultMuleCoreExtensionManager: Initializing core extensions

INFO  2015-02-21 21:31:52,941 [main] com.mulesoft.mmc.agent.AgentCoreExtension: Mule Agent Core Extension is DISABLED

INFO  2015-02-21 21:31:52,965 [main] com.mulesoft.mule.cluster.hazelcast.config.ClusterTicketFileLoader: /Users/ebartel/AnypointStudio/workspace/.mule/.mule/mule-cluster.properties (No such file or directory)

WARN  2015-02-21 21:31:52,990 [main] com.mulesoft.mule.cluster.boot.ClusterCoreExtension: No cluster ID was specified -- High Availability will be disabled:

INFO  2015-02-21 21:31:53,203 [main] com.mulesoft.mule.plugin.manager.MulePluginManager: Registering plugin: mule-plugin-debugger-3.6.0

INFO  2015-02-21 21:31:53,223 [main] org.mule.module.launcher.coreextension.DefaultMuleCoreExtensionManager: Starting core extensions

INFO  2015-02-21 21:31:53,236 [main] org.mule.module.launcher.DefaultArchiveDeployer: ================== New Exploded Artifact: default

INFO  2015-02-21 21:31:53,306 [main] org.mule.module.launcher.domain.DefaultMuleDomain: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ New domain 'default'                                     +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:53,307 [main] org.mule.module.launcher.domain.DefaultMuleDomain: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Initializing domain 'default'                            +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:53,308 [main] org.mule.module.launcher.MuleDeploymentService: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Started domain 'default'                                 +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:53,310 [main] org.mule.module.launcher.ArtifactArchiveInstaller: Exploding a Mule artifact archive: file:/Users/ebartel/AnypointStudio/workspace/.mule/apps/sitewhere_test.zip

INFO  2015-02-21 21:31:53,528 [main] org.mule.module.launcher.application.DefaultMuleApplication: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ New app 'sitewhere_test'                                 +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:53,679 [main] org.mule.module.launcher.application.DefaultMuleApplication: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Initializing app 'sitewhere_test'                        +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:53,995 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker

INFO  2015-02-21 21:31:54,242 [main] org.mule.config.spring.MuleArtifactContext: Refreshing org.mule.config.spring.MuleArtifactContext@2d6eb551: startup date [Sat Feb 21 21:31:54 EST 2015]; root of context hierarchy

WARN  2015-02-21 21:31:55,762 [main] org.mule.module.ognl.expression.OgnlExpressionEvaluator: OGNL module is deprecated and will be removed in Mule 4.0. Use MEL expressions instead.

INFO  2015-02-21 21:31:56,323 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/ebartel/AnypointStudio/workspace/.mule/./.mule/sitewhere_test/queue-tx-log/tx1.log and /Users/ebartel/AnypointStudio/workspace/.mule/./.mule/sitewhere_test/queue-tx-log/tx2.log

INFO  2015-02-21 21:31:56,337 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs /Users/ebartel/AnypointStudio/workspace/.mule/./.mule/sitewhere_test/queue-xa-tx-log/tx1.log and /Users/ebartel/AnypointStudio/workspace/.mule/./.mule/sitewhere_test/queue-xa-tx-log/tx2.log

INFO  2015-02-21 21:31:56,755 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising model: _muleSystemModel

INFO  2015-02-21 21:31:57,021 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: sitewhere_testFlow1

INFO  2015-02-21 21:31:57,021 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: org.mule.exception.DefaultMessagingExceptionStrategy@7de85f8d

INFO  2015-02-21 21:31:57,044 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: sitewhere_testFlow1.stage1

INFO  2015-02-21 21:31:57,061 [main] org.mule.config.spring.SpringXmlConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='/Users/ebartel/AnypointStudio/workspace/.mule/apps/sitewhere_test/sitewhere_test.xml'}]"

INFO  2015-02-21 21:31:57,062 [main] org.mule.config.builders.AutoConfigurationBuilder: Configured Mule using "org.mule.config.builders.AutoConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='/Users/ebartel/AnypointStudio/workspace/.mule/apps/sitewhere_test/sitewhere_test.xml'}]"

INFO  2015-02-21 21:31:57,063 [main] org.mule.module.launcher.application.DefaultMuleApplication: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Starting app 'sitewhere_test'                            +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:57,065 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager

INFO  2015-02-21 21:31:57,065 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager

INFO  2015-02-21 21:31:57,146 [main] org.mule.modules.oauth2.provider.agents.DefaultSplashScreenAgent: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ DevKit Extensions (0) used in this application 

                             +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:57,147 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting model: _muleSystemModel

INFO  2015-02-21 21:31:57,148 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: sitewhere_testFlow1

INFO  2015-02-21 21:31:57,149 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: sitewhere_testFlow1.stage1

Feb 21, 2015 9:31:57 PM com.hazelcast.core.LifecycleService

INFO: HazelcastClient[hz.client_0_sitewhere] is STARTING

Feb 21, 2015 9:31:57 PM com.hazelcast.core.LifecycleService

INFO: HazelcastClient[hz.client_0_sitewhere] is STARTED

Feb 21, 2015 9:31:57 PM com.hazelcast.core.LifecycleService

INFO: HazelcastClient[hz.client_0_sitewhere] is CLIENT_CONNECTED

Feb 21, 2015 9:31:57 PM com.hazelcast.client.spi.ClientClusterService

INFO: 


Members [1] {

Member [192.168.88.179]:5701

}


INFO  2015-02-21 21:31:57,931 [main] com.sitewhere.mule.SiteWhereConnector: Verified base SiteWhere REST API URL connectivity: http://192.168.88.179:8080/sitewhere/api/

INFO  2015-02-21 21:31:57,935 [main] org.mule.module.management.agent.WrapperManagerAgent: This JVM hasn't been launched by the wrapper, the agent will not run.

INFO  2015-02-21 21:31:57,977 [main] org.mule.DefaultMuleContext: 

**********************************************************************

* Application: sitewhere_test                                        *

* OS encoding: /, Mule encoding: UTF-8                               *

*                                                                    *

* Agents Running:                                                    *

*   DevKit Extension Information                                     *

*   Batch module default engine                                      *

*   Clustering Agent                                                 *

*   JMX Agent                                                        *

**********************************************************************

INFO  2015-02-21 21:31:57,977 [main] org.mule.module.launcher.MuleDeploymentService: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Started app 'sitewhere_test'                             +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:57,980 [main] org.mule.module.launcher.DeploymentDirectoryWatcher: 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+ Mule is up and kicking (every 5000ms)                    +

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO  2015-02-21 21:31:58,051 [Receiving Thread] com.sitewhere.mule.SiteWhereConnector: Connected to SiteWhere Hazelcast cluster.

INFO  2015-02-21 21:31:58,069 [Receiving Thread] com.sitewhere.mule.SiteWhereConnector: Registered for device location events from SiteWhere.

INFO  2015-02-21 21:31:58,202 [main] org.mule.module.launcher.StartupSummaryDeploymentListener: 

**********************************************************************

*              - - + DOMAIN + - -               * - - + STATUS + - - *

**********************************************************************

* default                                       * DEPLOYED           *

**********************************************************************


*******************************************************************************************************

*            - - + APPLICATION + - -            *       - - + DOMAIN + - -       * - - + STATUS + - - *

*******************************************************************************************************

* sitewhere_test                                * default                        * DEPLOYED           *

*******************************************************************************************************


ERROR 2015-02-21 21:32:14,318 [[sitewhere_test].sitewhere_testFlow1.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy: 

********************************************************************************

Message               : Failed to invoke buildContextForEvent. Message payload is of type: DeviceLocation

Code                  : MULE_ERROR--2

--------------------------------------------------------------------------------

Exception stack is:

1. Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@10e1baa6; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]) (com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException)

  com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:51 (null)

2. Could not read JSON: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@10e1baa6; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@10e1baa6; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]) (org.springframework.http.converter.HttpMessageNotReadableException)

  com.sitewhere.mule.spring.MappingJackson2HttpMessageConverter:159 (null)

3. Failed to invoke buildContextForEvent. Message payload is of type: DeviceLocation (org.mule.api.MessagingException)

  com.sitewhere.mule.processors.BuildContextForEventMessageProcessor:126 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)

--------------------------------------------------------------------------------

Root Exception stack trace:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@10e1baa6; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:731)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915)

    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

********************************************************************************


ERROR 2015-02-21 21:53:46,405 [[sitewhere_test].sitewhere_testFlow1.stage1.03] org.mule.exception.DefaultMessagingExceptionStrategy: 

********************************************************************************

Message               : Failed to invoke buildContextForEvent. Message payload is of type: DeviceLocation

Code                  : MULE_ERROR--2

--------------------------------------------------------------------------------

Exception stack is:

1. Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@a07ba08; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]) (com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException)

  com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:51 (null)

2. Could not read JSON: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@a07ba08; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]); nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@a07ba08; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"]) (org.springframework.http.converter.HttpMessageNotReadableException)

  com.sitewhere.mule.spring.MappingJackson2HttpMessageConverter:159 (null)

3. Failed to invoke buildContextForEvent. Message payload is of type: DeviceLocation (org.mule.api.MessagingException)

  com.sitewhere.mule.processors.BuildContextForEventMessageProcessor:126 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)

--------------------------------------------------------------------------------

Root Exception stack trace:

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "siteToken" (class com.sitewhere.rest.model.device.Device), not marked as ignorable (18 known properties: "specification", "updatedDate", "deviceElementMappings", "assignment", "deleted", "assetName", "createdBy", "hardwareId", "assetImageUrl", "assetId", "assignmentToken", "parentHardwareId" [truncated]])

 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@a07ba08; line: 1, column: 1288] (through reference chain: com.sitewhere.rest.model.device.DeviceAssignment["device"]->com.sitewhere.rest.model.device.Device["siteToken"])

at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)

at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:731)

at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:915)

    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)

********************************************************************************

Derek Adams

unread,
Feb 22, 2015, 2:22:18 AM2/22/15
to site...@googlegroups.com
There were API changes between 1.0.0 and 1.0.1 that appear to have caused regression problems with the Mule Studio plugin. We should have a new plugin available within the next day to fix the problem. Thank you for reporting the issue.

Derek Adams

unread,
Feb 22, 2015, 2:30:10 PM2/22/15
to site...@googlegroups.com
We uploaded a new version of the SiteWhere plugin that fixes the problem. You should be able to click "Help > Check for updates" and it will load the new version of the plugin. Thanks again for reporting the issue and please let us know if the update does not fix your problems.

Eric Bartel

unread,
Feb 24, 2015, 7:37:28 PM2/24/15
to site...@googlegroups.com
I tested it tonight and that fixed the issue. Thanks for the quick turnaround.
Reply all
Reply to author
Forward
0 new messages