|
|
| Data Quality | Direct Marketing | Consulting | Downloads | Support | Resources | Lookups | Company |
| Troubleshooting |
|
• What is multi-threaded programming, with respect to MelissaDATA’s data quality tools? • Not able to compile PHP interface in PHP Version 5.3.x, any solutions. • xxxxObj.dll was loaded but the call to DllRegisterServer failed with the error code 0x80020009 or 0x80050007 • What is the difference between the COM and Standard version of Address Object? • 'MelissaData.mdxxxxCSPINVOKE’ threw an exception • What should be my primary concerns? • How do I Strongly name an application that calls Address Object? • What is a wrapper and how do I use it? • mdxxxxJavaWrapper.dll: Can't find dependent libraries • Why is threading an issue? • Can MelissaDATA’s API components detect improper thread usage and handle the situation accordingly? • cannot open shared object file • skipping incompatible /th/melissadata/libmdxxxx.so when searching for -lmdxxxx • How do I resolve Multiple Matches with Street Data? • What is Find Suggestions and how do I use it? • If I’m using a single-core/single-CPU machine, I don’t have to worry about threading issues, right? Q: What is multi-threaded programming, with respect to MelissaDATA’s data quality tools? > A: When working with MelissaDATA API components, you are multi-threading in these situations: • You have several threads, each creating an instance of an object. • You have several threads, all using a single (or a few) instances of an object. Be aware that sometimes you are multi-threading without even realizing it. This is particularly true for web applications. For example, a web service will often handle multiple requests simultaneously. Each request will be handled on a separate thread, though the code you have written to handle a request is oblivious to this. Q: Not able to compile PHP interface in PHP Version 5.3.x, any solutions. > A: Current SWIG source file mdAddrPHPWrapper.cpp on the disk file is not compatible with Php Version 5.3.x. SWIG wrapper were compiled using PHP 5.2.x. In PPH 5.2.x, SWIG wrappers use zend_error_noreturn() function which is no longer avialable in PHP 5.3.x. To create compatible mdAddrPHPWrapper.dll with Php 5.3.x, you need to make changes in mdAddrPHPWrapper.cpp manually. Open mdAddrPHPWrapper.cpp in text pad and replace “zend_error_noreturn” with “zend_error “. After making changes in mdAddrPHPWrapper.cpp compile wrapper again using CreateDll.bat file. Q: xxxxObj.dll was loaded but the call to DllRegisterServer failed with the error code 0x80020009 or 0x80050007 > A: The error is caused when the user does not have the administrative rights to register an object. Log into windows as an administrator or command a command prompt as an administrator and try to register again. This security feature was introduced in Windows 7 and Windows Server 2008. Q: What is the difference between the COM and Standard version of Address Object? > A: There are essentially no differences in the underlying code for the COM version and the Standard version of Address Object. The COM version has a COM interface layer used to communicate between your code and Address Object, and it is supported by many different languages. The Standard version of Address Object is an unmanaged dll that must be included into your program which eliminates the extra latency created by the COM layer. Q: 'MelissaData.mdxxxxCSPINVOKE’ threw an exception > A: The error is caused when the .NET wrapper cannot find one or more necessary components. Make sure all necessary components are in the correct directories. Melissa Data .NET wrappers are generated using an open source project called SWIG. The chain of dependent libraries are as follows: .NET project ---references--> mdxxxxNET.dll ---uses--> mdxxxxCS.dll ---uses--> mdxxxx.dll. Example: For address check .NET wrapper, mdAddrNET.dll uses mdAddrCS.dll which uses mdAddr.dll. Make sure all of these files are in the correct locations. The easiest way to ensure this is to place them all into the same directory, usually the same directory as your .NET project executable (bin/debug or bin/release). **** 64bit system ***** Working with the .NET wrapper changes if a use is on a x64 system. On a 64bit machine, they can choose to execute in 32bit mode or 64bit mode, but whatever mode they choose, all components must be have the same architecture. Working in 32bit on a 64bit machine: All provided dll’s on the DQ Suite are in 32bit. So, grab the existing mdxxxxNET.dll, mdxxxxCS.dll and dll_32bit/mdxxxx.dll. You also have to change to build target of your .NET application because on a x64 machine, the default ‘Any CPU’ option will default to 64bit. Go to Properties->Build->Target Platform and select x86. Working in 64bit on a 64bit machine To work in x64, you must recompile mdxxxxNET.dll and mdxxxxCS.dll into 64bit. Go into the source folder and run CreateDLLs.bat with a x64 Visual Studio command script. Please see the readme.txt and open CreateDLLs.bat in wordpad for more details. Then, grab dll_64bit/mdxxxx.dll. Go to Properties->Build->Target Platform and change to x64. Q: What should be my primary concerns? > A: When working with MelissaDATA API components, you are multi-threading in these situations: • You have several threads, each creating an instance of an object. • You have several threads, all using a single (or a few) instances of an object. Be aware that sometimes you are multi-threading without even realizing it. This is particularly true for web applications. For example, a web service will often handle multiple requests simultaneously. Each request will be handled on a separate thread, though the code you have written to handle a request is oblivious to this. Q: How do I Strongly name an application that calls Address Object? > A: With Visual Studio 2003 - 2005 C#, generate the keyfile with the command 'sn -k keyfile.snk' from the Visual Studio Command Line. Next, copy the snk file to the folder containing your application. Open Visual Studio and in the Solution Explorer Tree, right click the project and choose Properties. Set the attribute for the Wrapper Assemble KeyFile to keyfile.snk from the common properties dialog. Next, rebuild the C# application. Now all references to the Runtime Callable Wrapper or the Interop wrapper should be strongly named. Additional information: Microsoft support page: http://support.microsoft.com/?kbid=313666 Q: What is a wrapper and how do I use it? > A: A wrapper is an additional layer of code that acts as an interface from the standard AddressObject dll to the target programming language. Currently, wrappers are available for dotNET, Java, PHP, PERL, Python, Ruby and OWB. In order to use the wrapper, both the underlining code and the wrapper itself must be installed. So, to first install the underlying code, run the install for AddressObject on the root of the DQ Suite DVD. Now, you must install the wrapper itself. Look in the Interfaces folder of the DVD and locate the language and platform of the wrapper you want. Then, follow the readme to install the wrapper. Once installed, again refer to the readme for instructions to setup and run. Q: mdxxxxJavaWrapper.dll: Can't find dependent libraries > A: The error is caused when the Java wrapper cannot find one or more necessary components.Make sure all necessary components are in the correct directories. Melissa Data Java wrappers are generated using an open source project called SWIG. The chain of dependent libraries are as follows: Java project ---references--> mdxxx.jar and mdxxxxJavaWrapper.dll ---uses--> mdxxxx.dll. Example: For address check java wrapper, mdAddr.jar and mdAddrJavaWrapper.dll uses mdAddr.dll. Make sure all of these files are in the correct locations. The easiest way to ensure this is to place them all into the same directory, usually the same directory as your java project executable. **** 64bit system ***** Working with the java wrapper changes if a use is on a x64 system. On a 64bit machine, they can choose to execute in 32bit mode or 64bit mode, but whatever mode they choose, all components must be have the same architecture. Working in 32bit on a 64bit machine: All provided dll’s on the DQ Suite are in 32bit. So, run the java wrapper as instructed in the readme. However, be sure you are using the 32bit version of java. Working in 64bit on a 64bit machine To work in x64, you must recompile mdxxxxJavaWrapper.dll into 64bit. To do so, go into the Source folder, and run CreateDLL.bat with a x64 Visual Studio command prompt. See the readme.txt and open CreateDLL.bat in wordpad for more details. Then, use the 64bit mdxxxxJavaWrapper.dll and dll_64bit/mdxxxx.dll. Also, be sure to path CreateDLL.bat, CreateJarFile.bat, and RunSample.bat to use the 64bit version of java. Q: Why is threading an issue? > A: At any given moment, an instance exists at a certain state. Two threads calling the same instance will usually cause the instance to change states in unexpected ways, leading to incorrect results and/or crashes. For example, say thread 1 calls the Address Object (AO) with an address. The AO at this point is in ‘State A’. Then, before thread 1 can obtain the AO’s results, thread 2 calls the AO with a different address, putting it into ‘State B’. When thread 1 retrieves its results, it will retrieve the ‘State B’ results rather than the correct ‘State A’ results. Q: Can MelissaDATA’s API components detect improper thread usage and handle the situation accordingly? > A: No, they cannot. It is not a fault of the programming, but rather is inherent to the way microprocessors and operating systems are designed and used. Q: cannot open shared object file Receiving "cannot open shared object file: No such file or directory at" error message when trying to use a interface. A: Users typically get this error when the generated wrapper .so file cannot find the target .so library. To see this, do a ldd on the wrapper .so file and make sure all the dependency links are satisfied. If the target library dependency link is not satisfied, set your LD_LIBRARY_PATH environment variable to the directory containing the target library and try again. In AIX, the environment variable is called LIBPATH. Q: skipping incompatible /th/melissadata/libmdxxxx.so when searching for -lmdxxxx > A: The error is caused when the melissa data unix library is not compatible with your system. There are several configurations that much match for your system to be able to run our libraries on our unix platforms. Please make sure that your glibc version matches or is compatible with the provided library and that you are using the correct width (32 or 64 bit). Debugging: Run a ldd command on mdxxxx.so and libmdxxxxJavaWrapper.so. All dependencies should have a corresponding library mapped. If you are having trouble still, please send the output of these two ldd commands along with a 'uname -a' to tech support. Q: How do I resolve Multiple Matches with Street Data? > A: When Address Object return to you an error code of 'M' indicating a multiple match address, you can use street data to figure out exactly which addresses the input can be matched to. You do so by using the street data interface, which is used to look up the address records inside the USPS database. Here are the steps to find those matches: 1) Call the FindStreet Method (and FindStreetNext) by passing in the street name and zip code of the input a) You must isolate the street name out of the address. To do so, you can use the Parse interface to split the address into its address components, including street name. b) If you do not have a zip and only have the city and state in the input, but can generate a zip by using the ZipData interface FindZip method. Pass in the city and state to get a list of all zip codes in that city/state. You can use any of the zip codes returned by FindZip because FindStreet will search all zip codes within the city of the given zip. 2) Take the results of the street data search and filter out the records that your input range does not fall into by using the IsAddressInRange2 method. a) Once again, you need to isolated range of the input. You can get that value from the Parse interface just like the street name. Let’s take a look at an example using the steps above. The address 30 Ardsley, 11570 returns a Multiple Match Error. 1) We call the FindStreet("Ardsley","11570",0) and FindStreetNext to retrieve all streets named "Ardsley" in that zip code. We get the following result (at the time of this writing): 1-99 Odd Ardsley Cir 11570-2003 1-99 Odd Ardsley PL 11570-2005 2-98 Even Ardsley Cir 11570-2007 2-98 Even Ardsley PL 11570-2004 2) We use IsAddressInRange2 to see if our range, "30" fits within the range of each record. Doing so, we get the following filtered results: 2-98 Even Ardsley Cir 11570-2007 2-98 Even Ardsley PL 11570-2004 3) We can now present Ardsley Cir and Ardsley PL as possible addresses to our user. Note: There are a few caveats. Some records have a plus4 of xxxx. This means that they are undeliverable and you may choose to not show them to the user. Due to these undeliverable records, a multiple match search by only have one final result. You may also want to experiment with the ZipCodeOnly option in the FindStreet method. You may choose to search just within the given zip code before searching the entire city of the given zip code. Disclaimer: This tip is not intended to be a comprehensive guide. Please review all methods and properties in the Address Object manual as well as the data returned by Street data. The best way to proceed is to familiarize yourself with the data returned and perform test cases. Q: What is Find Suggestions and how do I use it? > A: Added on April, 2010, this new feature gives you the ability to automatically provide address suggestions without the use of the StreetData Interface. By making use of Find Suggestions, you can easilly generate the possible and sensible alternatives to addresses that did not verify. Using Find Suggestions: In order to correctly use Find Suggestions, you must first proceed with the standard procedure in initializing and verifying an address: // * In order to activate FindSuggestions, you are required to initialize both the US National Data Files and the DPV Data Files. //set path to data filess drobj.PathToUSFiles = “Path to mdaddr Data files” //set path to required add-on addrobj.PathToDPVDataFiles = “Path to DPV Data files” //set license string addrobj.SetLicenseString(“License”) //Initialize Result = addrobj.InitializeDataFiles() //Set your address input addrobj.Address = "Address Here" addrobj.City = "City Here" addrobj.State = "State Here" addrobj.Zip = "Zip Here" //Verify Your Address addrobj.Verify() // * Naturally, you'd want to provide suggestions to customers when there is an error in the address. So you would first want to check for errors in the address. If lets say for example you wanted to provide suggestions for Unknown Streets (AE02) and Component Errors (AE03), this is how you would code it: if(addrobj.Results.Contains("AE02")||addrobj.Results.Contains("AE03")){ // Call the Find Suggestion Method and proceed if it returns 1 if(addrobj.FindSuggestion()) { // Output the current suggestion found Address.Text = addrobj.Address City.Text = addrobj.City State.Text = addrobj.State Zip.Text = addrobj.Zip Suite.Text = addrobj.Suite // Keep calling FindsuggestionNext until it returns 0 while(addrobj.FindSuggestionNext()) { // Output the next suggestions found Address.Text = addrobj.Address City.Text = addrobj.City State.Text = addrobj.State Zip.Text = addrobj.Zip Suite.Text = addrobj.Suite } } } Q: If I’m using a single-core/single-CPU machine, I don’t have to worry about threading issues, right? > A: Wrong. The synchronization issue discussed in question 2 can happen even if the threading is not exactly simultaneous. |
|
Data Quality Tools Address Verification Phone Verification Email Verification Name Parsing Duplicate Detection NCOALink / Change of Address Presorting Geocoding IP Location Property Data Enrichment Data Fielding and Parsing Telco |
Data Quality Software Contact Zone Enterprise Plugins Pentaho SQL Server Expressor Studio Appliances Contact Verification Server |
Reference Data Canadian Geo*Data Fone*Data ZIP*Data Geo*Data Consulting Batch Processing Downloads Support Resources Lookups Company |
|
Contact Us |
Partners |
Site Map |
Privacy |
USPS Trademarks |
Terms of use
© Copyright 2012 by Melissa DATA Corp. All trademarks are used as property of their owners. |