Neuron ESB User Network

The Service Bus for the Connected Business

Hi everybody,

I am developing small application which uses Neuron. It's job is to send messages using Client API. It works great, up to the moment when I add Process to the publishing party which I use in my application. The process uses Custom Process Step. I'm getting two kinds of errors:

1) When I fire tests against my application (using NUnit) I get:

Sending message to 'TestSubscriber'
System.Runtime.Serialization.SerializationException : Error in line 1 position 490. Element 'http://schemas.neuronesb.com/pipelines/:ESBMessagePipelineStep' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/IntegrationPlatform.Neuron.Logging:MessageLoggingProcessStep'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'MessageLoggingProcessStep' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, ref DataContract dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
at ReadPipelineStepCollectionOfESBMessagexAPWb1W4FromXml(XmlReaderDelegator, XmlObjectSerializerReadContext, XmlDictionaryString, XmlDictionaryString, CollectionDataContract)
at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, ref DataContract dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
at ReadESBMessagePipelineFromXml(XmlReaderDelegator, XmlObjectSerializerReadContext, XmlDictionaryString[], XmlDictionaryString[])
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, ref DataContract dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
at Neuron.Esb.Administration.ESBMessagePipelineBlobConverter.FromXmlString(String blob)
at Neuron.Esb.Administration.ClientPipelineItem.get_ThePipeline()
at Neuron.Esb.Internal.PipelineRuntimeHelper.ApplyPipelines(ESBClientContext context, ref ESBMessage message, Boolean applyOnPublish, Boolean applyOnReceive)
at Neuron.Esb.Internal.PipelineRuntimeHelper.ApplyPublishPipelines(ESBClientContext context, ref ESBMessage message)
at Neuron.Esb.Party.SendMessage(ESBMessage message, Boolean duplicateMessage)
at IntegrationPlatform.Neuron....

2) When I run this application normally I get:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions p
roperty for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Neuron.Configuration.AssemblyRegistration.GetTypes()
at Neuron.Configuration.TypeRegistrationGroup.GetTypes()
at Neuron.Configuration.TypeRegistrationGroups.GetRegistrations(String name)
at Neuron.Esb.Administration.ESBMessagePipelineBlobConverter.GetKnownTypes()
at Neuron.Esb.Administration.ESBMessagePipelineBlobConverter.FromXmlString(String blob)
at Neuron.Esb.Administration.ClientPipelineItem.get_ThePipeline()
at Neuron.Esb.Internal.PipelineRuntimeHelper.ApplyPipelines(ESBClientContext context, ESBMessage& message, Boolean applyOnPublish, Boolean applyOnR
eceive)
at Neuron.Esb.Internal.PipelineRuntimeHelper.ApplyPublishPipelines(ESBClientContext context, ESBMessage& message)
at Neuron.Esb.Party.SendMessage(ESBMessage message, Boolean duplicateMessage)
at Neuron.Esb.Party.SendMessage(ESBMessage message, SendOptions options, String targetId, String action, String schema)
at IntegrationPlatform.Neuron....

Any ideas what may be wrong?
I'm using NeuronESB 3.1.0.390.
Thanks for help,
Michał

P.S. I'm developing using Neuron for 2 months now and I think it is a really great product! Good job!

Tags: ClientAPI, custom, process, step

Views: 520

Reply to This

Replies to This Discussion

Hi,

I think I managed to resolve my problems.

In first exception, the reason was version mismatch for Newtonsoft.Json library. Resolving it led to 2) exception.

Resolution for 2) is to define CustomProcessSteps in app.config (or whatever the config file of application is) the same way as in neuronpipelines.config, that is:

  <neuron.pipelines>
    <stepTypes>
      <add name="CustomProcessStepNam" value="AssemblyName" />
    </stepTypes>
  </neuron.pipelines>

Don't forget to add config section definition:

<configSections>
    <section name="neuron.pipelines" type="Neuron.Configuration.PipelinesConfigurationSection, Neuron"/>
</configSections>

Remember also, that your tests are running under different process, so they have separate config file ;)

I hope this will help somebody ;)

Greetings,

Michał

Michal - when you use any custom or third party assemblies with the Client API, those components also need to be deployed to the same location where the application hosting the Client API resides.  So if your executable is at c:\MyClientAPIApp, and the core Neuron assemblies are there (Neuron.dll, Neuron.Esb.dll,  etc.), then the custom process assemblies also need to be there.  There's one final step - the custom process step needs to be registered in the hosting applications config file. You probably already put the appSettings or the Neuron ESB Server in there.  Here's a sample:

<?xml version="1.0"?>

<configuration>

  <configSections>

    <section name="neuron.pipelines" type="Neuron.Configuration.PipelinesConfigurationSection, Neuron"/>

  </configSections>

 

  <appSettings>

    <add key="esbZone" value="Enterprise"/>

    <add key="esbClientId" value="TestPub"/>

    <add key="esbServiceAddress" value="net.tcp://localhost:50000"/>

    <add key="esbServiceIdentity" value=""/>

  </appSettings>

  <system.diagnostics>

    <switches>

      <!-- This switch controls ESB trace messages. -->

      <!-- Value  Meaning -->

      <!-- =====  ======= -->

      <!--   0    No tracing -->

      <!--   1    Trace errors -->

      <!--   2    Trace errors + warnings -->

      <!--   3    Trace errors + warnings + info -->

      <!--   4    Trace errors + warnings + info + verbose -->

      <add name="esbTraceSwitch" value="2" />

    </switches>

    <trace autoflush="true" indentsize="0" />

  </system.diagnostics>

  <neuron.pipelines>

    <stepTypes>

      <!--add name="MyCustomPipelineStep" value="Neuron.Pipelines.CustomSamples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ecaf0c45d7be0e34"/-->

    </stepTypes>

  </neuron.pipelines>

</configuration>

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service