More information is needed to diagnose the problem, but you may be able to solve this with the information we can offer. The problem is most likely either the format of the datasets (one/both) or the job is running out of memory. Open up the error dataset and look at the comments. You can also click on the green bug icon to view more error details (the bug report does not need to be submitted if the solution becomes clear).
If format, confirm that the datasets have metadata (click on the pencil icon to view) and datatype assignment that are correct. If memory, the first thing to try is reversing the order of the datasets on the form (the order impacts memory usage for technical reasons). If it still fails, then you can try splitting the datasets up and running in batches, then merging the results (use tools in "Text manipulation"). Or, move to a local or cloud Galaxy with more memory. Details about errors are in the support wiki, section 2.8:
Are you working on the public Main Galaxy server at http://usegalaxy.org? If this does not solve the issue, and you are working on Main, the error can be submitted as a bug report. If not on Main, try to replicate the error and then submit if it is still a problem.
Best, Jen, Galaxy team