Ticket #307 (closed defect: invalid)

Opened 10 months ago

Last modified 9 months ago

Missing required thread name when subscribing a bean to a message

Reported by: Jorge Loyo Owned by: peterfarrell
Priority: major Milestone: Mach-II 1.8.0 alpha
Component: framework - core Version: 1.8.0 - Framework
Keywords: message-subscribers, subscriber, call-method, thread Cc: jorgeloyo@…
Blocking: Blocked By:

Description

While testing the call-method support in a message I get the following error:

Error Detail: Thread name must be specified and it can not be empty.

This is my message declaration:

<message-subscribers>
   <message name="needAddressData" multithreaded="true" waitForThreads="true" timeout="60">
      <subscriber bean="geodataService" method="getCountries" resultArg="countries" />
      <subscriber bean="geodataService" method="getStates" resultArg="states">
         <arg name="countrycode" value="${event.countrycode:'US'}"/>
      </subscriber>
   </message>
</message-subscribers>

Attachments

stack.zip Download (1.4 KB) - added by Jorge Loyo 10 months ago.
cfdump_arguments.jpeg Download (13.3 KB) - added by Jorge Loyo 9 months ago.
Dump of the arguments in method "join" of the ThreadingAdapterCF.cfc
server.jpg Download (48.0 KB) - added by Jorge Loyo 9 months ago.
Dashboard CFML Server Information
m2.jpg Download (37.2 KB) - added by Jorge Loyo 9 months ago.
Dashboard Mach-II Information
mapping.jpg Download (6.1 KB) - added by Jorge Loyo 9 months ago.
CF Admin MachII Mapping definition
svn.jpg Download (64.4 KB) - added by Jorge Loyo 9 months ago.
SVN verion of Mach-II

Change History

Changed 10 months ago by Jorge Loyo

Changed 10 months ago by peterfarrell

  • status changed from new to assigned

I'm having a difficult time reproducing this exception. Can you confirm the following information?

  • What CFML engine and version are you using?
  • Are you sure you are using the latest BER from the repository of Mach-II? If not, please update to the latest.
  • Have you just tried it with just one subscriber?
  • Are you sure both method calls you defined as subscribers work? Try setting multithreaded="false" to run them in serial.

I suspecting something is up -- the error you define is saying that the struct that is being passed into the JOIN method of the threading adapter probably has a NULL value as a struct key. You could go into the ThreadingAdapterCF.cfc around line 117 and do a dump of the arguments scope with an abort to see what is coming into the method as arguments. If you could do that for me, that would help.

Changed 9 months ago by peterfarrell

Just bumping this thread. I'm unable to reproduce the the error you are getting. Can you respond to my previous comment on this ticket?

Changed 9 months ago by Jorge Loyo

Peter,

Sorry for the delay, I didn't check the ticket in a while and I didn't get any notifications about comments.

Q: What CFML engine and version are you using?
A: CF8 version 8,0,1,195765

Q: Are you sure you are using the latest BER from the repository of Mach-II?
A: I am using 1.8.0 BER (1621)

Q: Have you just tried it with just one subscriber?
A: Yes, but same error.

Q: Are you sure both method calls you defined as subscribers work?
A: Yes they do if I just do a regular call-method in my event-handler

Q: Try setting multithreaded="false" to run them in serial.
A: Did this and it gets to the view, but the resultArgs are not defined in the event.

I will get a dump of the code you asked and I will get back to you in a few minutes.

Thank you and sorry again, I never realized you had actually commented on the ticket.

Changed 9 months ago by Jorge Loyo

Dump of the arguments in method "join" of the ThreadingAdapterCF.cfc

Changed 9 months ago by peterfarrell

  • cc jorgeloyo@… added

Hmm, are you sure that you don't have a mapping that is pointing to a 1.6 version of Mach-II? I don't think it's running any subscriber's with beans. I guess the question is are you sure you are running 1.8? You can do getAppManager().getPropertyManager().getVersion() to see the version of the framework you are using.

The reason why I asking this is because for the life of me I can't reproduce this defect. So I might need a test application from you (you could use the skeleton to create a dummy application). Thanks for letting us know about this issue, but I think I'll need more help from you to resolve it.

Changed 9 months ago by Jorge Loyo

I am attaching a few screen shots of my app and my settings.

In the mean time here is the code in one subroutine. I've tried to run the "publish" from an event-handler as well with the same result:

<subroutine name="showAddressForm">
	<publish message="needAddressFormData" />
	<!-- 
	<call-method bean="geodataService" method="getCountries" resultArg="countries" />
	<call-method bean="geodataService" method="getStates" resultArg="states">
		<arg name="countrycode" value="${event.countrycode:US}"/>
	</call-method>
	 -->
	<view-page name="address.addressForm" contentArg="layout.content" />
	<execute subroutine="2ColLayout" />
</subroutine>

I am currently using the commented code instead of the "publish" and works fine.

My message:

<message name="needAddressFormData" multithreaded="true" waitForThreads="true" timeout="60">
	<subscriber bean="geodataService" method="getCountries" resultArg="countries" />
	<subscriber bean="geodataService" method="getStates" resultArg="states">
		<arg name="countrycode" value="${event.countrycode:'US'}" />
	</subscriber>
</message>

If multithreaded="true"

Error Message: Attribute validation error in the cfthread tag.
Error Detail: Thread name must be specified and it can not be empty.

If multithreaded="false"

Error Message: The event argument 'countries' from the expression 'event.countries' does not exist in the current event.

This second error occurs on my CFM and it happens even if the message has only one bean subscribed to it.

<cfset copyToScope("${event.address},${event.countries},${event.states}") />

Changed 9 months ago by Jorge Loyo

Dashboard CFML Server Information

Changed 9 months ago by Jorge Loyo

Dashboard Mach-II Information

Changed 9 months ago by Jorge Loyo

CF Admin MachII Mapping definition

Changed 9 months ago by Jorge Loyo

SVN verion of Mach-II

Changed 9 months ago by peterfarrell

  • status changed from assigned to closed
  • resolution set to invalid

I think the problem is your XML syntax doesn't match the DTD. Change subscriber to subscribe in your message node. Maybe we need to throw an exception if nothing subscribes to the message.

FYI, the location to the 1.8 DTD is available. We publish a new version with each nightly release. You can use this code to get your XML editor to validate against the DTD:

<!DOCTYPE mach-ii PUBLIC
	"-//Mach-II//DTD Mach-II Configuration 1.8.0//EN"
	"http://www.mach-ii.com/dtds/mach-ii_1_8_0.dtd">

Changed 9 months ago by anonymous

Damn!!!

Thank you sir.

Add/Change #307 (Missing required thread name when subscribing a bean to a message)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.